assertThat(pushApplicationDao.findByPushApplicationID(pushApplicationID1).getPushApplicationID()).isEqualTo(pushApplicationID1);
}
@Test
public void primaryKeyUnmodifiedAfterUpdate() {
PushApplication pushApplication1 = new PushApplication ();
pushApplication1.setName("Push App 1");
final String id = pushApplication1.getId();
pushApplicationDao.create(pushApplication1);
// flush to be sure that it's in the database
entityManager.flush();
// clear the cache otherwise finding the entity will not perform a select but get the entity from cache
entityManager.clear();
PushApplication pa = pushApplicationDao.find(id);
assertThat(pa.getId()).isEqualTo(id);
pushApplication1.setName("Cool Push App 1");
pushApplicationDao.update(pushApplication1);
entityManager.flush();
entityManager.clear();
pa = pushApplicationDao.find(id);
assertThat(pa.getName()).isEqualTo("Cool Push App 1");
}