@Before
  public void setup() {
    MockitoAnnotations.initMocks(this);
    when(this.changelogStreamManager.readPartitionMapping()).thenReturn(this.changelogPartitionMapping);
    this.config = config();
    this.staticResourceJobCoordinator =
        spy(new StaticResourceJobCoordinator(PROCESSOR_ID, this.jobModelHelper, this.jobModelServingContext,
            this.coordinatorCommunication, this.jobCoordinatorMetadataManager, this.streamPartitionCountMonitorFactory,
            this.streamRegexMonitorFactory, Optional.of(this.startpointManager), this.changelogStreamManager,
            this.jobRestartSignal, this.metrics, this.systemAdmins, EXECUTION_ENV_CONTAINER_ID, SAMZA_EPOCH_ID, this.config));
    this.staticResourceJobCoordinator.setListener(this.jobCoordinatorListener);
    doNothing().when(this.staticResourceJobCoordinator).doSetLoggingContextConfig(any());
  }
In general, these tests start the {@link StaticResourceJobCoordinator} in a separate thread and then execute certain
actions (trigger callbacks which will change the job model, trigger shutdown) to check the coordination flow.
samza-core/src/test/java/org/apache/samza/coordinator/staticresource/TestStaticResourceJobCoordinator.java