### Question:
HolidayManager { public Instant getPreviousWorkingDay () { return getPreviousWorkingDay(holidayCalendar.getToday()); }  Instant getPreviousWorkingDay(); boolean isHoliday(); long getMillisLeftInDay(); Instant getInstantAfterWorkingMillis(Instant start, long workingMillis); boolean isOutsideWorkingHours();  }### Answer:
@Test public void getPreviousWorkingDay () { doReturn(true, false).when(holidayCalendar).isHoliday(any()); Calendar c = Calendar.getInstance(); c.set(Calendar.DAY_OF_MONTH, 29); c.set(Calendar.MONTH, Calendar.JUNE); c.set(Calendar.YEAR, 2018); Instant expected = c.toInstant().truncatedTo(ChronoUnit.DAYS); Calendar actual = Calendar.getInstance(); actual.set(Calendar.DAY_OF_MONTH, 3); actual.set(Calendar.MONTH, Calendar.JULY); actual.set(Calendar.YEAR, 2018); Instant previousWorkingDay = holidayManager.getPreviousWorkingDay(actual).truncatedTo(ChronoUnit.DAYS); assertEquals(expected, previousWorkingDay); }