try {
pm = getPM();
pm.currentTransaction().begin();
// create the oid
Object wrongOid = new LongIdentity(PartTimeEmployee.class, id);
PartTimeEmployee wrongInstance =
(PartTimeEmployee)pm.getObjectById(wrongOid, false);
wrongInstance.toString();
appendMessage(ASSERTION_FAILED + " getObjectById exact "
+ "for wrong class must throw JDOUserException.");
} catch (JDOException ex) {
// good catch
}