"select from " + pojoClass.getName() + " b where id = :key");
q.setParameter("key", KeyFactory.keyToString(pojoEntity.getKey()));
@SuppressWarnings("unchecked")
List<HasOneToManyJPA> result = (List<HasOneToManyJPA>) q.getResultList();
assertEquals(1, result.size());
HasOneToManyJPA pojo = result.get(0);
assertNotNull(pojo.getUnidirChildren());
assertEquals(1, pojo.getUnidirChildren().size());
assertEquals(unidirLevel.clazz, pojo.getUnidirChildren().iterator().next().getClass());
assertEquals("name", pojo.getUnidirChildren().iterator().next().getName());
assertEquals(1, pojo.getUnidirChildren().size());
assertNotNull(pojo.getHasKeyPks());
assertEquals(1, pojo.getHasKeyPks().size());
assertEquals("yar", pojo.getHasKeyPks().iterator().next().getStr());
assertNotNull(pojo.getBidirChildren());
assertEquals(1, pojo.getBidirChildren().size());
assertEquals(bidirClass, pojo.getBidirChildren().iterator().next().getClass());
assertEquals("yap", pojo.getBidirChildren().iterator().next().getChildVal());
assertEquals(pojo, pojo.getBidirChildren().iterator().next().getParent());
startEnd.end();
}