@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 ) {
          // Do nothing here, if we can't load the provider, don't add it to the list
        }
      }
    }
    return providerNames.toArray( new String[providerNames.size()] );
  }
@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 );
  }