public ListenableFuture<HealthCheckResponse> checkHealthWithDeadline(
      HealthCheckRequest request, Deadline deadline) {
    return healthService.withDeadline(deadline).check(request);
  }
@Test
  public void checkHealth_returnNotServingHealthResponse() throws Exception {
    HealthCheckRequest request = HealthCheckRequest.getDefaultInstance();

    HealthImplBase healthImpl =
        new HealthImplBase() {
          @Override
          public void check(
              HealthCheckRequest request, StreamObserver<HealthCheckResponse> responseObserver) {
            responseObserver.onNext(
                HealthCheckResponse.newBuilder().setStatus(ServingStatus.NOT_SERVING).build());
            responseObserver.onCompleted();
          }
        };
    serviceRegistry.addService(healthImpl);

    ListenableFuture<HealthCheckResponse> health =
        pluginService.checkHealthWithDeadline(request, DEADLINE_DEFAULT);

    assertThat(health.isDone()).isTrue();
    assertThat(health.get().getStatus()).isEqualTo(ServingStatus.NOT_SERVING);
  }