@Test
public void testSessionMillis() {

    long millisInHour = 3600000;
    long millisInDay = millisInHour * 24;
    
    DateTime dt = new DateTime(2010, 9, 13, 0, 0, 0, 0);  //Monday
    DateTime dt2 = new DateTime(2010, 9, 15, 0, 0, 0, 0); //Wednesday
    
    long sessionMillis = TradingSessionImpl.sessionMillis(
            dt.dayOfWeek().get(), dt.toLocalTime(), dt2.dayOfWeek().get(), dt2.toLocalTime());
    assertEquals(millisInDay * 2, sessionMillis);
    
    //Test rollover across Sunday boundary
    dt = new DateTime(2010, 9, 12, 0, 0, 0, 0);     //Sunday
    dt2 = new DateTime(2010, 9, 14, 0, 0, 0, 0);    //Tuesday
    
    sessionMillis = TradingSessionImpl.sessionMillis(
            dt.dayOfWeek().get(), dt.toLocalTime(), dt2.dayOfWeek().get(), dt2.toLocalTime());
    assertEquals(millisInDay * 2, sessionMillis);
}