### Question:
HealthCheckHelper { public static V1SubjectRulesReviewStatus performSecurityChecks( KubernetesVersion version, String operatorNamespace, String namespace) { String ns = namespace != null ? namespace : operatorNamespace; if (DEFAULT_NAMESPACE.equals(operatorNamespace)) { LOGGER.fine(MessageKeys.NAMESPACE_IS_DEFAULT); } AuthorizationProxy ap = new AuthorizationProxy(); LOGGER.fine(MessageKeys.VERIFY_ACCESS_START, ns); V1SelfSubjectRulesReview review = ap.review(ns); if (review != null) { V1SubjectRulesReviewStatus status = review.getStatus(); List<V1ResourceRule> rules = status.getResourceRules(); if (namespace != null) { for (Resource r : namespaceAccessChecks.keySet()) { for (Operation op : namespaceAccessChecks.get(r)) { check(rules, r, op, namespace); } } } if (!Main.isDedicated() && operatorNamespace.equals(ns)) { for (Resource r : clusterAccessChecks.keySet()) { for (Operation op : clusterAccessChecks.get(r)) { check(rules, r, op, ns); } } } return status; } return null; } private  HealthCheckHelper(); static V1SubjectRulesReviewStatus performSecurityChecks(
      KubernetesVersion version, String operatorNamespace, String namespace); static boolean check(
      List<V1ResourceRule> rules, Resource res, Operation op); static KubernetesVersion performK8sVersionCheck();  }### Answer:
@Test public void whenRulesReviewSupported_accessGrantedForEverything() { expectSelfSubjectRulesReview(); for (String ns : TARGET_NAMESPACES) { HealthCheckHelper.performSecurityChecks(RULES_REVIEW_VERSION, OPERATOR_NAMESPACE, ns); } }
@Test public void whenRulesReviewSupportedAndNoNamespaceAccess_logWarning() { accessChecks.setMayAccessNamespace(false); expectSelfSubjectRulesReview(); for (String ns : TARGET_NAMESPACES) { HealthCheckHelper.performSecurityChecks(RULES_REVIEW_VERSION, OPERATOR_NAMESPACE, ns); } assertThat(logRecords, containsWarning(VERIFY_ACCESS_DENIED_WITH_NS)); }