class HealthController {

    @Operation(summary = "Health Check Endpoint",
               description = "Returns HTTP 200 if the system believes it is healthy, or HTTP 5xx errors otherwise.")
    @GetMapping
    @Hidden
    public SystemHealthState getHealth () {
        switch (healthManager.getHealth()) {
            case OK:
                return SystemHealthState.OK;
            case ERROR:
                throw new HealthErrorException();
            case UNKNOWN:
            default:
                throw new HealthUnknownException();
        }
    }

    @Autowired  HealthController();

}