public CompletableFuture<Response> executeRequest(Request request) {
        return executeRequest(request, () -> new AsyncCompletionHandlerBase());
    }
@Test
    void testMaxRedirects() {
        // Redirect to itself to test max redirects
        server.stubFor(get(urlEqualTo("/admin/v2/clusters"))
                .willReturn(aResponse()
                        .withStatus(301)
                        .withHeader("Location", "http://localhost:" + server.port() + "/admin/v2/clusters")));

        ClientConfigurationData conf = new ClientConfigurationData();
        conf.setServiceUrl("http://localhost:" + server.port());

        @Cleanup
        AsyncHttpConnector connector = new AsyncHttpConnector(5000, 5000,
                5000, 0, conf, false);

        Request request = new RequestBuilder("GET")
                .setUrl("http://localhost:" + server.port() + "/admin/v2/clusters")
                .build();

        try {
            connector.executeRequest(request).get();
            fail();
        } catch (ExecutionException e) {
            assertTrue(e.getCause() instanceof AsyncHttpConnector.MaxRedirectException);
        } catch (InterruptedException e) {
            fail();
        }
    }