EvictingConnectionLogger implements ConnectionLogger { @Override public Collection<LogEntry> getLogs() { final Collection<LogEntry> logs = new ArrayList<>(successLogs.size() + failureLogs.size()); logs.addAll(successLogs); logs.addAll(failureLogs); LOGGER.trace("Returning logs: {}", logs); return logs; } private  EvictingConnectionLogger(final Builder builder); @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 dittoRuntimeException); @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(); @SuppressWarnings("OverlyComplexMethod") @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void getLogsReturnsAllLogTypes() { final EvictingConnectionLogger logger = builder().build(); logNtimes(SUCCESS_CAPACITY, logger::success); logNtimes(FAILURE_CAPACITY, logger::failure); final Collection<LogEntry> logs = logger.getLogs(); assertThat(logs) .hasSize(SUCCESS_CAPACITY + FAILURE_CAPACITY); }