@Test public void foo_shouldLogASuccessMessage() throws Exception { theClass.foo(); verify(mockLogger).log(CollectorLogMessages.SUCCESS, 42); verifyNoMoreInteractions(mockLogger); }
public void foo() { logger.log(SUCCESS, 42); }
ClassThatLogs { public void foo() { logger.log(SUCCESS, 42); } }
ClassThatLogs { public void foo() { logger.log(SUCCESS, 42); } ClassThatLogs(OpsLogger<CollectorLogMessages> logger); }
ClassThatLogs { public void foo() { logger.log(SUCCESS, 42); } ClassThatLogs(OpsLogger<CollectorLogMessages> logger); void foo(); void bar(); String logContextsAcrossThreads(); void baz(); }
ClassThatLogs { public void foo() { logger.log(SUCCESS, 42); } ClassThatLogs(OpsLogger<CollectorLogMessages> logger); void foo(); void bar(); String logContextsAcrossThreads(); void baz();  }