@Test
  public void testBug51781() {
    AttributesFactory<Integer, String> af = new AttributesFactory<>();
    af.setDataPolicy(DataPolicy.NORMAL);
    Region<Integer, String> r = cache.createRegion(getUniqueName(), af.create());
    CacheTransactionManager mgr = cache.getCacheTransactionManager();
    r.put(1, "value1");
    r.put(2, "value2");
    assertEquals(2, r.size());
    mgr.begin();
    r.put(3, "value3");
    r.destroy(3);
    mgr.commit();
    assertEquals(2, r.size());
  }
make sure that we throw an UnsupportedOperationInTransactionException
geode-core/src/integrationTest/java/org/apache/geode/TXJUnitTest.java