public void addAndDeleteLegacyPath()
throws Exception
{
int initialSize = archivaAdministration.getLegacyArtifactPaths().size();
LegacyArtifactPath legacyArtifactPath = new LegacyArtifactPath( "foo", "bar" );
archivaAdministration.addLegacyArtifactPath( legacyArtifactPath, getFakeAuditInformation() );
assertTrue( archivaAdministration.getLegacyArtifactPaths().contains( new LegacyArtifactPath( "foo", "bar" ) ) );
assertEquals( initialSize + 1, archivaAdministration.getLegacyArtifactPaths().size() );
archivaAdministration.deleteLegacyArtifactPath( legacyArtifactPath.getPath(), getFakeAuditInformation() );
assertFalse(
archivaAdministration.getLegacyArtifactPaths().contains( new LegacyArtifactPath( "foo", "bar" ) ) );
assertEquals( initialSize, archivaAdministration.getLegacyArtifactPaths().size() );
mockAuditListener.clearEvents();
}