@Test
public void testStoreAll() 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);
    MultiGetResponse response = elasticsearchConnection.getClient()
            .prepareMultiGet()
            .add(TABLE_META_INDEX, TABLE_META_TYPE, tables.keySet())
            .execute()
            .actionGet();
    Map<String, Table> responseTables = Maps.newHashMap();
    for (MultiGetItemResponse multiGetItemResponse : response) {
        Table table = mapper.readValue(multiGetItemResponse.getResponse().getSourceAsString(), Table.class);
        responseTables.put(table.getName(), table);
    }
    for (String name : tables.keySet()) {
        compareTables(tables.get(name), responseTables.get(name));
    }
}