@Test
public void testSaveDocument() throws Exception {

    String id = UUID.randomUUID()
            .toString();
    Document document = new Document(id, System.currentTimeMillis(), getMapper().getNodeFactory()
            .objectNode()
            .put("hello", "world"));
    Entity<Document> documentEntity = Entity.json(document);
    resources.client()
            .target("/v1/document/" + TestUtils.TEST_TABLE_NAME)
            .request()
            .post(documentEntity);
    getElasticsearchConnection().refresh(ElasticsearchUtils.getIndices(TestUtils.TEST_TABLE_NAME));
    Document response = getQueryStore().get(TestUtils.TEST_TABLE_NAME, id);
    compare(document, response);
}