public void testPastXIntervals() {
Macro m = new Macro(1234567890000L, "select '[past_5_minutes]';");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long time = 0;
Date result = null;
result = format.parse(m.toString(), new ParsePosition(8));
time = result.getTime()+300000L;
assertTrue(time<=1234567890000L);
m = new Macro(1234567890000L, "select '[past_hour]';");
result = format.parse(m.toString(), new ParsePosition(8));
time = result.getTime()+3600000L;
assertTrue(time<=1234567890000L);
m = new Macro(1234567890000L, "select '[start]';");
result = format.parse(m.toString(), new ParsePosition(8));
time = result.getTime();
assertTrue(time==1234567890000L);
}