LoggerBuilder { public LoggerBuilder slf4jLogger(org.slf4j.Logger slf4jLogger, FastDateFormat dateFormatter) { this.slf4jLogger = slf4jLogger; this.dateFormatter = dateFormatter; return this; }  LoggerBuilder slf4jLogger(org.slf4j.Logger slf4jLogger, FastDateFormat dateFormatter); LoggerBuilder includeLoggerName(boolean includeLoggerName); LoggerBuilder includeClassName(boolean includeClassName); LoggerBuilder includeThreadName(boolean includeThreadName); Logger build();  }
@Test public void testSlf4jLogger() throws Exception { Mockito.when(this.mockSlf4jLogger.isInfoEnabled()).thenReturn(true); Mockito.when(this.mockDateFormatter.format(Mockito.anyObject(), Mockito.any(StringBuffer.class), Mockito.any(FieldPosition.class))) .thenReturn(new StringBuffer("x-formatted-date-x")); Logger result = this.loggerBuilder .slf4jLogger(this.mockSlf4jLogger, this.mockDateFormatter) .build(); result.info().message("x-msg-x").log(); Mockito.verify(this.mockSlf4jLogger).info(Mockito.matches(".*x-formatted-date-x.*")); Mockito.verify(this.mockSlf4jLogger).info(Mockito.matches(".*x-msg-x.*")); }