@Test
public void testGetDocument() throws Exception {

    String id = UUID.randomUUID()
            .toString();
    Document document = new Document(id, System.currentTimeMillis(), getMapper().getNodeFactory()
            .objectNode()
            .put("D", "data"));
    getQueryStore().save(TestUtils.TEST_TABLE_NAME, document);
    getElasticsearchConnection().refresh(ElasticsearchUtils.getIndices(TestUtils.TEST_TABLE_NAME));
    Document response = resources.client()
            .target(String.format("/v1/document/%s/%s", TestUtils.TEST_TABLE_NAME, id))
            .request()
            .get(Document.class);
    compare(document, response);
}