MINOR: Add setting input partitions for task mocks
We recently added a builder to create task mocks for unit
tests. This PR adds the functionality to add input partitions
to task mocks when the builder is used.
Reviewers: Walker Carlson A. Sophie Blee-Goldman
@@ -325,6 +325,11 @@ public final class StreamsTestUtils {
return this;
}
+ public TaskBuilder<T> withInputPartitions(final Set<TopicPartition> inputPartitions) {
+ when(task.inputPartitions()).thenReturn(inputPartitions);
+ return this;
+ }
+
public T build() {
return task;
}
