@Override
      public Object call() {
        Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
        Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
        CacheTransactionManager mgr = getCache().getTxManager();
        mgr.begin();
        assertThatThrownBy(() -> put10Entries(custRegion, orderRegion))
            .isInstanceOf(TransactionDataNotColocatedException.class);
        mgr.rollback();
        put10Entries(custRegion, orderRegion);

        mgr.begin();

        assertThatThrownBy(() -> put10Entries(custRegion, orderRegion))
            .isInstanceOf(TransactionDataNotColocatedException.class);
        mgr.rollback();
        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