@Test
public void registerScheduledJobThrowsExceptionWhenDifferentJobWithSameIdRegistered() {

    // given
    var alreadyExistingJobId = "JOB";
    scheduledJobExecutor.scheduledJobIdMap.put(jobMock, alreadyExistingJobId);
    given(otherJobMock.getJobIdentifier()).willReturn(alreadyExistingJobId);
    // when / then
    assertThatThrownBy(() -> scheduledJobExecutor.registerScheduledJob(otherJobMock))
            .isInstanceOf(IllegalStateException.class)
            .hasMessage(String.format("Multiple scheduled jobs with the same job identifier '%s' found!", alreadyExistingJobId));
}