mumrah commented on code in PR #13724: URL: https://github.com/apache/kafka/pull/13724#discussion_r1230101055
########## metadata/src/test/java/org/apache/kafka/metadata/RecordTestUtils.java: ########## @@ -95,6 +95,60 @@ public static void replayOne( replayAll(target, Collections.singletonList(recordAndVersion)); } + public interface TestThroughAllIntermediateImagesLeadingToFinalImageHelper { Review Comment: Could we make this a concrete class? We could take in a supplier for an empty image and a function for creating a delta from an image. Also, I think we could add type parameters to avoid some of the casting. E.g., ```java class HelperThing<I, D> { HelperThing(Supplier<I> emptyImageSupplier, Function<I, D> imageToDelta) void test(I image, List<ApiMessageAndVersion> fromRecords); } ``` then use it like ```java HelperThing helper = new HelperThing(() -> TopicsImage.EMPTY, image -> new TopicsDelta(image)); helper.test(image, fromRecords); ``` -- 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