&& emf.getConfiguration().getDataCacheManagerInstance()
.getSystemDataCache() != null;
}
public void createData() {
EmbeddingOwnerEntity owner = new EmbeddingOwnerEntity();
for (int i = 0; i < SIZE; i++) {
EmbeddedEntity member = new EmbeddedEntity();
member.setMarker("Member-" + i);
owner.addMember(member);
}
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
em.persist(owner);
em.getTransaction().commit();
Object id = OpenJPAPersistence.cast(em).getObjectId(owner);
em.clear();
EmbeddingOwnerEntity test = em.find(EmbeddingOwnerEntity.class, id);
assertNotNull(test);
List<EmbeddedEntity> members = test.getMembers();
assertNotNull(members);
assertEquals(SIZE, members.size());
for (int i = 0; i < SIZE; i++)
members.get(i).getMarker().equals("Member-" + i);
}