private void handleEvent(Object argument) throws CacheWriterException {

        if (exception.equals(argument)) {
          String s = "Test Exception";
          throw new CacheWriterException(s);
        }
      }
Tests that a {@link CacheWriter} throwing a {@link CacheWriterException} aborts the operation.
geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheWriterTestCase.java