RefreshResponse refreshResponse = client1.admin().indices().prepareRefresh("test").execute().actionGet();
assertThat(refreshResponse.successfulShards(), equalTo(10));
assertThat(refreshResponse.failedShards(), equalTo(0));
logger.info("--> index exists?");
IndicesExistsResponse indicesExistsResponse = client1.admin().indices().prepareExists(getConcreteIndexName()).execute().actionGet();
assertThat(indicesExistsResponse.exists(), equalTo(true));
logger.info("--> index exists?, fake index");
indicesExistsResponse = client1.admin().indices().prepareExists("test1234565").execute().actionGet();
assertThat(indicesExistsResponse.exists(), equalTo(false));
logger.info("Clearing cache");
ClearIndicesCacheResponse clearIndicesCacheResponse = client1.admin().indices().clearCache(clearIndicesCacheRequest("test")).actionGet();
assertThat(clearIndicesCacheResponse.successfulShards(), equalTo(10));
assertThat(clearIndicesCacheResponse.failedShards(), equalTo(0));