### Question:
CompressionProviderFactory implements CompressionProviderFactoryInterface { @Override public String[] getCompressionProviderNames() { ArrayList<String> providerNames = new ArrayList<String>(); List<PluginInterface> providers = getPlugins(); if ( providers != null ) { for ( PluginInterface plugin : providers ) { try { CompressionProvider provider = PluginRegistry.getInstance().loadClass( plugin, CompressionProvider.class ); if ( provider != null ) { providerNames.add( provider.getName() ); } } catch ( Exception e ) { } } } return providerNames.toArray( new String[providerNames.size()] ); } 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 getCoreProviderNames() { @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 ); } }; String[] providers = factory.getCompressionProviderNames(); assertNotNull( providers ); for ( String provider : providers ) { assertNotNull( foundProvider.get( provider ) ); foundProvider.put( provider, true ); } boolean foundAllProviders = true; for ( Boolean b : foundProvider.values() ) { foundAllProviders = foundAllProviders && b; } assertTrue( foundAllProviders ); }