mimaison commented on a change in pull request #11672:
URL: https://github.com/apache/kafka/pull/11672#discussion_r800884869



##########
File path: core/src/test/scala/kafka/common/InterBrokerSendThreadTest.scala
##########
@@ -134,36 +139,45 @@ class InterBrokerSendThreadTest {
 
     val clientRequest = new ClientRequest("dest", request, 0, "1", 0, true, 
requestTimeoutMs, handler.handler)
 
-    EasyMock.expect(networkClient.newClientRequest(
-      EasyMock.eq("1"),
-      EasyMock.same(handler.request),
-      EasyMock.anyLong(),
-      EasyMock.eq(true),
-      EasyMock.eq(requestTimeoutMs),
-      EasyMock.same(handler.handler)))
-      .andReturn(clientRequest)
+    when(networkClient.newClientRequest(
+      ArgumentMatchers.eq("1"),
+      same(handler.request),
+      anyLong(),
+      ArgumentMatchers.eq(true),
+      ArgumentMatchers.eq(requestTimeoutMs),
+      same(handler.handler)))
+      .thenReturn(clientRequest)
 
-    EasyMock.expect(networkClient.ready(node, time.milliseconds()))
-      .andReturn(false)
+    when(networkClient.ready(node, time.milliseconds()))
+      .thenReturn(false)
 
-    EasyMock.expect(networkClient.connectionDelay(EasyMock.anyObject(), 
EasyMock.anyLong()))
-      .andReturn(0)
+    when(networkClient.connectionDelay(any[Node], anyLong()))

Review comment:
       Initially I wanted to not use parenthesis on any these methods but we 
need them for Scala 2.12. So I've kept the necessary parenthesis and omitted 
them wherever possible. If that looks confusing, I could add them onto the 
`any[]` calls too.




-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to