Slf4jQueryLogger implements QueryLogger { @Override public void logOutgoingRequestToShards( final QueryContext context, final FullQuery.Request request ) { performAndCatch(() -> { final FullQuery.Request.Summary summary = request.summarize(); serializeAndLog(context, "outgoing-request-to-shards", 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 testOutgoingRequestsToShards() { final FullQuery.Request request = mock(FullQuery.Request.class); slf4jQueryLogger.logOutgoingRequestToShards(queryContext, request); verify(logger, times(1)).accept(any(String.class)); }