@Test
  public void createPrWithEntryTimeToLiveLocalInvalidateThrows() throws Exception {
    attributesFactory.setEntryTimeToLive(new ExpirationAttributes(1000, LOCAL_INVALIDATE));

    assertThatThrownBy(() -> cache.createRegion("region1", attributesFactory.create()))
        .isInstanceOf(IllegalStateException.class);
  }
PRWithLocalExpirationRegressionTest

TRAC #40632: PR expiration with localDestroy fails with InternalGemFireError
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/CreatePRWithLocalExpirationRegressionTest.java