SerializerFactory { public static Serializer getSerializer(String alias) { return EXTENSION_LOADER.getExtension(alias); }  static Serializer getSerializer(String alias); static Serializer getSerializer(byte type); static Byte getCodeByAlias(String serializer); static String getAliasByCode(byte code);  }
@Test public void getSerializer() { Serializer serializer = SerializerFactory.getSerializer((byte) 117); Assert.assertNotNull(serializer); Assert.assertEquals(TestSerializer.class, serializer.getClass()); }
@Test public void getSerializer1() { Serializer serializer = SerializerFactory.getSerializer("test"); Assert.assertNotNull(serializer); Assert.assertEquals(TestSerializer.class, serializer.getClass()); }
@Test public void getSerializerNotExist() { try { SerializerFactory.getSerializer((byte) 999); Assert.fail(); } catch (SofaRpcRuntimeException e) { } }