public static Set<ContainerModel> generateContainerModels(int numContainers, int taskCount) {
    Set<ContainerModel> models = new HashSet<>(numContainers);
    int[] taskCountPerContainer = calculateTaskCountPerContainer(taskCount, numContainers);
    int j = 0;
    for (int i = 0; i < numContainers; i++) {
      int[] partitions = new int[taskCountPerContainer[i]];
      for (int k = 0; k < taskCountPerContainer[i]; k++) {
        partitions[k] = j + k;
      }
      j += taskCountPerContainer[i];

      models.add(createContainerModel(String.valueOf(i), partitions));
    }
    return models;
  }
Note: This is artificial. It makes assumptions about task grouping, changelog partition mapping, etc.
that will likely not be true at runtime, but are not the focus of this test.
samza-core/src/test/java/org/apache/samza/container/mock/ContainerMocks.java