@Test
public void testFindById() throws Exception {

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