@Test
public void testGetOutputSerializedSize() throws Exception {

    Method method = EchoService.class.getMethod("echo", EchoRequest.class);
    JprotobufRpcMethodInfo rpcMethodInfo = new JprotobufRpcMethodInfo(method);
    EchoResponse response = new EchoResponse();
    response.setMessage("hello");
    Assert.assertTrue(rpcMethodInfo.getOutputSerializedSize(response)
            == Echo.EchoResponse.newBuilder().setMessage("hello").build().getSerializedSize());
}