}
public void testDeleteRemoteRepository()
throws RegistryException, IndeterminateConfigurationException
{
Configuration configuration = createConfigurationForEditing( createRepository() );
configuration.addManagedRepository( createManagedRepository( "internal", getTestPath( "target/repo/internal" ) ) );
configuration.addManagedRepository( createManagedRepository( "snapshots", getTestPath( "target/repo/snapshots" ) ) );
configuration.addProxyConnector( createProxyConnector( "internal", REPO_ID) );
archivaConfiguration.getConfiguration();
archivaConfigurationControl.setReturnValue( configuration, 4 );
archivaConfiguration.save( configuration );
archivaConfigurationControl.replay();
action.setRepoid( REPO_ID );
action.prepare();
assertEquals( REPO_ID, action.getRepoid() );
RemoteRepositoryConfiguration repository = action.getRepository();
assertNotNull( repository );
assertRepositoryEquals( repository, createRepository() );
assertEquals( 1, configuration.getProxyConnectors().size() );
String status = action.delete();
assertEquals( Action.SUCCESS, status );
assertTrue( configuration.getRemoteRepositories().isEmpty() );
assertEquals( 0, configuration.getProxyConnectors().size() );
}