/** get returns the last value lazySet by same thread */ public void testGetLazySet() { AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest, Integer> a; try { a = AtomicReferenceFieldUpdater.newUpdater( AtomicReferenceFieldUpdaterTest.class, Integer.class, "x"); } catch (RuntimeException ok) { return; } x = one; assertSame(one, a.get(this)); a.lazySet(this, two); assertSame(two, a.get(this)); a.lazySet(this, m3); assertSame(m3, a.get(this)); }