I am attempting to convert a test suite which uses JMockit to use Mockito & powermock.
In the test setup there is the following snippet of code:
new MockUp<Controller>() {
@Mock
public boolean sendMessage(final String string1, final String string2) {
queue.add(string1);
return true;
}
};
I am guessing that this means whenever that method is called during testing, then use this mocked implementation. Is this correct?
Also is there an equivalent to MockUp in Mockito or Powermock?
Thank you!