client.admin().cluster().prepareHealth().setWaitForGreenStatus().setWaitForActiveShards(4).execute().actionGet();
for (int i = 0; i < 10; i++) {
IndexResponse index = client.prepareIndex("test", "type1", Integer.toString(i)).setSource("field1", "value1")
.setPercolate("*").execute().actionGet();
assertThat(index.matches().size(), equalTo(1));
assertThat(index.matches(), hasItem("kuku"));
}
for (int i = 0; i < 10; i++) {
IndexResponse index = client.prepareIndex("test", "type1", Integer.toString(i)).setSource("field1", "value1")