g1geordie commented on a change in pull request #9926: URL: https://github.com/apache/kafka/pull/9926#discussion_r559733052
########## File path: generator/src/test/java/org/apache/kafka/message/MessageGeneratorTest.java ########## @@ -17,30 +17,28 @@ package org.apache.kafka.message; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.Timeout; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; +@Timeout(120) public class MessageGeneratorTest { - @Rule - final public Timeout globalTimeout = Timeout.millis(120000); @Test public void testCapitalizeFirst() throws Exception { - assertEquals("", MessageGenerator.capitalizeFirst("")); - assertEquals("AbC", MessageGenerator.capitalizeFirst("abC")); + assertEquals(MessageGenerator.capitalizeFirst(""), ""); + assertEquals(MessageGenerator.capitalizeFirst("abC"), "AbC"); } @Test public void testLowerCaseFirst() throws Exception { - assertEquals("", MessageGenerator.lowerCaseFirst("")); - assertEquals("fORTRAN", MessageGenerator.lowerCaseFirst("FORTRAN")); - assertEquals("java", MessageGenerator.lowerCaseFirst("java")); + assertEquals(MessageGenerator.lowerCaseFirst(""), ""); Review comment: @bertber left a little comment . we don't need to change the position of args. assertEquals only change when it contain message arg. ---------------------------------------------------------------- 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