CodecRegistry { public String[] getCoderNames(String codecName) { String[] coderNames = coderNameMap.get(codecName); return coderNames; } 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 testGetCoderNames() { String[] coderNames = CodecRegistry.getInstance(). getCoderNames(ErasureCodeConstants.RS_CODEC_NAME); assertEquals(2, coderNames.length); assertEquals(NativeRSRawErasureCoderFactory.CODER_NAME, coderNames[0]); assertEquals(RSRawErasureCoderFactory.CODER_NAME, coderNames[1]); coderNames = CodecRegistry.getInstance(). getCoderNames(ErasureCodeConstants.RS_LEGACY_CODEC_NAME); assertEquals(1, coderNames.length); assertEquals(RSLegacyRawErasureCoderFactory.CODER_NAME, coderNames[0]); coderNames = CodecRegistry.getInstance(). getCoderNames(ErasureCodeConstants.XOR_CODEC_NAME); assertEquals(2, coderNames.length); assertEquals(NativeXORRawErasureCoderFactory.CODER_NAME, coderNames[0]); assertEquals(XORRawErasureCoderFactory.CODER_NAME, coderNames[1]); }