throws LayoutException, IOException, SAXException, ParserConfigurationException
{
File metadataFile = new File( repository.getRepoRoot(), tools.toPath( reference ) );
String actualMetadata = FileUtils.readFileToString( metadataFile, null );
DetailedDiff detailedDiff = new DetailedDiff( new Diff( expectedMetadata, actualMetadata ) );
if ( !detailedDiff.similar() )
{
// If it isn't similar, dump the difference.
assertEquals( expectedMetadata, actualMetadata );
}
}