private void createRegionWithBadCacheLoader(Properties properties) {
    final Cache cache = cacheRule.getOrCreateCache(properties);
    final Region<String, Object> testRegion =
        cache.<String, Object>createRegionFactory(RegionShortcut.PARTITION)
            .setCacheLoader(helper -> {
              throw new NotSerializableTestException();
            })
            .create(TEST_REGION);
    testRegion.put(TEST_KEY, TEST_VALUE);
    testRegion.destroy(TEST_KEY);
  }
Ensure that a cache loader throwing an exception that is not serializable is handled
correctly
geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/BadCacheLoaderDUnitTest.java