orpiske commented on code in PR #9271: URL: https://github.com/apache/camel/pull/9271#discussion_r1091847506
########## core/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java: ########## @@ -168,38 +174,38 @@ public void testFileToString() throws Exception { } @Test - public void testPrimitiveBooleanConversion() throws Exception { - boolean value = converter.convertTo(boolean.class, null); + public void testPrimitiveBooleanConversion() { + boolean value = assertDoesNotThrow(() -> converter.convertTo(boolean.class, null)); Review Comment: It is an expectation for this test that when receiving a primitive type, the conversion succeeds. By allowing the exception to leak, it could potentially be misinterpreted as some generic fail. Let's add a fail message here, and be clear about out expectations (same for the other ones). ########## core/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java: ########## @@ -168,38 +174,38 @@ public void testFileToString() throws Exception { } @Test - public void testPrimitiveBooleanConversion() throws Exception { - boolean value = converter.convertTo(boolean.class, null); + public void testPrimitiveBooleanConversion() { + boolean value = assertDoesNotThrow(() -> converter.convertTo(boolean.class, null)); Review Comment: It is an expectation for this test that when receiving a primitive type, the conversion succeeds. By allowing the exception to leak, it could potentially be misinterpreted as some generic fail. Let's add a fail message here, and be clear about our expectations (same for the other ones). -- 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. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org