void clear() throws IOException {
      Request request = new Request("GET", "/_cat/indices/?h=index");
      String context = EntityUtils.toString(restClient().performRequest(request).getEntity());
      for (String index: context.split("\\n")) {
        restClient().performRequest(new Request("DELETE", "/" + index));
      }
    }
Delete all indexes for next test run
criteria/elasticsearch/test/org/immutables/criteria/elasticsearch/ElasticExtension.java