@Test
public void testOutputDecodeStream() throws Exception {

    Method method = EchoService.class.getMethod("echo", Echo.EchoRequest.class);
    ProtobufRpcMethodInfo rpcMethodInfo = new ProtobufRpcMethodInfo(method);
    Echo.EchoResponse response = Echo.EchoResponse.newBuilder().setMessage("hello").build();
    byte[] bytes = response.toByteArray();
    ByteBuf buf = Unpooled.wrappedBuffer(bytes);
    ByteBufInputStream inputStream = new ByteBufInputStream(buf);
    Echo.EchoResponse response1 = (Echo.EchoResponse) rpcMethodInfo.outputDecode(inputStream);
    Assert.assertTrue(response1.getMessage().equals(response.getMessage()));
}