Slf4jQueryLogger implements QueryLogger { @Override public void logOutgoingResponseAtNode(final QueryContext context, final FullQuery response) { performAndCatch(() -> { final FullQuery.Summary summary = response.summarize(); serializeAndLog(context, "outgoing-response-at-node", summary); }); } @java.beans.ConstructorProperties({ "queryLog", "objectMapper", "component" })  Slf4jQueryLogger(final Consumer<String> queryLog, final ObjectMapper objectMapper,
                            final String component); @Override void logHttpQueryText(
        final QueryContext context, final String query
    ); @Override void logHttpQueryJson(
        final QueryContext context, final QueryMetrics query
    ); @Override void logQuery(final QueryContext context, final Query query); @Override void logOutgoingRequestToShards(
        final QueryContext context, final FullQuery.Request request
    ); @Override void logIncomingRequestAtNode(
        final QueryContext context, final FullQuery.Request request
    ); @Override void logOutgoingResponseAtNode(final QueryContext context, final FullQuery response); @Override void logIncomingResponseFromShard(
        final QueryContext context, final FullQuery response
    ); @Override void logFinalResponse(
        final QueryContext context, final QueryMetricsResponse queryMetricsResponse
    );  }
@Test public void testOutgoingResponseAtNode() { final FullQuery response = FullQuery.create(QueryTrace.of(QueryTrace.identifier("test"), 0L), new ArrayList<>(), new ArrayList<>(), Statistics.empty(), ResultLimits.of(), Optional.empty()); slf4jQueryLogger.logOutgoingResponseAtNode(queryContext, response); verify(logger, times(1)).accept(any(String.class)); }