@Test
public void testLog4JDbOverrideConfigurationClob() throws Exception
{

    Path configPath = getRandomLog4jConfigPath();
    Path outputPath = getRandomLog4jOutputPath();
    String configKey = null;
    try
    {
        // Create a random configuration key to use when inserting the Log4J configuration into the database.
        configKey = ConfigurationValue.LOG4J_OVERRIDE_CONFIGURATION.getKey() + UUID.randomUUID().toString().substring(0, 5);
        // Insert the Log4J configuration into the database using the CLOB column.
        insertDbLog4JConfigurationFromResourceLocation(LOG4J_CONFIG_FILENAME, 0, outputPath, ConfigurationEntity.COLUMN_VALUE_CLOB, configKey);
        // Shutdown the previously configured logging so we can reinitialize it below.
        loggingHelper.shutdownLogging();
        // Setup the Log4J overridable configurer to use the database location - using the standard CLOB column.
        Log4jOverridableConfigurer log4jConfigurer = getLog4jOverridableConfigurerForDb(configKey);
        log4jConfigurer.postProcessBeforeInitialization(null, null);
        // The database override location does exist and should create a log file.
        assertTrue("Log4J output file doesn't exist, but should.", Files.exists(outputPath));
    }
    finally
    {
        cleanup(configPath, outputPath);
        deleteDbLog4JConfiguration(configKey);
    }
}