### Question:
SchedulerJobServiceImpl implements SchedulerJobService { @Override public SchedulerJobDTO fetchSchedulerJobForComputationalResource(String user, String project, String exploratoryName, String computationalName) { return schedulerJobDAO.fetchSingleSchedulerJobForCluster(user, project, exploratoryName, computationalName) .orElseThrow(() -> new ResourceNotFoundException(String.format(SCHEDULER_NOT_FOUND_MSG, user, exploratoryName) + " with computational resource " + computationalName)); }  @Override SchedulerJobDTO fetchSchedulerJobForUserAndExploratory(String user, String project, String exploratoryName); @Override SchedulerJobDTO fetchSchedulerJobForComputationalResource(String user, String project, String exploratoryName,
																	 String computationalName); @Override void updateExploratorySchedulerData(String user, String project, String exploratoryName, SchedulerJobDTO dto); @Override void updateComputationalSchedulerData(String user, String project, String exploratoryName, String computationalName,
												 SchedulerJobDTO dto); @Override void stopComputationalByScheduler(); @Override void stopExploratoryByScheduler(); @Override void startExploratoryByScheduler(); @Override void startComputationalByScheduler(); @Override void terminateExploratoryByScheduler(); @Override void terminateComputationalByScheduler(); @Override void removeScheduler(String user, String exploratoryName); @Override void removeScheduler(String user, String exploratoryName, String computationalName); @Override List<SchedulerJobData> getActiveSchedulers(String user, long minutesOffset);  }### Answer:
@Test public void fetchSchedulerJobForComputationalResource() { when(schedulerJobDAO.fetchSingleSchedulerJobForCluster(anyString(), anyString(), anyString(), anyString())) .thenReturn(Optional.of(schedulerJobDTO)); SchedulerJobDTO actualSchedulerJobDto = schedulerJobService .fetchSchedulerJobForComputationalResource(USER, PROJECT, EXPLORATORY_NAME, COMPUTATIONAL_NAME); assertNotNull(actualSchedulerJobDto); assertEquals(schedulerJobDTO, actualSchedulerJobDto); verify(schedulerJobDAO).fetchSingleSchedulerJobForCluster(USER, PROJECT, EXPLORATORY_NAME, COMPUTATIONAL_NAME); verifyNoMoreInteractions(computationalDAO, schedulerJobDAO); }
@Test public void fetchEmptySchedulerJobForComputationalResource() { when(schedulerJobDAO.fetchSingleSchedulerJobForCluster(anyString(), anyString(), anyString(), anyString())) .thenReturn(Optional.empty()); try { schedulerJobService.fetchSchedulerJobForComputationalResource(USER, PROJECT, EXPLORATORY_NAME, COMPUTATIONAL_NAME); } catch (ResourceNotFoundException e) { assertEquals("Scheduler job data not found for user test with exploratory explName with " + "computational resource compName", e.getMessage()); } verify(schedulerJobDAO).fetchSingleSchedulerJobForCluster(USER, PROJECT, EXPLORATORY_NAME, COMPUTATIONAL_NAME); verifyNoMoreInteractions(computationalDAO, schedulerJobDAO); }