@Test
public void lazy_st() throws Exception {
PersistenceSession session = persistenceManager.createSession();
try {
StInheritA instA = new StInheritA();
instA.setId(1);
instA.setInhA(Arrays.asList("one", "two", "three"));
session.insert(instA);
StInheritB instB = new StInheritB();
instB.setId(2);
instB.setInhB(new HashSet<String>(Arrays.asList("one", "two", "three")));
session.insert(instB);
StInheritB2 instB2 = new StInheritB2();
instB2.setId(3);
instB2.setInhB2(Arrays.asList("one", "two", "three"));
session.insert(instB2);
StInheritC instC = new StInheritC();
instC.setId(4);
instC.setInhC(new HashMap<String, String>());
instC.getInhC().put("one", "1");
instC.getInhC().put("two", "2");
instC.getInhC().put("three", "3");
session.insert(instC);
StInheritA loadedA = (StInheritA) session.loadOne(StBaseEntity.class, 1);
Assert.assertTrue(loadedA.getInhA() instanceof LazyList);
Assert.assertEquals(loadedA.getInhA(), Arrays.asList("one", "two", "three"));
loadedA = session.loadOne(StInheritA.class, 1);
Assert.assertTrue(loadedA.getInhA() instanceof LazyList);
Assert.assertEquals(loadedA.getInhA(), Arrays.asList("one", "two", "three"));
StInheritB loadedB = (StInheritB) session.loadOne(StBaseEntity.class, 2);
Assert.assertTrue(loadedB.getInhB() instanceof LazySet);
Assert.assertEquals(loadedB.getInhB(), new HashSet<String>(Arrays.asList("one", "two", "three")));
loadedB = session.loadOne(StInheritB.class, 2);