java: Convert TJSONProtocol test to JUnit, making a few minor changes to ProtocolTestBase in the process.