@Test public void testGetInitialized() throws Exception { int n = 5; long id = ejb.create(n); A a = ejb.getInitialized(id); assertNotNull(a); assertEquals(5, a.getList().size()); for(int i=0; i<a.getList().size(); i++){ assertNotNull(a.getList().get(i).getId()); } }
public A getInitialized(long id){ A a = em.find(A.class, id); if(a == null){ return null; } a.getList().size(); return a; }
Ejb { public A getInitialized(long id){ A a = em.find(A.class, id); if(a == null){ return null; } a.getList().size(); return a; } }
Ejb { public A getInitialized(long id){ A a = em.find(A.class, id); if(a == null){ return null; } a.getList().size(); return a; }  }
Ejb { public A getInitialized(long id){ A a = em.find(A.class, id); if(a == null){ return null; } a.getList().size(); return a; }  Long create(int n); A getLazy(long id); A getInitialized(long id); A getWrongInitialized(long id); A getInitializedWithHibernate(long id); }
Ejb { public A getInitialized(long id){ A a = em.find(A.class, id); if(a == null){ return null; } a.getList().size(); return a; }  Long create(int n); A getLazy(long id); A getInitialized(long id); A getWrongInitialized(long id); A getInitializedWithHibernate(long id);  }