ArchivaConfiguration archivaConfiguration = (ArchivaConfiguration) lookup( ArchivaConfiguration.ROLE );
FileType fileType = (FileType) archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().get( 0 );
fileType.addPattern( "**/*.xml" );
assertEquals( FileTypes.ARTIFACTS, fileType.getId() );
FileTypes fileTypes = (FileTypes) lookup( FileTypes.class );
fileTypes.afterConfigurationChange( null, "fileType", null );
repoContent = (ManagedRepositoryContent) lookup( ManagedRepositoryContent.class, "default" );
repoContent.setRepository( repository );
}