viktorsomogyi commented on a change in pull request #4090: URL: https://github.com/apache/kafka/pull/4090#discussion_r460781660
########## File path: core/src/test/scala/unit/kafka/utils/JsonTest.scala ########## @@ -41,14 +42,23 @@ class JsonTest { val jnf = JsonNodeFactory.instance assertEquals(Json.parseFull("{}"), Some(JsonValue(new ObjectNode(jnf)))) + assertEquals(Json.tryParseFull("{}"), Right(JsonValue(new ObjectNode(jnf)))) + org.junit.Assert.assertThrows(classOf[IllegalArgumentException], () => Json.tryParseFull(null)) + org.junit.Assert.assertThrows(classOf[IllegalArgumentException], () => Json.tryParseBytes(null)) Review comment: The `import org.scalatest.Matchers._` also imports an assertThrows here, that's why I used the fully qualified name here, although the scala matcher is only used in line 54 (`tryRes shouldBe a [Left[_, JsonValue]]`), but I can replace it with an instanceOf check and then there will be no need to use the `Matchers`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org