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