DefaultMuteableConnectionLogger implements MuteableConnectionLogger { @Override public void exception(final ConnectionMonitor.InfoProvider infoProvider, @Nullable final Exception exception) { if (active) { delegate.exception(infoProvider, exception); } else { logTraceWithCorrelationId("Not logging exception since logger is muted.", infoProvider); } } DefaultMuteableConnectionLogger(final ConnectionId connectionId, final ConnectionLogger delegate); @Override void mute(); @Override void unmute(); @Override boolean isMuted(); @Override void success(final ConnectionMonitor.InfoProvider infoProvider); @Override void success(final ConnectionMonitor.InfoProvider infoProvider, final String message,
            final Object... messageArguments); @Override void failure(final ConnectionMonitor.InfoProvider infoProvider, @Nullable final DittoRuntimeException exception); @Override void failure(final ConnectionMonitor.InfoProvider infoProvider, final String message,
            final Object... messageArguments); @Override void exception(final ConnectionMonitor.InfoProvider infoProvider, @Nullable final Exception exception); @Override void exception(final ConnectionMonitor.InfoProvider infoProvider, final String message,
            final Object... messageArguments); @Override void clear(); @Override Collection<LogEntry> getLogs(); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void exception() { final DefaultMuteableConnectionLogger unmuted = unmuted(); unmuted.exception(INFO_PROVIDER, DITTO_RUNTIME_EXCEPTION); verify(delegate).exception(INFO_PROVIDER, DITTO_RUNTIME_EXCEPTION); }
@Test public void exception1() { final DefaultMuteableConnectionLogger unmuted = unmuted(); unmuted.exception(INFO_PROVIDER, MESSAGE, THING_ID); verify(delegate).exception(INFO_PROVIDER, MESSAGE, THING_ID); }