StringWriter actualContents = new StringWriter();
ArchivaRepositoryMetadata metadata = RepositoryMetadataReader.read( actualFile );
RepositoryMetadataWriter.write( metadata, actualContents );
DetailedDiff detailedDiff = new DetailedDiff( new Diff( expectedMetadataXml, actualContents.toString() ) );
if ( !detailedDiff.similar() )
{
assertEquals( expectedMetadataXml, actualContents );
}
// assertEquals( "Check file contents.", expectedMetadataXml, actualContents );