public void initData() {
// Revision 1
EntityManager em = getEntityManager();
em.getTransaction().begin();
DefaultValueComponentTestEntity cte0 = DefaultValueComponentTestEntity
.of(null);
DefaultValueComponentTestEntity cte1 = DefaultValueComponentTestEntity
.of(DefaultValueComponent1.of("c1-str1", null));
DefaultValueComponentTestEntity cte2 = DefaultValueComponentTestEntity
.of(DefaultValueComponent1.of("c1-str1", DefaultValueComponent2
.of("c2-str1", "c2-str2")));
DefaultValueComponentTestEntity cte3 = DefaultValueComponentTestEntity
.of(DefaultValueComponent1.of(null, DefaultValueComponent2.of(
"c2-str1", "c2-str2")));
DefaultValueComponentTestEntity cte4 = DefaultValueComponentTestEntity
.of(DefaultValueComponent1.of(null, DefaultValueComponent2.of(
null, "c2-str2")));
DefaultValueComponentTestEntity cte5 = DefaultValueComponentTestEntity
.of(DefaultValueComponent1.of(null, DefaultValueComponent2.of(
"c2-str1", null)));
DefaultValueComponentTestEntity cte6 = DefaultValueComponentTestEntity
.of(DefaultValueComponent1.of(null, DefaultValueComponent2.of(
null, null)));
em.persist(cte0);
em.persist(cte1);
em.persist(cte2);
em.persist(cte3);
em.persist(cte4);
em.persist(cte5);
em.persist(cte6);
em.getTransaction().commit();
// Revision 2
em = getEntityManager();
em.getTransaction().begin();
cte0 = em.find(DefaultValueComponentTestEntity.class, cte0.getId());
cte1 = em.find(DefaultValueComponentTestEntity.class, cte1.getId());
cte2 = em.find(DefaultValueComponentTestEntity.class, cte2.getId());
cte3 = em.find(DefaultValueComponentTestEntity.class, cte3.getId());
cte4 = em.find(DefaultValueComponentTestEntity.class, cte4.getId());
cte5 = em.find(DefaultValueComponentTestEntity.class, cte5.getId());
cte6 = em.find(DefaultValueComponentTestEntity.class, cte6.getId());
cte0.setComp1(DefaultValueComponent1.of("upd-c1-str1", null));
cte1.setComp1(DefaultValueComponent1.of(null, DefaultValueComponent2
.of("upd-c2-str1", "upd-c2-str2")));
cte2.getComp1().getComp2().setStr1("upd-c2-str1");
cte3.getComp1().getComp2().setStr1("upd-c2-str1");
cte4.getComp1().getComp2().setStr1("upd-c2-str1");
cte5.getComp1().getComp2().setStr1("upd-c2-str1");
cte6.getComp1().getComp2().setStr1("upd-c2-str1");
em.getTransaction().commit();
// afterwards
id0 = cte0.getId();
id1 = cte1.getId();
id2 = cte2.getId();
id3 = cte3.getId();
id4 = cte4.getId();
id5 = cte5.getId();
id6 = cte6.getId();
}