static void assertOk(CheckResult result) {
    if (!result.ok()) {
      Throwable error = result.error();
      throw new AssertionError("Health check failed with message: " + error.getMessage(), error);
    }
  }
This ensures the response is sent after the request is fully read.
zipkin-server/src/test/java/zipkin2/server/internal/elasticsearch/ITElasticsearchHealthCheck.java