DefaultMuteableConnectionLogger implements MuteableConnectionLogger { @Override public Collection<LogEntry> getLogs() { if (active) { return delegate.getLogs(); } LOGGER.trace("Returning empty logs since logger is muted."); return Collections.emptyList(); } 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 getLogs() { final DefaultMuteableConnectionLogger unmuted = unmuted(); final Collection<LogEntry> entries = Mockito.mock(Collection.class); when(delegate.getLogs()).thenReturn(entries); assertThat(unmuted.getLogs()).isEqualTo(entries); verify(delegate).getLogs(); }