@Test
public void testFindById() throws Exception {

  ResourceEntity entity = new ResourceEntity();
  // set expectations
  expect(entityManager.find(ResourceEntity.class, 99L)).andReturn(entity);
  replay(entityManager);
  ResourceDAO dao = new ResourceDAO();
  dao.entityManagerProvider = entityManagerProvider;
  Assert.assertEquals(entity, dao.findById(99L));
}