CompressorFactory { public static Compressor getCompressor(String alias) { return EXTENSION_LOADER.getExtension(alias); }  static Compressor getCompressor(String alias); static Compressor getCompressor(byte code); static byte getCodeByAlias(String compress);  }
@Test public void getCompressor() throws Exception { Compressor compressor = CompressorFactory.getCompressor((byte) 113); Assert.assertNotNull(compressor); Assert.assertEquals(compressor.getClass(), TestCompressor.class); }
@Test public void getCompressor1() throws Exception { Compressor compressor = CompressorFactory.getCompressor("test"); Assert.assertNotNull(compressor); Assert.assertEquals(compressor.getClass(), TestCompressor.class); }
@Test public void getCompressorNotExist() throws Exception { try { CompressorFactory.getCompressor((byte) 999); Assert.fail(); } catch (SofaRpcRuntimeException e) { } }