archivaConfigControl.reset();
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
configControl.reset();
configControl.expectAndReturn( config.getManagedRepositories(), Arrays.asList( managedRepo ), 1, 5 );
ManagedDefaultRepositoryContent repoContent = new ManagedDefaultRepositoryContent();
repoContent.setRepository( new BeanReplicator().replicateBean( managedRepo,
org.apache.archiva.admin.model.beans.ManagedRepository.class ) );
repoFactoryControl.expectAndReturn( repositoryFactory.getManagedRepositoryContent( "internal" ), repoContent );
List<ArtifactMetadata> artifacts = getArtifacts();
ArtifactMetadata artifact = artifacts.get( 0 );
metadataRepositoryControl.expectAndReturn(
metadataRepository.getArtifacts( repoContent.getId(), artifact.getNamespace(), artifact.getProject(),
artifact.getVersion() ), artifacts );
metadataRepository.removeArtifact( repoContent.getId(), artifact.getNamespace(), artifact.getProject(),
artifact.getVersion(), artifact.getId() );
listener.deleteArtifact( metadataRepository, repoContent.getId(), artifact.getNamespace(),
artifact.getProject(), artifact.getVersion(), artifact.getId() );
listenerControl.setVoidCallable( 1 );
archivaConfigControl.replay();
configControl.replay();