ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
content.setRepository( config );
when( factory.getManagedRepositoryContent( TEST_REPO ) ).thenReturn( content );
ArchivaConfiguration archivaConfig = mock( ArchivaConfiguration.class );
Configuration configuration = new Configuration();
configuration.addManagedRepository(
new BeanReplicator().replicateBean( config, ManagedRepositoryConfiguration.class ) );
when( archivaConfig.getConfiguration() ).thenReturn( configuration );
when( factory.getArchivaConfiguration() ).thenReturn( archivaConfig );
}