@Test
public void testDeleteAll() throws Exception {

    Map<String, Table> tables = new HashMap<String, Table>();
    for (int i = 0; i < 10; i++) {
        Table table = new Table();
        table.setName(UUID.randomUUID().toString());
        table.setTtl(20);
        tables.put(table.getName(), table);
    }
    tableMapStore.storeAll(tables);
    for (String name : tables.keySet()) {
        GetResponse response = elasticsearchConnection.getClient().prepareGet()
                .setIndex(TABLE_META_INDEX)
                .setType(TABLE_META_TYPE)
                .setId(name)
                .execute()
                .actionGet();
        assertTrue(response.isExists());
    }
    tableMapStore.deleteAll(tables.keySet());
    for (String name : tables.keySet()) {
        GetResponse response = elasticsearchConnection.getClient().prepareGet()
                .setIndex(TABLE_META_INDEX)
                .setType(TABLE_META_TYPE)
                .setId(name)
                .execute()
                .actionGet();
        assertFalse(response.isExists());
    }
}