Slf4jLogger implements Logger { @Override public boolean isTraceEnabled() { return delegate.isTraceEnabled(); } Slf4jLogger( org.slf4j.Logger delegate ); @Override void error( String message, Throwable cause ); @Override void info( String message, Object... params ); @Override void warn( String message, Object... params ); @Override void warn( String message, Throwable cause ); @Override void debug( String message, Object... params ); @Override void trace( String message, Object... params ); @Override boolean isTraceEnabled(); @Override boolean isDebugEnabled();  }
@Test void shouldCheckIfTraceIsEnabled() { when( logger.isTraceEnabled() ).thenReturn( false ); assertFalse( slf4jLogger.isTraceEnabled() ); when( logger.isTraceEnabled() ).thenReturn( true ); assertTrue( slf4jLogger.isTraceEnabled() ); }