@Override
    public HealthCheckResponse check(HealthCheckRequest request) {
        HealthCheckResponse.ServingStatus status = statusMap.get(request.getService());
        if (status != null) {
            return HealthCheckResponse.newBuilder().setStatus(status).build();
        }
        throw TriRpcStatus.NOT_FOUND
                .withDescription("unknown service " + request.getService())
                .asException();
    }
@Test
    void testCheck() {
        TriHealthImpl triHealth = new TriHealthImpl();

        HealthCheckRequest request = HealthCheckRequest.newBuilder().build();
        HealthCheckResponse response = triHealth.check(request);
        Assertions.assertEquals(response.getStatus(), HealthCheckResponse.ServingStatus.SERVING);

        HealthCheckRequest badRequest =
                HealthCheckRequest.newBuilder().setService("test").build();
        Assertions.assertThrows(RpcException.class, () -> triHealth.check(badRequest));
    }