3031323334353637383940
mock.intReturningMethod(); Invocation invocation = super.getLastInvocation(); //when: Object result = handler.handle(invocation); //then null value is not a valid result for a primitive assertNotNull(result); assertEquals(0, result); }
4849505152535455565758
mock.intReturningMethod(); Invocation invocation = super.getLastInvocation(); //when: Object result = handler.handle(invocation); //then assertEquals(123, result); } }