QueryBuilder builder = QueryBuilder.getInstance();
builder.setStart(1, TimeUnit.MINUTES);
QueryMetric queryMetric = builder.addMetric(HTTP_METRIC_NAME_1);
queryMetric.addTag(HTTP_TAG_NAME_1, HTTP_TAG_VALUE_2, HTTP_TAG_VALUE_3);
QueryResponse query = client.query(builder);
assertThat(query.getQueries().size(), equalTo(1));
assertThat(query.getQueries().get(0).getResults().size(), equalTo(1));
assertThat(query.getQueries().get(0).getResults().get(0).getTags().size(), equalTo(1));
assertThat(query.getQueries().get(0).getResults().get(0).getTags().get(HTTP_TAG_NAME_1).size(), equalTo(2));
assertThat(query.getQueries().get(0).getResults().get(0).getTags().get(HTTP_TAG_NAME_1), hasItems(HTTP_TAG_VALUE_2, HTTP_TAG_VALUE_3));
List<DataPoint> dataPoints = query.getQueries().get(0).getResults().get(0).getDataPoints();
assertThat(dataPoints.size(), equalTo(2));
assertThat(dataPoints.get(0).getTimestamp(), equalTo(timestamp2));
assertThat(dataPoints.get(0).longValue(), equalTo(30L));
assertThat(dataPoints.get(1).getTimestamp(), equalTo(timestamp3));
assertThat(dataPoints.get(1).longValue(), equalTo(40L));