@Test
public void testRemoveData() throws Exception {

  ViewInstanceDataEntity entity = new ViewInstanceDataEntity();
  ViewInstanceDataEntity entity2 = new ViewInstanceDataEntity();
  // set expectations
  expect(entityManager.merge(eq(entity))).andReturn(entity2);
  entityManager.remove(eq(entity2));
  replay(entityManager);
  ViewInstanceDAO dao = new ViewInstanceDAO();
  dao.entityManagerProvider = entityManagerProvider;
  dao.removeData(entity);
  verify(entityManagerProvider, entityManager);
}