/** * Map the specified {@link Status} to an HTTP status code. * @param status the health {@link Status} * @return the corresponding HTTP status code */ public int mapStatus(Status status) { String code = getUniformValue(status.getCode()); if (code != null) { return this.statusMapping.entrySet().stream() .filter((entry) -> code.equals(getUniformValue(entry.getKey()))) .map(Map.Entry::getValue).findFirst() .orElse(WebEndpointResponse.STATUS_OK); } return WebEndpointResponse.STATUS_OK; }