action = (RepositoriesAction) getActionProxy( "/admin/index.action" ).getAction();
originalArchivaConfiguration =
( (DefaultRepositoryGroupAdmin) action.getRepositoryGroupAdmin() ).getArchivaConfiguration();
// some other test are modifying archivaConfiguration with a mocked instance : this test need the real one
// so use the real one from spring, backup the mock and restore it at the end (tearDown)
ArchivaConfiguration real = applicationContext.getBean( ArchivaConfiguration.class );
( (DefaultRepositoryGroupAdmin) action.getRepositoryGroupAdmin() ).setArchivaConfiguration( real );
( (DefaultManagedRepositoryAdmin) action.getManagedRepositoryAdmin() ).setArchivaConfiguration( real );
( (DefaultRemoteRepositoryAdmin) action.getRemoteRepositoryAdmin() ).setArchivaConfiguration( real );
}