@Override
      public void run() {
        Region region = getRootRegion(regionName);
        MyCacheWriter writer = (MyCacheWriter) region.getAttributes().getCacheWriter();
        region.put("a", "a");
        region.put("b", "b");
        region.put("c", "c");
        region.destroy("c");
        writer.throwException = true;
        try {
          region.put("a", "new-a");
          fail("Should have gotten a cache writer exception");
        } catch (CacheWriterException e) {
          assertEquals("beforeUpdate", e.getMessage());
        }
        try {
          region.destroy("b");
          fail("Should have gotten a cache writer exception");
        } catch (CacheWriterException e) {
          assertEquals("beforeDestroy", e.getMessage());
        }
        try {
          region.put("d", "d");
          fail("Should have gotten a cache writer exception");
        } catch (CacheWriterException e) {
          assertEquals("beforeCreate", e.getMessage());
        }
        try {
          region.clear();
          fail("Should have gotten a cache writer exception");
        } catch (CacheWriterException e) {
          assertEquals("beforeRegionClear", e.getMessage());
        }
        try {
          region.destroyRegion();
          fail("Should have gotten a cache writer exception");
        } catch (CacheWriterException e) {
          assertEquals("beforeRegionDestroy", e.getMessage());
        }
      }
Test the we can have both a connection pool and a cache writer.

The expected order of operations for put is: local writer put on server
geode-core/src/distributedTest/java/org/apache/geode/cache/ConnectionPoolAndLoaderDUnitTest.java