Beispiel #1
0
 @Mock(minInvocations = 1, maxInvocations = 3)
 public int computeX(Invocation inv, int a, int b) {
   assertTrue(a + b >= 0);
   assertNotNull(inv.getInvokedInstance());
   return a - b;
 }
Beispiel #2
0
 @Mock(invocations = 1)
 public void $init(Invocation inv, String config) {
   assertNotNull(inv.getInvokedInstance());
   assertEquals("config", config);
 }