ijuma commented on a change in pull request #10850: URL: https://github.com/apache/kafka/pull/10850#discussion_r648316500
########## File path: streams/src/test/java/org/apache/kafka/streams/internals/metrics/ClientMetricsTest.java ########## @@ -125,8 +114,8 @@ public void shouldAddAliveStreamThreadsMetric() { public void shouldGetFailedStreamThreadsSensor() { final String name = "failed-stream-threads"; final String description = "The number of failed stream threads since the start of the Kafka Streams client"; - expect(streamsMetrics.clientLevelSensor(name, RecordingLevel.INFO)).andReturn(expectedSensor); - expect(streamsMetrics.clientLevelTagMap()).andReturn(tagMap); + Mockito.when(streamsMetrics.clientLevelSensor(name, RecordingLevel.INFO)).thenReturn(expectedSensor); + Mockito.when(streamsMetrics.clientLevelTagMap()).thenReturn(tagMap); Review comment: From a style perspective, you can import `when` via a static import to make it more readable. -- 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