ConnectionLoggerRegistry implements ConnectionMonitorRegistry<ConnectionLogger> { public ConnectionLogger forConnection(final ConnectionId connectionId) { return getLogger(connectionId, LogCategory.CONNECTION, LogType.OTHER, null); } private  ConnectionLoggerRegistry(final int successCapacity, final int failureCapacity,
            final long maximumLogSizeInByte, final Duration loggingDuration); static ConnectionLoggerRegistry fromConfig(final MonitoringLoggerConfig config); ConnectionLogs aggregateLogs(final ConnectionId connectionId); boolean isLoggingExpired(final ConnectionId connectionId, final Instant timestamp); void muteForConnection(final ConnectionId connectionId); void unmuteForConnection(final ConnectionId connectionId); @Override void initForConnection(final Connection connection); @Override void resetForConnection(final Connection connection); @Override ConnectionLogger forOutboundDispatched(final ConnectionId connectionId, final String target); @Override ConnectionLogger forOutboundAcknowledged(final ConnectionId connectionId, final String target); @Override ConnectionLogger forOutboundFiltered(final ConnectionId connectionId, final String target); @Override ConnectionLogger forOutboundPublished(final ConnectionId connectionId, final String target); @Override ConnectionLogger forInboundConsumed(final ConnectionId connectionId, final String source); @Override ConnectionLogger forInboundAcknowledged(final ConnectionId connectionId, final String source); @Override ConnectionLogger forInboundMapped(final ConnectionId connectionId, final String source); @Override ConnectionLogger forInboundEnforced(final ConnectionId connectionId, final String source); @Override ConnectionLogger forInboundDropped(final ConnectionId connectionId, final String source); @Override ConnectionLogger forResponseDispatched(final ConnectionId connectionId); @Override ConnectionLogger forResponseDropped(final ConnectionId connectionId); @Override ConnectionLogger forResponseMapped(final ConnectionId connectionId); @Override ConnectionLogger forResponsePublished(final ConnectionId connectionId); ConnectionLogger forConnection(final ConnectionId connectionId); ConnectionLogger getLogger(
            final ConnectionId connectionId,
            final LogCategory logCategory,
            final LogType logType,
            @Nullable final String address); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void addsLoggerToRegistryOnRetrieve() { final ConnectionId connectionId = connectionId(); final ConnectionLogger logger1 = underTest.forConnection(connectionId); final ConnectionLogger logger2 = underTest.forConnection(connectionId); assertThat(logger1).isNotNull() .isEqualTo(logger2) .isSameAs(logger2); }