jpaEntity.setTable(table);
jpaEntity.setPostLoad(new JpaLifecycleCallback("xpl2"));
jpaEntity.setPreRemove(new JpaLifecycleCallback("xpr2"));
jpaMap.getEntities().add(jpaEntity);
JpaEntityListeners listeners = new JpaEntityListeners();
jpaEntity.setEntityListeners(listeners);
JpaEntityListener l1 = new JpaEntityListener();
l1.setClassName("abc.C1");
l1.setPostLoad(new JpaLifecycleCallback("xpl1"));
l1.setPreRemove(new JpaLifecycleCallback("xpr1"));
listeners.getEntityListeners().add(l1);
JpaEntityListener l2 = new JpaEntityListener();
l2.setClassName("abc.C2");
l2.setPostLoad(new JpaLifecycleCallback("xpl2"));
l2.setPreRemove(new JpaLifecycleCallback("xpr2"));
listeners.getEntityListeners().add(l2);
DataMap cayenneMap = new DataMapConverter().toDataMap("n1", context);
ObjEntity entity = cayenneMap.getObjEntity("E1");
assertNotNull(entity);