for (int i = 0; i < 20; i++) {
node.client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("number_of_shards", 10)).execute().actionGet();
node.client().prepareIndex("test", "type1").setSource("field", "test").execute().actionGet();
node.client().admin().indices().prepareRefresh().execute().actionGet();
SearchResponse searchResponse = node.client().prepareSearch("test").setQuery(QueryBuilders.termQuery("field", "test")).execute().actionGet();
assertThat(searchResponse.hits().totalHits(), equalTo(1l));
node.client().admin().indices().prepareDelete("test").execute().actionGet();