DefaultConfiguration config = new DefaultConfiguration("root", "");
config.setAttribute( "attribute", "value" );
File file = new File( testDirectory, "DefaultConfigurationSerializerTestCase.xml" );
DefaultConfigurationSerializer serializer = new DefaultConfigurationSerializer();
serializer.serializeToFile( file, config );
//
// This will not work if the serializeToFile method keeps the stream open.
//
assertTrue( testDirectory.renameTo( testDirectory2 ) );