start = getUtcTime(10, 0, 0); end = getUtcTime(2, 0, 0); schedule = new SessionSchedule(start.getTime(), end.getTime(), -1, -1);  t1 = getUtcTimeStamp(2000, 10, 10, 17, 0, 0); t2 = getUtcTimeStamp(2000, 10, 10, 1, 0, 0); doIsSameSessionTest(schedule, t1, t2, false); t2 = getUtcTimeStamp(2000, 10, 9, 23, 0, 0); doIsSameSessionTest(schedule, t1, t2, false);
    public void testIsSameSessionWithoutDay() throws Exception {        //=====================================================        // start time is less than end time        Calendar start = getUtcTime(3, 0, 0);        Calendar end = getUtcTime(18, 0, 0);        SessionSchedule schedule = new SessionSchedule(start.getTime(), end.getTime(), -1, -1);        // same time        Calendar t1 = getUtcTimeStamp(2000, 10, 10, 10, 0, 0);        Calendar t2 = getUtcTimeStamp(2000, 10, 10, 10, 0, 0);        doIsSameSessionTest(schedule, t1, t2, true);        // time 2 in same session but greater        t1 = getUtcTimeStamp(2000, 10, 10, 10, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 10, 11, 0, 0);        doIsSameSessionTest(schedule, t1, t2, true);        // time 2 in same session but less        t1 = getUtcTimeStamp(2000, 10, 10, 11, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 10, 10, 0, 0);        doIsSameSessionTest(schedule, t1, t2, true);        // time 1 not in session        t1 = getUtcTimeStamp(2000, 10, 10, 19, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 10, 10, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);        // time 2 not in session        t1 = getUtcTimeStamp(2000, 10, 10, 10, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 10, 2, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);        // same time (in session window) two different days        t1 = getUtcTimeStamp(2000, 10, 10, 12, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 11, 12, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);        //=====================================================        // start time is greater than end time        start = getUtcTime(18, 0, 0);        end = getUtcTime(13, 0, 0);        schedule = new SessionSchedule(start.getTime(), end.getTime(), -1, -1);        // same session same day        t1 = getUtcTimeStamp(2000, 10, 10, 19, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 10, 20, 0, 0);        doIsSameSessionTest(schedule, t1, t2, true);        // same time (in session window) two different days        t1 = getUtcTimeStamp(2000, 10, 10, 19, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 11, 19, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);        // same session time 2 is in next day        t1 = getUtcTimeStamp(2000, 10, 10, 19, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 11, 2, 0, 0);        doIsSameSessionTest(schedule, t1, t2, true);        // same session time 1 is in next day        t1 = getUtcTimeStamp(2000, 10, 11, 2, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 10, 19, 0, 0);        doIsSameSessionTest(schedule, t1, t2, true);        // time 1 is 25 hours greater than time 2        t1 = getUtcTimeStamp(2000, 10, 11, 21, 0, 0);        t2 = getUtcTimeStamp(2000, 10, 10, 20, 0, 0);        doIsSameSessionTest(schedule, t1, t2, false);        //=====================================================        // start time is equal to end time        start = getUtcTime(6, 0, 0);        end = getUtcTime(6, 0, 0);        schedule = new SessionSchedule(start.getTime(), end.getTime(), -1, -1);        t1 = getUtcTimeStamp(2004, 1, 13, 19, 10, 0);        t2 = getUtcTimeStamp(2004, 10, 14, 19, 06, 0);        doIsSameSessionTest(schedule, t1, t2, false);    }