@Test
  public void testWithSSPFilter() {
    Map<TaskName, Integer> changelogPartitionMapping = changelogPartitionMapping(4);
    Config config = config(ImmutableList.of(SYSTEM_STREAM0, SYSTEM_STREAM1),
        ImmutableMap.of(JobConfig.SSP_MATCHER_CLASS, Partition0Or1Filter.class.getName(),
            JobConfig.SSP_MATCHER_CONFIG_JOB_FACTORY_REGEX, ".*MyJobFactory",
            // this needs to match the regex in the line above
            JobConfig.STREAM_JOB_FACTORY_CLASS, "org.apache.samza.custom.MyJobFactory"));
    Map<String, ContainerModel> containerModels =
        ImmutableMap.of("0", new ContainerModel("0", ImmutableMap.of(taskName(0), taskModel(0, 0, 0))), "1",
            new ContainerModel("1", ImmutableMap.of(taskName(1), taskModel(1, 1, 1))));
    JobModel expected = new JobModel(config, containerModels);
    JobModel actual =
        JobModelCalculator.INSTANCE.calculateJobModel(config, changelogPartitionMapping, this.streamMetadataCache,
            this.grouperMetadata);
    assertEquals(expected, actual);
  }
Unfortunately, we still need powermock for testing the regex topic flow, since that flow checks for a specific
rewriter class, and setting up the support for that specific class is too cumbersome.
Many of the tests do not need powermock.
samza-core/src/test/java/org/apache/samza/coordinator/TestJobModelCalculator.java