throws Exception
{
fillInRepo();
((AbstractRepository)releases).setAccessManager(new OpenAccessManager());
targetRegistry.addRepositoryTarget(
new Target("test", "test", new Maven2ContentClass(), Lists.newArrayList(".*/org/sonatype/.*")));
targetRegistry.commitChanges();
ReleaseRemovalResult releaseRemovalResult =
releaseRemover.removeReleases(new ReleaseRemovalRequest(releases.getId(), 2, "test"));
assertThat(releaseRemovalResult.getDeletedFileCount(), is(6));
assertThat(releaseRemovalResult.isSuccessful(), is(true));