Added test for POJO in RPC method params. Minor re-factoring.