SelectQuery q = new SelectQuery(ROPainting.class, e);
List<ROPainting> paints = context.performQuery(q);
assertEquals(1, paints.size());
ROPainting rop1 = paints.get(0);
assertNotNull(rop1.getToArtist());
// trigger fetch
rop1.getToArtist().getArtistName();
assertEquals(PersistenceState.COMMITTED, rop1.getToArtist().getPersistenceState());
}