@Test public void approve_VALID() { byte[] content = new byte[] { }; when(internalContentApprover.approve(content)).thenReturn(true); boolean result = contentApproverWrapper.approve(content); assertTrue(result); verifyZeroInteractions(invalidContentCounter); }
@Override public boolean approve(byte[] content) { boolean result = contentApprover.approve(content); if (!result) { invalidContentCounter.increment(1); } return result; }
InvalidCountableContentApproverWrapper implements ContentApprover { @Override public boolean approve(byte[] content) { boolean result = contentApprover.approve(content); if (!result) { invalidContentCounter.increment(1); } return result; } }
InvalidCountableContentApproverWrapper implements ContentApprover { @Override public boolean approve(byte[] content) { boolean result = contentApprover.approve(content); if (!result) { invalidContentCounter.increment(1); } return result; } InvalidCountableContentApproverWrapper(ContentApprover contentApprover, Counter invalidContentCounter); }
InvalidCountableContentApproverWrapper implements ContentApprover { @Override public boolean approve(byte[] content) { boolean result = contentApprover.approve(content); if (!result) { invalidContentCounter.increment(1); } return result; } InvalidCountableContentApproverWrapper(ContentApprover contentApprover, Counter invalidContentCounter); @Override boolean approve(byte[] content); }
InvalidCountableContentApproverWrapper implements ContentApprover { @Override public boolean approve(byte[] content) { boolean result = contentApprover.approve(content); if (!result) { invalidContentCounter.increment(1); } return result; } InvalidCountableContentApproverWrapper(ContentApprover contentApprover, Counter invalidContentCounter); @Override boolean approve(byte[] content);  }