Merge pull request #1868, add test for rpc modules.