code: public static boolean isClusterRunning(String clusterName, int instanceCount, int httpPort)
      {
          Log log = Mockito.mock(Log.class);
          
          try (ElasticsearchClient client = new ElasticsearchClient.Builder()
                  .withLog(log)
                  .withHostname("localhost")
                  .withPort(httpPort)
                  .withSocketTimeout(5000)
                  .build())
          {
              return isClusterRunning(clusterName, instanceCount, client);
          }
      }
docs: Verify that the cluster name and the number of nodes in the cluster,
  as reported by the ES node, is as expected.
  @param clusterName the ES cluster name
  @param instanceCount the number of ES nodes in the cluster
  @param httpPort the HTTP port to connect to ES
  @return true if the cluster is running, false otherwise