FastLogger extends ExtendedLoggerWrapper { @Override public boolean isDebugEnabled() { return delegating && super.isDebugEnabled(); } FastLogger(final Logger logger);  FastLogger(final ExtendedLogger logger, final String name,
      final MessageFactory messageFactory); static void setDelegating(final boolean newValue); @Override boolean isDebugEnabled(); @Override boolean isDebugEnabled(final Marker marker); @Override boolean isTraceEnabled(); @Override boolean isTraceEnabled(final Marker marker); boolean isDelegating(); ExtendedLogger getExtendedLogger();  }
@Test public void delegatesIsDebugEnabledWhenIsDelegating() { when(mockedLogger.isEnabled(eq(Level.DEBUG), nullable(Marker.class), nullable(String.class))) .thenReturn(true); assertThat(fastLogger.isDebugEnabled()).isTrue(); verify(mockedLogger).isEnabled(eq(Level.DEBUG), isNull(), isNull()); }
@Test public void delegatesIsDebugEnabledWithMarkerWhenIsDelegating() { when(mockedLogger.isEnabled(eq(Level.DEBUG), eq(mockedMarker), nullable(Object.class), nullable(Throwable.class))) .thenReturn(true); assertThat(fastLogger.isDebugEnabled(mockedMarker)).isTrue(); verify(mockedLogger).isEnabled(eq(Level.DEBUG), eq(mockedMarker), (Object) isNull(), isNull()); }