@BeforeEach
    @AfterEach
    public void clearCacheFactory() {
        Cache[] caches = CacheFactory.getAllCaches();
        for (Cache cache: caches) {
            CacheFactory.destroyCache(cache.getName());
        }
    }
Clear the CacheFactory before and after each test to prevent leaky tests
xmppserver/src/test/java/org/jivesoftware/util/cache/CacheFactoryConfigTest.java