// check underlying cache
assertNull(context.getObjectStore().getDataRowCache().getCachedSnapshot(
painting1.getObjectId()));
// check peer artist
ThreadedTestHelper helper = new ThreadedTestHelper() {
@Override
protected void assertResult() throws Exception {
assertEquals(PersistenceState.TRANSIENT, altPainting1
.getPersistenceState());
assertEquals(PersistenceState.COMMITTED, altArtist.getPersistenceState());
Collection list = altArtist.getPaintingArray();
assertEquals(1, list.size());
assertFalse(list.contains(altPainting1));
}
};
helper.assertWithTimeout(3000);
}