@Override
      public void run() {
        try {
          Cache cache = new CacheFactory().create();
          RegionFactory regionFactory = cache.createRegionFactory(new AttributesFactory().create());
          LocalRegion region = (LocalRegion) regionFactory.create("region1");
          assertThat(region).isNotNull();
        } catch (CacheException ex) {
          fail("While creating region", ex);
        }
      }
Don't do this! Catch Exception and invoke fail => anti-pattern
geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/examples/CatchingUnexpectedExceptionExampleTest.java