}
public void testDeleteRemoteRepositoryCancelled()
throws Exception
{
RemoteRepositoryConfiguration originalRepository = createRepository();
Configuration configuration = createConfigurationForEditing( originalRepository );
archivaConfiguration.getConfiguration();
archivaConfigurationControl.setReturnValue( configuration, 2 );
archivaConfiguration.save( configuration );
archivaConfigurationControl.replay();
action.setRepoid( REPO_ID );
action.prepare();
assertEquals( REPO_ID, action.getRepoid() );
RemoteRepositoryConfiguration repositoryConfiguration = action.getRepository();
assertNotNull( repositoryConfiguration );
assertRepositoryEquals( repositoryConfiguration, createRepository() );
String status = action.execute();
assertEquals( Action.SUCCESS, status );
RemoteRepositoryConfiguration repository = action.getRepository();
assertRepositoryEquals( repository, createRepository() );
assertEquals( Collections.singletonList( originalRepository ), configuration.getRemoteRepositories() );
}