@Test
public void testValidate() {

	InputStream is = new InputStream();
	StreamSource ss = new StreamSource().setAlias("my-stream").setAddressing(addressing).setSqlQuery("select * from wrapper").setRawHistorySize("10m");
	assertTrue(ss.validate());
	assertFalse(ss.isStorageCountBased());
	assertEquals(ss.getParsedStorageSize(),10*60*1000);
	ss = new StreamSource().setAlias("my-stream").setAddressing(addressing).setSqlQuery("select * from wrapper").setRawHistorySize("10  m").setInputStream(is);
	assertFalse(ss.isStorageCountBased());
	assertEquals(ss.getParsedStorageSize(),10*60*1000);
	ss = new StreamSource().setAlias("my-stream").setAddressing(addressing).setSqlQuery("select * from wrapper").setRawHistorySize("10  s").setInputStream(is);
	assertFalse(ss.isStorageCountBased());
	assertEquals(ss.getParsedStorageSize(),10*1000);
	assertFalse(ss.isStorageCountBased());
	ss = new StreamSource().setAlias("my-stream").setAddressing(addressing).setSqlQuery("select * from wrapper").setRawHistorySize("2 h").setInputStream(is);
	assertFalse(ss.isStorageCountBased());
	assertEquals(ss.getParsedStorageSize(),2*60*60*1000);
}