@Test
  public void testTxRemoveAllNotColocated() {
    Host host = Host.getHost(0);
    VM acc = host.getVM(0);
    VM datastore1 = host.getVM(1);
    VM datastore2 = host.getVM(3);
    datastore2.invoke(new SerializableCallable<Object>() {
      @Override
      public Object call() {
        createRegion(false/* accessor */, 0, null);
        return null;
      }
    });
    initAccessorAndDataStore(acc, datastore1, 0);
    VM accessor = getVMForTransactions(acc, datastore1);

    final CustId custId0 = new CustId(0);
    final CustId custId1 = new CustId(1);
    final CustId custId2 = new CustId(2);
    final CustId custId3 = new CustId(3);
    final CustId custId4 = new CustId(4);
    final CustId custId20 = new CustId(20);
    final TXId txId = (TXId) accessor.invoke(new SerializableCallable<Object>() {
      @Override
      public Object call() {
        Region<CustId, Customer> cust = getCache().getRegion(CUSTOMER);
        Region<CustId, Customer> ref = getCache().getRegion(D_REFERENCE);
        TXManagerImpl mgr = getCache().getTxManager();
        mgr.begin();
        Customer customer = new Customer("customer1", "address1");
        Customer customer2 = new Customer("customer2", "address2");
        Customer fakeCust = new Customer("foo2", "bar2");
        assertThatThrownBy(() -> cust
            .removeAll(Arrays.asList(custId0, custId4, custId1, custId2, custId3, custId20)))
                .isInstanceOf(TransactionDataNotColocatedException.class);
        mgr.rollback();
        assertThat(cust.get(custId0)).isNotNull();
        assertThat(cust.get(custId1)).isNotNull();
        assertThat(cust.get(custId2)).isNotNull();
        assertThat(cust.get(custId3)).isNotNull();
        assertThat(cust.get(custId4)).isNotNull();
        return mgr.getTransactionId();
      }
    });
  }
Make sure that getEntry returns null properly and values when it should
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java