ConnectionLogUtil { public static void enhanceLogWithConnectionId(final CharSequence connectionId) { LogUtil.enhanceLogWithCustomField(LogUtil.newMdcField(MDC_CONNECTION_ID, connectionId.toString())); } private  ConnectionLogUtil(); static void enhanceLogWithConnectionId(final CharSequence connectionId); static void enhanceLogWithCorrelationIdAndConnectionId(final String correlationId,
            final CharSequence connectionId); static void enhanceLogWithConnectionId(final DiagnosticLoggingAdapter loggingAdapter,
            final CharSequence connectionId); static void removeConnectionId(final DiagnosticLoggingAdapter loggingAdapter); static void enhanceLogWithCorrelationIdAndConnectionId(final DiagnosticLoggingAdapter loggingAdapter,
            final WithDittoHeaders<?> signal,
            final CharSequence connectionId); static void enhanceLogWithCorrelationIdAndConnectionId(final DiagnosticLoggingAdapter loggingAdapter,
            final String correlationId,
            final CharSequence connectionId);  }
@Test public void enhanceLogWithConnectionId() { final String connectionId = "theConnection"; final Map<String, Object> expectedMap = new HashMap<>(DEFAULT_MDC); expectedMap.put("connection-id", connectionId); ConnectionLogUtil.enhanceLogWithConnectionId(log, connectionId); Mockito.verify(log).setMDC(expectedMap); }