@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 ) {
          // Do nothing here, if we can't load the provider, don't add it to the list
        }
      }
    }
    return providerClasses;
  }
@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 );
  }