ManagedRepository repository = action.getRepository();
populateRepository( repository );
repository.setName( "new repo name" );
MockControl repositoryStatisticsManagerControl = MockControl.createControl( RepositoryStatisticsManager.class );
RepositoryStatisticsManager repositoryStatisticsManager =
(RepositoryStatisticsManager) repositoryStatisticsManagerControl.getMock();
( (DefaultManagedRepositoryAdmin) getManagedRepositoryAdmin() ).setRepositoryStatisticsManager(
repositoryStatisticsManager );
repositoryStatisticsManager.deleteStatistics( metadataRepository , REPO_ID );
repositoryStatisticsManagerControl.setVoidCallable();
repositoryStatisticsManagerControl.replay();
new File( "target/test/" + REPO_ID + "-stage" ).mkdirs();