class AbstractDao implements CrudDao<T, ID> {

  public ID getId(Object key) {
    return mapper.fromKey(key);
  }

}

class AbstractDaoTest {

  public static final String PRINCIPAL_FIXTURE;
  public static final String PRINCIPAL_SET_UP;
  protected DUserDaoBean userDao;
  protected DFactoryDaoBean factoryDao;
  protected Supplier supplier;

  @Test
  public void testFindUniqueByField() throws IOException {

    createQueryFixtures();

    DUser u47 = userDao.findByEmail(null);
    assertNull(u47);

    u47 = userDao.findByEmail("user_47@example.com");
    assertEquals(Long.valueOf(47), u47.getId());
    assertEquals("user_47@example.com", u47.getEmail());
  }

}