@Test public void verifyStaticInvocationForSpecifiedMockInstance(final AnotherDependency mock2) { mock2.doSomething(); AnotherDependency.staticMethod(); mock2.doSomethingElse(1); mock.editABunchMoreStuff(); mock2.doSomethingElse(2); new FullVerificationsInOrder(mock2) { { mock2.doSomething(); AnotherDependency.staticMethod(); mock2.doSomethingElse(anyInt); mock2.doSomethingElse(anyInt); } }; }
@Test public void verifyAllInvocationsToOneOfTwoMocksInIteratingBlock(AnotherDependency mock2) { mock2.doSomething(); mock.setSomething(123); mock.save(); mock2.doSomethingElse(1); mock.setSomething(45); mock.save(); mock2.doSomethingElse(2); new FullVerifications(2, mock) { { mock.setSomething(anyInt); mock.save(); } }; }