### Question:
GlobalHealthcheckHandler { protected HealthCheckStatus processResponseFromSubsystem(ResponseEntity<SubsystemHealthcheckResponse> result, Endpoint endpoint) { if (result == null || result.getStatusCodeValue() != HttpStatus.SC_OK) { logger.error(String.format("Globalhealthcheck: checking subsystem: %s failed ! result object is: %s", endpoint.getSubsystem(), result == null ? "NULL" : result)); return HealthCheckStatus.DOWN; } SubsystemHealthcheckResponse body = result.getBody(); String status = body.getStatus(); if ("UP".equalsIgnoreCase(status)) { return HealthCheckStatus.UP; } else { logger.error("{}, query health endpoint did not return UP status!", endpoint.getSubsystem()); return HealthCheckStatus.DOWN; } }  @GET @Produces("application/json") @Operation(description = "Performing global health check", responses = @ApiResponse( content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class))))) @Transactional Response globalHealthcheck(@DefaultValue("true") @QueryParam("enableBpmn") boolean enableBpmn,
            @Context ContainerRequestContext requestContext);  }### Answer:
@Test public void processResponseFromSubsystemTest() { SubsystemHealthcheckResponse subSystemResponse = new SubsystemHealthcheckResponse(); subSystemResponse.setStatus("UP"); ResponseEntity<SubsystemHealthcheckResponse> r = new ResponseEntity<>(subSystemResponse, HttpStatus.OK); Endpoint endpoint = new Endpoint(SoSubsystems.BPMN, UriBuilder.fromUri("http: HealthCheckStatus result = globalhealth.processResponseFromSubsystem(r, endpoint); assertEquals(HealthCheckStatus.UP, result); }