@Test
public void testGetQueryContextWithSingleExpression() {

    long relativeTo = System.currentTimeMillis();
    QueryContext context = QueryUtils.getQueryContext("-1h:argus.core:alerts.scheduled:zimsum:1m-sum", relativeTo);
    assertNull(context.getTransform());
    assertNull(context.getConstants());
    assertEquals(context.getChildContexts().size(),0);
    assertNotNull(context.getExpression());
    TSDBQueryExpression expression = context.getExpression();
    assertEquals(expression.getScope(), "argus.core");
    assertEquals(expression.getMetric(), "alerts.scheduled");
    assertEquals(expression.getAggregator().toString(), "ZIMSUM");
    assertEquals(expression.getDownsampler().toString(), "SUM");
    assertEquals(expression.getDownsamplingPeriod(), new Long(60000));
    assertEquals(expression.getStartTimestamp(),new Long(((relativeTo - 3600*1000)/1000)*1000));
    assertEquals(expression.getEndTimestamp(),new Long(relativeTo));
}