Refactor JSONRPCServerTests (and increase coverage)