### Question:
DoradoSerializerFactory { public static Serializer getSerializer(byte serializerCode) { if (SerializeType.THRIFT_CODEC.getCode() == serializerCode) { return null; } Serializer serializer = serializers.get(serializerCode); if (serializer == null) { serializer = registerSerializer(serializerCode); } return serializer; }  static Serializer getSerializer(byte serializerCode);  }### Answer:
@Test public void testGetSerializer() { Serializer serializer = DoradoSerializerFactory.getSerializer((byte)3); Assert.assertTrue(serializer instanceof ProtostuffSerializer); serializer = DoradoSerializerFactory.getSerializer((byte)1); Assert.assertEquals(serializer, null); try { DoradoSerializerFactory.getSerializer((byte)2); } catch (Exception e) { Assert.assertTrue(e instanceof ProtocolException); } }