@Override
    public Map<TaskName, Set<SystemStreamPartition>> group(Set<SystemStreamPartition> systemStreamPartitions) {
      // if partition 0, then add to this first set
      Set<SystemStreamPartition> sspsForTask0 = new HashSet<>();
      // all SSPs that are not partition 0 go into this second set
      Set<SystemStreamPartition> sspsForTask1 = new HashSet<>();
      systemStreamPartitions.forEach(ssp -> {
        if (ssp.getPartition().getPartitionId() == 0) {
          sspsForTask0.add(ssp);
        } else {
          sspsForTask1.add(ssp);
        }
      });
      return ImmutableMap.of(taskName(0), sspsForTask0, taskName(1), sspsForTask1);
    }
Groups all SSPs into two tasks. The first task gets all of the SSPs with a partition id of 0. The second task gets
all other SSPs. This is used for testing a custom {@link SystemStreamPartitionGrouper}.
samza-core/src/test/java/org/apache/samza/coordinator/TestJobModelCalculator.java