@Override
  public void handle(HttpExchange httpExchange) throws IOException {
    Optional<Boolean> operatorsAreReady = areOperatorsStarted(operators);
    if (operatorsAreReady.isEmpty() || !operatorsAreReady.get()) {
      sendMessage(httpExchange, HTTP_BAD_REQUEST, "spark operators are not ready yet");
    }

    if (!passRbacCheck()) {
      sendMessage(
          httpExchange, HTTP_FORBIDDEN, "required rbac test failed, operators are not ready");
    }

    sendMessage(httpExchange, HTTP_OK, "started");
  }
@Test
  void testHandleSucceed() throws IOException {
    Operator operator = mock(Operator.class);
    Operator sparkConfMonitor = mock(Operator.class);
    RuntimeInfo runtimeInfo = mock(RuntimeInfo.class);
    RuntimeInfo sparkConfMonitorRuntimeInfo = mock(RuntimeInfo.class);
    when(operator.getRuntimeInfo()).thenReturn(runtimeInfo);
    when(runtimeInfo.isStarted()).thenReturn(true);
    when(sparkConfMonitor.getRuntimeInfo()).thenReturn(sparkConfMonitorRuntimeInfo);
    when(sparkConfMonitorRuntimeInfo.isStarted()).thenReturn(true);
    when(sparkConfMonitor.getKubernetesClient()).thenReturn(client);
    ReadinessProbe readinessProbe = new ReadinessProbe(Arrays.asList(operator));
    try (var mockedStatic = Mockito.mockStatic(ProbeUtil.class)) {
      readinessProbe.handle(httpExchange);
      mockedStatic.verify(() -> ProbeUtil.sendMessage(httpExchange, HTTP_OK, "started"));
    }
  }