@Test
public void testOutputEncode() 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 = rpcMethodInfo.outputEncode(response);
    Assert.assertTrue(bytes.length == response.toByteArray().length);
}