ConfigServerApiHandler extends AuditLoggingRequestHandler { private HttpResponse get(HttpRequest request) { Path path = new Path(request.getUri(), OPTIONAL_PREFIX); if (path.matches("/configserver/v1")) { return root(request); } return proxy(request); } ConfigServerApiHandler(Context parentCtx, ServiceRegistry serviceRegistry,
                                  ConfigServerRestExecutor proxy, Controller controller); @Override HttpResponse auditAndHandle(HttpRequest request);  }
@Test public void test_requests() { tester.assertResponse(operatorRequest("http: new File("root.json")); tester.assertResponse(operatorRequest("http: "ok"); assertLastRequest("https: tester.assertResponse(operatorRequest("http: "", Request.Method.POST), "ok"); tester.assertResponse(operatorRequest("http: "", Request.Method.PUT), "ok"); assertLastRequest("https: tester.assertResponse(operatorRequest("http: "", Request.Method.DELETE), "ok"); assertLastRequest("https: tester.assertResponse(operatorRequest("http: "{\"currentRestartGeneration\": 1}", Request.Method.PATCH), "ok"); assertLastRequest("https: assertEquals("{\"currentRestartGeneration\": 1}", proxy.lastRequestBody().get()); assertFalse("Actions are logged to audit log", tester.controller().auditLogger().readLog().entries().isEmpty()); }