private void cleanup() {
        securityContext.asProcessingUser(commonTestControl::cleanup);
        // We need to delete the contents of the temp dir here as it is the same for the whole of a test class.
        LOGGER.info("Deleting contents of {}", testTempDir);
        FileUtil.deleteContents(testTempDir);
        CURRENT_TEST_CLASS_THREAD_LOCAL.set(null);
        LOGGER.debug("Set CURRENT_TEST_CLASS_THREAD_LOCAL to null");
    }
Ensure final cleanup even if we aren't clearing between tests.
stroom-app/src/test/java/stroom/test/StroomIntegrationTest.java