@Test
    public void testDecodeSofaResponse() {
        AbstractByteBuf nullByteBuf = serializer.encode(null, null);
        JacksonSerializer jacksonSerializer = new JacksonSerializer();
        SofaResponse sofaResponse = new SofaResponse();
        Map<String, String> ctx = new HashMap<>();
        ctx.put(RemotingConstants.HEAD_TARGET_SERVICE, "xxx");
        ctx.put(RemotingConstants.HEAD_METHOD_NAME, "xxx");
        ctx.put(RemotingConstants.HEAD_RESPONSE_ERROR, "true");
        jacksonSerializer.decode(nullByteBuf, sofaResponse, ctx);
        Assert.assertTrue(sofaResponse.isError());
        Assert.assertEquals("", sofaResponse.getErrorMsg());
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
codec/codec-jackson/src/test/java/com/alipay/sofa/rpc/codec/jackson/JacksonSerializerTest.java