@Override
      public Object call() {
        TXManagerImpl mgr = getCache().getTxManager();
        mgr.begin();
        Region<CustId, Customer> cust = getCache().getRegion(CUSTOMER);
        Region<CustId, Customer> rr = getCache().getRegion(D_REFERENCE);
        Customer expectedCust = new Customer("customer" + 1, "address" + 1);
        getCache().getLogger().fine("SWAP:doingPutIfAbsent");
        CustId oldCustId = new CustId(1);
        Customer old = cust.putIfAbsent(oldCustId, updateCust);
        assertThat(expectedCust).as("expected:" + expectedCust + " but was " + old)
            .isEqualTo(old);
        // transaction should be bootstrapped
        old = rr.putIfAbsent(oldCustId, updateCust);
        assertThat(expectedCust).as("expected:" + expectedCust + " but was " + old).isEqualTo(old);
        // now a key that does not exist
        old = cust.putIfAbsent(newCustId, updateCust);
        assertThat(old).isNull();
        old = rr.putIfAbsent(newCustId, updateCust);
        assertThat(old).isNull();
        Region<OrderId, Order> order = getCache().getRegion(ORDER);
        Order oldOrder = order.putIfAbsent(new OrderId(10, newCustId), new Order("order10"));
        assertThat(old).isNull();
        assertThat(oldOrder).isNull();
        assertThat(cust.get(newCustId)).isNotNull();
        assertThat(rr.get(newCustId)).isNotNull();
        TXStateProxy tx = mgr.pauseTransaction();
        assertThat(cust.get(newCustId)).isNull();
        assertThat(rr.get(newCustId)).isNull();
        mgr.unpauseTransaction(tx);
        cust.put(oldCustId, new Customer("foo", "bar"));
        rr.put(oldCustId, new Customer("foo", "bar"));
        return mgr.suspend();
      }
Make sure that getEntry returns null properly and values when it should
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java