@Override
    public void reset() {
        try {
            CountDownLatch latch = new CountDownLatch(1);

            // Important! Or will get cached client that assumes the DB schema has already been created
            // and subtly horrible things will happen, and you'll waste a whole day debugging it! :-)
            DefaultEsClientFactory.clearClientCache();

            final RestHighLevelClient client = super.getClient();
            deleteIndices(client, latch);

            client.indices().flush(new FlushRequest(), RequestOptions.DEFAULT);

            latch.await();
        } catch (IOException | InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
Reset the ES index simply by deleting it. For testing purposes.

@author Marc Savy {@literal <msavy@redhat.com>}
gateway/test/src/test/java/io/apiman/gateway/test/junit/vertx3/EsResetter.java