@Test
public void testRemove() throws Exception {

  Provider<EntityManager> entityManagerProvider =  createNiceMock(Provider.class);
  EntityManager entityManager = createNiceMock(EntityManager.class);
  HostDAO hostDAO = createNiceMock(HostDAO.class);
  HostEntity hostEntity = createNiceMock(HostEntity.class);
  HostComponentStateEntity hostComponentStateEntity = createNiceMock(HostComponentStateEntity.class);
  expect(entityManagerProvider.get()).andReturn(entityManager).anyTimes();
  entityManager.remove(hostComponentStateEntity);
  replay(entityManagerProvider, entityManager, hostDAO, hostEntity, hostComponentStateEntity);
  HostComponentStateDAO dao = new HostComponentStateDAO();
  dao.entityManagerProvider = entityManagerProvider;
  dao.hostDAO = hostDAO;
  dao.remove(hostComponentStateEntity);
  verify(entityManagerProvider, entityManager, hostDAO, hostEntity, hostComponentStateEntity);
}