@Test
  @Parameters({"LOCAL_DESTROY", "LOCAL_INVALIDATE"})
  @TestCaseName("{method}({params})")
  public void createAndLocalOpShouldCreateEventWithNewValue(final LocalOperation operation) {
    otherVM.invoke(() -> {
      CacheTransactionManager transactionManager =
          cacheRule.getCache().getCacheTransactionManager();
      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);

      transactionManager.begin();
      try {
        region.create(KEY, VALUE);

        assertThatThrownBy(() -> operation.invoke(region))
            .isInstanceOf(UnsupportedOperationInTransactionException.class)
            .hasMessage(operation.getMessage());
      } finally {
        transactionManager.commit();
      }
    });

    Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
    Entry<String, String> entry = region.getEntry(KEY);

    assertThat(entry.getValue()).isEqualTo(VALUE);

    ArgumentCaptor<EntryEvent<String, String>> argument = ArgumentCaptor.forClass(EntryEvent.class);
    verify(spyCacheListener, times(1)).afterCreate(argument.capture());

    EntryEvent<String, String> event = argument.getValue();
    assertThat(event.getKey()).isEqualTo(KEY);
    assertThat(event.getNewValue()).isEqualTo(VALUE);
  }
Create and LocalDestroy/LocalInvalidate should create event with NewValue

<p>
TRAC #34387: TX in Proxy Regions with create followed by localDestroy on same key results in
remote VMs receiving create events with null getNewValue().

@since GemFire 5.0
geode-core/src/distributedTest/java/org/apache/geode/cache/CreateAndLocalDestroyInTXRegressionTest.java