String json = Resources.toString(Resources.getResource("query_withGroupBys.json"), Charsets.UTF_8);
QueryBuilder builder = QueryBuilder.getInstance();
builder.setStart(2, TimeUnit.MONTHS);
QueryMetric metric = builder.addMetric("metric1");
metric.addGrouper(new ValueGrouper(10));
metric.addGrouper(new TagGrouper("tag1", "tag2"));
metric.addGrouper(new TimeGrouper(new RelativeTime(2, TimeUnit.HOURS), 3));
assertThat(builder.build(), equalTo(json));
}