@Test
@Transactional
@Rollback(true)
public void save_existingEntity() {
JpaApplicationData applicationData = new JpaApplicationData(VALID_APPLICATION_DATA_ID, VALID_USER_ID,
VALID_APPLICATION_ID, new HashMap<String, Object>());
JpaApplicationData saved = (JpaApplicationData)repository.save(applicationData);
manager.flush();
assertThat(saved, is(not(sameInstance(applicationData))));
assertThat(saved.getEntityId(), is(equalTo(applicationData.getEntityId())));
}