@Test public void testHealthCheck() throws ExecutionException, InterruptedException { final HealthCheckRequest healthCheckRequest = HealthCheckRequest.newBuilder().setService(GreeterGrpc.getServiceDescriptor().getName()).build(); final HealthGrpc.HealthFutureStub healthFutureStub = HealthGrpc.newFutureStub(channel); final HealthCheckResponse.ServingStatus servingStatus = healthFutureStub.check(healthCheckRequest).get().getStatus(); assertNotNull(servingStatus); assertEquals(servingStatus, HealthCheckResponse.ServingStatus.SERVING); }