3031323334353637383940
return factory; } public ObjectifyPersister ofy() { ObjectifyPersister result = holder.get(); if (result == null) { result = fact().begin(opts); holder.set(result); }
347348349350351352353354355356357
} @Test public void testSync() { ObjectifyPersister async = asyncPersiter.sync(); assertNotNull(async); assertTrue(async instanceof ObjectifyPersister); }
373839404142434445464748
} @Test public void testOfy() { ObjectifyPersister fact1 = dao.ofy(); ObjectifyPersister fact2 = dao.ofy(); assertNotNull(fact1); assertNotNull(fact2); assertSame(fact1, fact2);