@Test
public void testGet() throws Exception {

    queryStore.save(TestUtils.TEST_TABLE_NAME, TestUtils.getMappingDocuments(mapper));
    Thread.sleep(500);
    Set<FieldTypeMapping> mappings = new HashSet<FieldTypeMapping>();
    mappings.add(new FieldTypeMapping("word", FieldType.STRING));
    mappings.add(new FieldTypeMapping("data.data", FieldType.STRING));
    mappings.add(new FieldTypeMapping("header.hello", FieldType.STRING));
    mappings.add(new FieldTypeMapping("head.hello", FieldType.LONG));
    TableFieldMapping tableFieldMapping = new TableFieldMapping(TestUtils.TEST_TABLE_NAME, mappings);
    String response = client().resource(String.format("/v1/tables/%s/fields", TestUtils.TEST_TABLE_NAME))
            .get(String.class);
    TableFieldMapping mapping = mapper.readValue(response, TableFieldMapping.class);
    assertEquals(tableFieldMapping.getTable(), mapping.getTable());
    assertTrue(tableFieldMapping.getMappings().equals(mapping.getMappings()));
}