### Question:
JobIdManager { public static int getJobIdForUserId(int minJobId, int maxJobId, int userId) { if (minJobId + userId > maxJobId) { throw new RuntimeException("No job IDs available in the given range"); } return minJobId + userId; }  static int getJobIdForUserId(int minJobId, int maxJobId, int userId);  }### Answer:
@Test public void testGetJobIdForUserId_returnsDifferentJobIdsForDifferentUsers() { int jobIdOne = JobIdManager.getJobIdForUserId(MIN_JOB_ID, MAX_JOB_ID, mUserOneId); int jobIdTwo = JobIdManager.getJobIdForUserId(MIN_JOB_ID, MAX_JOB_ID, mUserTwoId); assertThat(jobIdOne).isNotEqualTo(jobIdTwo); }
@Test public void testGetJobIdForUserId_returnsSameJobIdForSameUser() { int jobIdOne = JobIdManager.getJobIdForUserId(MIN_JOB_ID, MAX_JOB_ID, mUserOneId); int jobIdTwo = JobIdManager.getJobIdForUserId(MIN_JOB_ID, MAX_JOB_ID, mUserOneId); assertThat(jobIdOne).isEqualTo(jobIdTwo); }
@Test public void testGetJobIdForUserId_throwsExceptionIfRangeIsExceeded() { expectThrows( RuntimeException.class, () -> JobIdManager.getJobIdForUserId(MIN_JOB_ID, MAX_JOB_ID, MAX_JOB_ID + 1)); }