### Question:
CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public Collection<CompressionProvider> getCompressionProviders() { Collection<CompressionProvider> providerClasses = new ArrayList<CompressionProvider>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) { try { providerClasses.add( PluginRegistry.getInstance().loadClass( plugin, CompressionProvider.class ) ); } catch ( Exception e ) { } } } return providerClasses; } private  CompressionProviderFactory(); static CompressionProviderFactory getInstance(); @Override CompressionProvider createCompressionProviderInstance( String name ); @Override Collection<CompressionProvider> getCompressionProviders(); @Override String[] getCompressionProviderNames(); @Override CompressionProvider getCompressionProviderByName( String name );  }### Answer:
@Test public void getCoreProviders() { @SuppressWarnings( "serial" ) final HashMap<String, Boolean> foundProvider = new HashMap<String, Boolean>() { { put( "None", false ); put( "Zip", false ); put( "GZip", false ); put( "Snappy", false ); put( "Hadoop-snappy", false ); } }; Collection<CompressionProvider> providers = factory.getCompressionProviders(); assertNotNull( providers ); for ( CompressionProvider provider : providers ) { assertNotNull( foundProvider.get( provider.getName() ) ); foundProvider.put( provider.getName(), true ); } boolean foundAllProviders = true; for ( Boolean b : foundProvider.values() ) { foundAllProviders = foundAllProviders && b; } assertTrue( foundAllProviders ); }