I have a Controller class with something like this
public void create(int a, int b){
//do something
}
Now i want to mock the Controller class and call a certain method for exmaple doCustomCreate() when the create Method of my mocked Controller class is called.
My test would ´look something like this
Controller ctrlMock = mock(Controller.class);
//PseudoCode: when(isCalled(ctrlMock.create(a,b)).doCall(doCustomCreate());
I only read about mocking methods with input and return values, so i wondered if this is possible?
Edit: Updated the Question