	@Test
	public void testHistoricalData() throws Exception {

		OHLC data[] = client.getHistoricalData(Contract.stock("MSFT"), new Date(), 20, HistoricalDataSource.PERIOD_1_DAY);
		assertNotNull(data);
		assertTrue(data.length > 10);
		for (OHLC ohlc : data)
			assertValidOHLC(ohlc);
		
		data = client.getHistoricalData(Contract.stock("GOOG"), new Date(), 5, HistoricalDataSource.PERIOD_1_WEEK);
		assertNotNull(data);
		assertEquals(5, data.length, 2);
		for (OHLC ohlc : data)
			assertValidOHLC(ohlc);
	}