icompany.setName("GooTube");
icompany.setFounded(new Date());
tx.begin();
pm.makePersistent(icompany);
LongIdentity ioid = (LongIdentity)pm.getObjectId(icompany);
tx.commit();
Class pICompanyOidTargetClass = ioid.getTargetClass();
if (pICompanyOidTargetClass != PICompany.class)
appendMessage(ASSERTION_FAILED +
" getObjectId(icompany) should return interface class.\n" +
"expected: " + icompany.getClass().getName() + "\n" +
"actual: " + pICompanyOidTargetClass.getName());