With the test fixtures added in #10516 it should now be possible to test the JsonRpcConnection class in a similar manner to HttpServerConnection.
Message sending and decoding should be tested for the JsonRpc utility class first, so the tests for JsonRpcConnection can focus on the connection handling and message dispatching part using a testing ApiFunction.