Collection result = (Collection) query.execute(new Integer(20));
if (result.size() != 1) {
fail(ASSERTION_FAILED + "Query returned " + result.size() +
" instances, expected size is " + 1);
}
PCClass pcClass = (PCClass) result.iterator().next();
int transient1 = pcClass.getTransientNumber1();
int transient2 = pcClass.getTransientNumber2();
boolean field1loaded = transient1 == 20;
boolean field2loaded = transient2 == 20;
transaction.commit();
if (!field1loaded || !field2loaded) {