I have a method of a mocked object that can be called multiple times (think recursion). The method is defined like this:
public void doCommit() { }
I figured it out (with some hints from Igor). This is how you stub consecutive void method calls:
doThrow(new RuntimeException()).doNothing().doThrow(...).doNothing().when(mMockedObject).doCommit();
thanks Igor!