hachikuji commented on a change in pull request #10480: URL: https://github.com/apache/kafka/pull/10480#discussion_r607380961
########## File path: raft/src/test/java/org/apache/kafka/raft/LeaderStateTest.java ########## @@ -36,30 +36,31 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -public class LeaderStateTest { +public class LeaderStateTest<T> { private final int localId = 0; private final int epoch = 5; private final LogContext logContext = new LogContext(); - private LeaderState newLeaderState( + private LeaderState<T> newLeaderState( Set<Integer> voters, long epochStartOffset ) { - return new LeaderState( + return new LeaderState<>( localId, epoch, epochStartOffset, voters, voters, - logContext + logContext, + null Review comment: Yeah, let's add an explicit `requireNonNull` in the constructor. Here we could potentially use a mock. -- 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