@Override
      public Object call() {
        TXManagerImpl mgr = getCache().getTXMgr();
        custRegion = (PartitionedRegion) getCache().getRegion(CUSTOMER);
        mgr.begin();
        doLocalOp();
        Set expectedSet;
        switch (iteratorType) {
          case KEYS:
            expectedSet = getExpectedCustIdSet();
            assertThat(expectedSet).isEqualTo(custRegion.keySet());
            assertThat(expectedSetSize).isEqualTo(custRegion.keySet().size());
            break;
          case VALUES:
            expectedSet = getExpectedCustomerSet();
            assertThat(expectedSet).isEqualTo(custRegion.values());
            assertThat(expectedSetSize).isEqualTo(custRegion.values().size());
            break;
          case ENTRIES:
            Set originalKeySet = getExpectedCustIdSet();
            Set originalValueSet = getExpectedCustomerSet();
            Set entrySet = new HashSet();
            Region.Entry entry;
            for (final Object value : custRegion.entrySet()) {
              entrySet.add(value);
            }
            for (final Object o : entrySet) {
              entry = (Entry) o;
              assertThat(originalKeySet.contains(entry.getKey())).isTrue();
              assertThat(originalValueSet.contains(entry.getValue())).isTrue();
            }
            assertThat(expectedSetSize).isEqualTo(custRegion.entrySet().size());
            break;
          default:
            throw new IllegalArgumentException();
        }
        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