protected void assertMetricDataEquals(int scheduleId, Bucket bucket, AggregateNumericMetric... expected) {
assertMetricDataEquals(scheduleId, bucket, asList(expected));
}
protected void assertMetricDataEquals(int scheduleId, Bucket bucket, List<AggregateNumericMetric> expected) {
ResultSet resultSet = session.execute(
"select schedule_id, bucket, time, avg, max, min " +
"from " + MetricsTable.AGGREGATE + " " +
"where schedule_id = " + scheduleId + " and bucket = '" + bucket + "'");
List<AggregateNumericMetric> actual = aggregateMapper.mapAll(resultSet);
assertCollectionMatchesNoOrder("Metric data for schedule id " + scheduleId + " in bucket " + bucket +