clolov commented on code in PR #12418:
URL: https://github.com/apache/kafka/pull/12418#discussion_r1015721355


##########
connect/runtime/src/test/java/org/apache/kafka/connect/storage/KafkaOffsetBackingStoreTest.java:
##########
@@ -105,34 +112,53 @@ public class KafkaOffsetBackingStoreTest {
 
     @Mock
     KafkaBasedLog<byte[], byte[]> storeLog;
+    @Mock
+    Supplier<TopicAdmin> topicAdminSupplier;
+    @Spy
+    @InjectMocks
     private KafkaOffsetBackingStore store;
 
-    private Capture<String> capturedTopic = EasyMock.newCapture();
-    private Capture<Map<String, Object>> capturedProducerProps = 
EasyMock.newCapture();
-    private Capture<Map<String, Object>> capturedConsumerProps = 
EasyMock.newCapture();
-    private Capture<Supplier<TopicAdmin>> capturedAdminSupplier = 
EasyMock.newCapture();
-    private Capture<NewTopic> capturedNewTopic = EasyMock.newCapture();
-    private Capture<Callback<ConsumerRecord<byte[], byte[]>>> 
capturedConsumedCallback = EasyMock.newCapture();
+    private MockedStatic<ConnectUtils> connectUtilsMockedStatic;
+
+    private final ArgumentCaptor<String> capturedTopic = 
ArgumentCaptor.forClass(String.class);
+    @SuppressWarnings("unchecked")
+    private final ArgumentCaptor<Map<String, Object>> capturedProducerProps = 
ArgumentCaptor.forClass(Map.class);

Review Comment:
   However, I left some of the more obscure ArgumentCaptors defined inline. If 
you disagree with that I will hoist them as fields as well.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to