@Test
public void testCount() throws Exception {

    EsRequest doc = new EsRequest();
    doc.put("field1", "value1");
    assertTrue(client.storeDocument(INDEX_NAME, TYPE_NAME, "10", doc));
    Thread.sleep(1500);
    long count = client.count(INDEX_NAME, TYPE_NAME);
    assertEquals(1, count);
}