I am using JMock
to test the following method in a ProcessingTest class:
public void handle(Process process) {
processor.handleProcess(process);
}
I have mocked out the processor
and process
classes. For my test for this particular method, my JMock
expectations are as follows:
checking( new Expectations() {
{
oneOf( ProcessingTest.this.processor ).handleProcess(
ProcessingTest.this.process );
}
} );
This is causing the following error:
unexpected invocation ...
no expectations specified
....
I assume that there is something incorrect in the expectations, what should they be?
I have tried to expect that the method in invoked atLeast
one time, but this seems to be an issue for void
methods.