@Test
public void testCheckUniqueField() throws Exception {

    populateSampleData();
    assertTrue(dao.checkUniqueField("email", "email", "new@example.com", null));
    assertFalse(dao.checkUniqueField("email", "email", "bob@example.com", null));
    TestModel bob = dao.loadByIndex("email", "email", "bob@example.com");
    assertTrue(dao.checkUniqueField("email", "email", "bob@exmaple.com", bob.getId()));
}