Source:
public void bookingApplicationScreeningCreationTest() throws InterruptedException { ArrayList<LocalDate> dates = new ArrayList<>(); homePage.clickModules(); homePage.openBookingAppModule(); bookingAppPage.openScreening(); bookingAppScreeningPage.changeFilterTo("Date range"); String bookingId = bookingAppScreeningPage.bookScreeningVisit().replace(". ", ""); assertTrue(bookingAppScreeningPage.bookingIdExists(bookingId)); bookingAppScreeningPage.changeFilterTo("Today"); dates.add(new LocalDate()); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Tomorrow"); dates.remove(0); dates.add(new LocalDate().plusDays(1)); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Day after tomorrow"); dates.remove(0); dates.add(new LocalDate().plusDays(2)); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Next 3 days"); dates.remove(0); dates.add(new LocalDate()); dates.add(new LocalDate().plusDays(1)); dates.add(new LocalDate().plusDays(2)); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Next 7 days"); dates.add(new LocalDate().plusDays(3)); dates.add(new LocalDate().plusDays(4)); dates.add(new LocalDate().plusDays(5)); dates.add(new LocalDate().plusDays(6)); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Date range"); bookingAppScreeningPage.setDate(); bookingAppScreeningPage.exportToPDF(); bookingAppScreeningPage.exportToXLS(); }

Target:
public void bookingApplicationScreeningCreationTest() throws InterruptedException { ArrayList<LocalDate> dates = new ArrayList<>(); homePage.clickModules(); homePage.openBookingAppModule(); bookingAppPage.openScreening(); bookingAppScreeningPage.changeFilterTo("Date range"); String bookingId = bookingAppScreeningPage.bookScreeningVisit().replace(". ", ""); assertTrue(bookingAppScreeningPage.bookingIdExists(bookingId)); bookingAppScreeningPage.changeFilterTo("Today"); dates.add(LocalDate.now()); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Tomorrow"); dates.remove(0); dates.add(LocalDate.now().plusDays(1)); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Day after tomorrow"); dates.remove(0); dates.add(LocalDate.now().plusDays(2)); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Next 3 days"); dates.remove(0); dates.add(LocalDate.now()); dates.add(LocalDate.now().plusDays(1)); dates.add(LocalDate.now().plusDays(2)); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Next 7 days"); dates.add(LocalDate.now().plusDays(3)); dates.add(LocalDate.now().plusDays(4)); dates.add(LocalDate.now().plusDays(5)); dates.add(LocalDate.now().plusDays(6)); assertTrue(bookingAppScreeningPage.isFirstBookingOK(dates)); bookingAppScreeningPage.changeFilterTo("Date range"); bookingAppScreeningPage.setDate(); bookingAppScreeningPage.exportToPDF(); bookingAppScreeningPage.exportToXLS(); }