@Override
      public Object call() {
        CacheTransactionManager mgr = getCache().getTXMgr();
        PartitionedRegion pr = (PartitionedRegion) getCache().getRegion(CUSTOMER);
        CustId keyOnDs1 = getKeyOnMember(ds1, pr);
        CustId keyOnDs2 = getKeyOnMember(ds2, pr);
        mgr.begin();
        pr.get(keyOnDs1);// bootstrap txState
        Set filter = new HashSet();
        filter.add(keyOnDs2);
        assertThatThrownBy(() -> FunctionService.onRegion(pr).withFilter(filter)
            .execute(TXFunction.id).getResult())
                .isInstanceOf(TransactionDataRebalancedException.class);
        assertThatThrownBy(() -> FunctionService.onMember(ds2).execute(TXFunction.id).getResult())
            .isInstanceOf(TransactionDataNotColocatedException.class);
        mgr.commit();
        return null;
      }
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