add unittest for RpcCommand