Calendar startTime = getUtcTime(0, 5, 0); Calendar endTime = getUtcTime(23, 45, 0);   int startDay = 1; int endDay = 7; schedule = new SessionSchedule(startTime.getTime(), endTime.getTime(), startDay, endDay);   t1 = getUtcTimeStamp(2006, 4, 4, 0, 0, 0); t2 = getUtcTimeStamp(2006, 4, 3, 1, 0, 0); doIsSameSessionTest( schedule, t1, t2, true );   t1 = getUtcTimeStamp(2006, 10, 30, 1, 0, 0); t2 = getUtcTimeStamp(2006, 10, 31, 1, 0, 0); doIsSameSessionTest( schedule, t1, t2, true );   t1 = getUtcTimeStamp(2006, 12, 31, 10, 10, 10); t2 = getUtcTimeStamp(2007, 1, 1, 10, 10, 10); doIsSameSessionTest( schedule, t1, t2, true );
    public void testIsSameSessionWithDay() throws Exception {        SessionSchedule schedule = new SessionSchedule(getUtcTime(3, 0, 0).getTime(), getUtcTime(                18, 0, 0).getTime(), 2, 5);        Calendar t1 = getUtcTimeStamp(2004, 6, 27, 3, 0, 0);        Calendar t2 = getUtcTimeStamp(2004, 6, 25, 3, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);        t1 = getUtcTimeStamp(2004, 6, 31, 3, 0, 0);        t2 = getUtcTimeStamp(2004, 6, 27, 3, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);        t1 = getUtcTimeStamp(2004, 6, 27, 3, 0, 0);        t2 = getUtcTimeStamp(2004, 6, 27, 3, 0, 0);        doIsSameSessionTest(schedule, t1, t2, true);        t1 = getUtcTimeStamp(2004, 6, 26, 10, 0, 0);        t2 = getUtcTimeStamp(2004, 6, 27, 3, 0, 0);        doIsSameSessionTest(schedule, t1, t2, true);        t1 = getUtcTimeStamp(2004, 6, 27, 10, 0, 0);        t2 = getUtcTimeStamp(2004, 6, 29, 2, 0, 0);        doIsSameSessionTest(schedule, t1, t2, true);        t1 = getUtcTimeStamp(2004, 6, 27, 10, 0, 0);        t2 = getUtcTimeStamp(2004, 6, 20, 3, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);        t1 = getUtcTimeStamp(2004, 6, 27, 2, 0, 0);        t2 = getUtcTimeStamp(2004, 6, 20, 3, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);        t1 = getUtcTimeStamp(2004, 6, 26, 2, 0, 0);        t2 = getUtcTimeStamp(2004, 6, 19, 3, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);    }