### Question:
SchedulerJobServiceImpl implements SchedulerJobService { @Override public List<SchedulerJobData> getActiveSchedulers(String user, long minutesOffset) { final OffsetDateTime desiredDateTime = OffsetDateTime.now().plusMinutes(minutesOffset); final Predicate<SchedulerJobData> userPredicate = s -> user.equals(s.getUser()); final Stream<SchedulerJobData> computationalSchedulersStream = getComputationalSchedulersForStopping(desiredDateTime, false) .stream() .filter(userPredicate); final Stream<SchedulerJobData> exploratorySchedulersStream = getExploratorySchedulersForStopping(desiredDateTime, false) .stream() .filter(userPredicate); return Stream.concat(computationalSchedulersStream, exploratorySchedulersStream) .collect(Collectors.toList()); }  @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 testGetActiveSchedulers() { final int minutesOffset = 123; final LocalDate now = LocalDate.now(); final DayOfWeek[] weekDays = DayOfWeek.values(); final LocalTime currentTime = LocalTime.now(); final LocalTime offsetTime = LocalTime.now().plusMinutes(minutesOffset); final SchedulerJobData schedulerJobData = getSchedulerJobData(now, now.plusDays(1), Arrays.asList(weekDays), Arrays.asList(weekDays), LocalDateTime.of(now, currentTime.plusMinutes(minutesOffset).truncatedTo(ChronoUnit.MINUTES)), false, USER, offsetTime.truncatedTo(ChronoUnit.MINUTES)); final SchedulerJobData secondScheduler = getSchedulerJobData(now, now.plusDays(1), Arrays.asList(weekDays), Arrays.asList(weekDays), LocalDateTime.of(now, currentTime.plusMinutes(minutesOffset).truncatedTo(ChronoUnit.MINUTES)), false, "user123", offsetTime.truncatedTo(ChronoUnit.MINUTES)); when(schedulerJobDAO.getExploratorySchedulerWithStatusAndClusterLastActivityLessThan(any(UserInstanceStatus.class), any(Date.class))).thenReturn(Arrays.asList(schedulerJobData, secondScheduler)); when(securityService.getUserInfoOffline(anyString())).thenReturn(getUserInfo()); when(schedulerJobDAO.getComputationalSchedulerDataWithOneOfStatus(any(UserInstanceStatus.class), any(DataEngineType.class), anyVararg())).thenReturn(singletonList(schedulerJobData)); final List<SchedulerJobData> activeSchedulers = schedulerJobService.getActiveSchedulers(USER, minutesOffset); assertEquals(2, activeSchedulers.size()); }