@Test
public void testReleasedSnapshotsWereCleaned()
throws Exception
{
KnownRepositoryContentConsumer repoPurgeConsumer =
applicationContext.getBean( "knownRepositoryContentConsumer#repo-purge-consumer-by-days-old",
KnownRepositoryContentConsumer.class );
ManagedRepository repoConfiguration = getRepoConfiguration( TEST_REPO_ID, TEST_REPO_NAME );
repoConfiguration.setDeleteReleasedSnapshots( true );
addRepoToConfiguration( "days-old", repoConfiguration );
repoPurgeConsumer.beginScan( repoConfiguration, null );
String repoRoot = prepareTestRepos();
repoPurgeConsumer.processFile(
CleanupReleasedSnapshotsRepositoryPurgeTest.PATH_TO_RELEASED_SNAPSHOT_IN_SAME_REPO );
String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-plugin-plugin";
// check if the snapshot was removed