public static Map<String, String> generateTaskAssignments(int numContainers, int taskCount) {
    Map<String, String> mapping = new HashMap<>(taskCount);
    Set<ContainerModel> containers = generateContainerModels(numContainers, taskCount);
    for (ContainerModel container : containers) {
      for (TaskName taskName : container.getTasks().keySet()) {
        mapping.put(taskName.getTaskName(), container.getId());
      }
    }
    return mapping;
  }
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