LoggingHandler { public boolean isActive() { return this.active; } LoggingHandler(LoggingResourceManager loggingResourceManager, HttpServerRequest request, EventBus eventBus); boolean isActive(); void setResponse(HttpClientResponse response); void request(MultiMap headers); void appendRequestPayload(Buffer data); void appendResponsePayload(Buffer data); void appendRequestPayload(Buffer data, MultiMap headers); void appendResponsePayload(Buffer data, MultiMap headers); void log(); void log(String uri, HttpMethod method, int statusCode, String statusMessage, MultiMap requestHeaders, MultiMap responseHeaders);  }
@Test public void testCustomSorting(TestContext context) { LoggingResourceManager manager = new LoggingResourceManager(vertx, storage, LOGGING_URI); LoggingResource loggingResource = manager.getLoggingResource(); List<Map<String, String>> payloadFilterEntries = loggingResource.getPayloadFilters(); context.assertEquals(2, payloadFilterEntries.size()); context.assertEquals(payloadFilterEntries.get(0).get("url"), "/playground/nsa/v1/acknowledgment/.*"); context.assertEquals(payloadFilterEntries.get(1).get("url"), "/playground/server/users/v1/.*"); GETRequest request = new GETRequest(); LoggingHandler loggingHandler = new LoggingHandler(manager, request, vertx.eventBus()); context.assertTrue(loggingHandler.isActive()); Map<String, String> firstEntry = payloadFilterEntries.get(0); Map<String, String> secondEntry = payloadFilterEntries.get(1); payloadFilterEntries.set(0,secondEntry); payloadFilterEntries.set(1,firstEntry); context.assertTrue(loggingHandler.isActive()); }