@Test
public void testGetTradingSessionOnOrAfter() {

    TradingWeek tradingWeek = getTestTradingWeek(TEST);
    
    assertEquals(7, tradingWeek.length());
    
    //FIRST: Test within bounds Sunday, May 3 - Saturday, May 9
    DateTime testDate = new DateTime(2009, 5, 3, 8, 30, 0, 0);
    TradingSession session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Sunday(08:30:00.000-15:30:00.000)", session.toString());
    
    testDate = new DateTime(2009, 5, 4, 8, 30, 0, 0);
    session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Monday(08:30:00.000-15:30:00.000)", session.toString());
    
    testDate = new DateTime(2009, 5, 5, 8, 30, 0, 0);
    session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Tuesday(08:30:00.000-15:30:00.000)", session.toString());
    
    testDate = new DateTime(2009, 5, 6, 8, 30, 0, 0);
    session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Wednesday(08:30:00.000-15:30:00.000)", session.toString());
    
    testDate = new DateTime(2009, 5, 7, 8, 30, 0, 0);
    session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Thursday(08:30:00.000-15:30:00.000)", session.toString());
    
    testDate = new DateTime(2009, 5, 8, 8, 30, 0, 0);
    session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Friday(08:30:00.000-15:30:00.000)", session.toString());
    
    testDate = new DateTime(2009, 5, 9, 8, 30, 0, 0);
    session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Saturday(08:30:00.000-15:30:00.000)", session.toString());
    
    //////////////////////////////////////////////////////////
    //SECOND: Test advancement to next session
    //Advancement due to hours
    testDate = new DateTime(2009, 5, 2, 16, 30, 0, 0); //Saturday, May 2nd
    session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Sunday(08:30:00.000-15:30:00.000)", session.toString());
    
    //Advancement due to minutes
    testDate = new DateTime(2009, 5, 2, 15, 31, 0, 0);
    session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Sunday(08:30:00.000-15:30:00.000)", session.toString());
    
    //Advancement due to seconds
    testDate = new DateTime(2009, 5, 2, 15, 30, 1, 0);
    session = tradingWeek.getTradingSessionOnOrAfter(testDate);
    assertEquals("Sunday(08:30:00.000-15:30:00.000)", session.toString());
}