@Test
public void getAllFields() throws Exception {

    doNothing().when(getQueryStore())
            .initializeTable(any(String.class));
    getQueryStore().save(TestUtils.TEST_TABLE_NAME, TestUtils.getMappingDocuments(getMapper()));
    await().pollDelay(500, TimeUnit.MILLISECONDS).until(() -> true);
    Map<String, TableFieldMapping> response = resources.client()
            .target("/v1/tables/fields")
            .request()
            .get(new GenericType<Map<String, TableFieldMapping>>() {
            });
    //System.out.println(new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response));
    Assert.assertFalse(response.isEmpty());
    Assert.assertEquals(1, response.size());
    Assert.assertTrue(response.containsKey(TestUtils.TEST_TABLE_NAME));
}