{
MockControl fileTypesControl = MockClassControl.createControl( FileTypes.class );
FileTypes fileTypes = (FileTypes) fileTypesControl.getMock();
MockControl pathParserControl = MockClassControl.createControl( PathParser.class );
PathParser parser = (PathParser) pathParserControl.getMock();
ManagedRepositoryConfiguration managedRepo = createManagedRepo( "legacy", "legacy-repo" );
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
configControl.expectAndReturn( config.getManagedRepositories(), Arrays.asList( managedRepo ), 1, 5 );