@Test
public void testInputEncode() throws Exception {

    Method method = EchoService.class.getMethod("echo", Echo.EchoRequest.class);
    ProtobufRpcMethodInfo rpcMethodInfo = new ProtobufRpcMethodInfo(method);
    Echo.EchoRequest request = Echo.EchoRequest.newBuilder().setMessage("hello").build();
    byte[] bytes = rpcMethodInfo.inputEncode(request);
    Assert.assertTrue(bytes != null);
    Assert.assertTrue(bytes.length == request.getSerializedSize());
}