### Question:
WeeklyTimeWindow { public Date thisWeekStartDate(Date asOf,TimeZone tz){ Calendar cal = Calendar.getInstance(tz); cal.setTime(asOf); DayOfWeek currentDay = DayOfWeek.from(cal); TimeOfDay currentTime = new TimeOfDay(cal); long windowStartTime = millisIntoWeek(startDay, startTime); long checkDateIntoWeek = millisIntoWeek(currentDay, currentTime); long diff = windowStartTime-checkDateIntoWeek; return new Date(asOf.getTime()+diff); } WeeklyTimeWindow(DayOfWeek startDay,String startTime, int duration, TimeUnit timeUnit);  WeeklyTimeWindow(DayOfWeek startDay,TimeOfDay startTime, int duration, TimeUnit timeUnit);  WeeklyTimeWindow(TimeWindow timeWindow); boolean isDateInTimeWindow(Date asOf,TimeZone tz); Date nextOrCurrentStartDate(Date asOf,TimeZone tz); Date thisWeekStartDate(Date asOf,TimeZone tz); Date nextWeekStartDate(Date asOf,TimeZone tz); static Date calculateEndDate(Date startDate,TimeWindow timeWindow); Date calculateEndDate(Date startDate); static WeeklyTimeWindow nextOrCurrentWindow(List<WeeklyTimeWindow>windows, Date asOfDate,TimeZone tz); static List<WeeklyTimeWindow> sortByStartTime(List<WeeklyTimeWindow>windows,Date asOfDate,TimeZone tz); static List<WeeklyTimeWindow> fromTimeWindowDataListSorted(List<Map<String,Object>>windowAttributes,Calendar cal); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testWindowStartDate() throws Exception{ WeeklyTimeWindow window = new WeeklyTimeWindow(DayOfWeek.THURSDAY, "10:00:00", 3,TimeUnit.DAYS); Date staticCurrentDate = simulateDateWithCST("2016-01-23T10:00:00"); Date testDate2 = window.thisWeekStartDate(staticCurrentDate, CST); Calendar cal = Calendar.getInstance(CST); cal.setTime(testDate2); assertEquals("should be a thursday",Calendar.THURSDAY,cal.get(Calendar.DAY_OF_WEEK)); assertEquals("should be the 21st",21,cal.get(Calendar.DAY_OF_MONTH)); assertEquals("should be the 21st",10,cal.get(Calendar.HOUR)); assertEquals("should be the 21st",00,cal.get(Calendar.MINUTE)); }