@Test
public void testFindByQuery() throws Exception {

    TestUser created1 = dao.create(TestUser.builder().name("Ian").email("ian1@example.com").build());
    TestUser created2 = dao.create(TestUser.builder().name("Ian").email("ian2@example.com").build());
    Results<TestUser,ObjectId> results = dao.findByQuery(new Document("name", "Ian"), new Document("email", -1));
    assertEquals(2, results.getData().size());
    assertEquals(created2, results.getData().get(0));
    assertEquals(created1, results.getData().get(1));
}