@Override
    protected Result check() {
        final HttpHealthResponse httpHealthResponse = httpCheck(url);

        if (isHealthResponseValid(httpHealthResponse)) {
            LOGGER.debug("Health check against url={} successful", url);
            return Result.healthy();
        }

        LOGGER.debug("Health check against url={} failed with response={}", url, httpHealthResponse);
        return Result.unhealthy("Http health check against url=%s failed with response=%s", url, httpHealthResponse);
    }
@Test
    void httpHealthCheckShouldConsiderA500ResponseUnhealthy() {
        httpServer.createContext(FAIL_PATH, httpExchange -> {
            try {
                httpExchange.sendResponseHeaders(500, 0);
            } finally {
                httpExchange.close();
            }
        });
        httpServer.start();
        final HttpHealthCheck httpHealthCheck = new HttpHealthCheck(BASE_URI +
            httpServer.getAddress().getPort() + FAIL_PATH);
        assertThat(httpHealthCheck.check().isHealthy()).isFalse();
    }