CodecRegistry { public List<RawErasureCoderFactory> getCoders(String codecName) { List<RawErasureCoderFactory> coders = coderMap.get(codecName); return coders; } private  CodecRegistry(); static CodecRegistry getInstance(); String[] getCoderNames(String codecName); List<RawErasureCoderFactory> getCoders(String codecName); Set<String> getCodecNames(); RawErasureCoderFactory getCoderByName(
      String codecName, String coderName); Map<String, String> getCodec2CoderCompactMap();  }
@Test public void testGetCoders() { List<RawErasureCoderFactory> coders = CodecRegistry.getInstance(). getCoders(ErasureCodeConstants.RS_CODEC_NAME); assertEquals(2, coders.size()); assertTrue(coders.get(0) instanceof NativeRSRawErasureCoderFactory); assertTrue(coders.get(1) instanceof RSRawErasureCoderFactory); coders = CodecRegistry.getInstance(). getCoders(ErasureCodeConstants.RS_LEGACY_CODEC_NAME); assertEquals(1, coders.size()); assertTrue(coders.get(0) instanceof RSLegacyRawErasureCoderFactory); coders = CodecRegistry.getInstance(). getCoders(ErasureCodeConstants.XOR_CODEC_NAME); assertEquals(2, coders.size()); assertTrue(coders.get(0) instanceof NativeXORRawErasureCoderFactory); assertTrue(coders.get(1) instanceof XORRawErasureCoderFactory); }