@Override
      public Object call() {
        PartitionedRegion pr = (PartitionedRegion) getCache().getRegion(CUSTOMER);
        // get owner for expectedKey
        DistributedMember owner = pr.getOwnerForKey(pr.getKeyInfo(expectedCustId));
        // get key on datastore1
        CustId keyOnOwner = null;
        keyOnOwner = getKeyOnMember(owner, pr);

        TXManagerImpl mgr = getCache().getTXMgr();
        mgr.begin();
        // bootstrap tx on owner
        pr.get(keyOnOwner);
        Set<DistributedMember> members = new HashSet<>();
        members.add(ds1);
        members.add(ds2);
        assertThatThrownBy(
            () -> FunctionService.onMembers(members).execute(TXFunction.id).getResult())
                .isInstanceOf(TransactionException.class);
        FunctionService.onMember(owner).execute(TXFunction.id).getResult();
        assertThat(expectedCustomer).isEqualTo(pr.get(expectedCustId));
        TXStateProxy tx = mgr.pauseTransaction();
        assertThat(pr.get(expectedCustId)).isNull();
        mgr.unpauseTransaction(tx);
        return mgr.suspend();
      }
When we have narrowed down on a target node for a transaction, test that we throw an exception
if that node does not host primary for subsequent entries
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java