metricsServer.setIndexPartitions(2);
dateTimeService.setNow(hour(5).plusMinutes(5));
metricsServer.addNumericData(data, waitForRawInserts);
waitForRawInserts.await("Failed to insert raw data");
RawNumericMetric expected1 = new RawNumericMetric(scheduleId1, hour(5).plusMinutes(2).getMillis(), 3.14);
RawNumericMetric expected2 = new RawNumericMetric(scheduleId2, hour(5).plusMinutes(3).getMillis(), 3.14);
RawNumericMetric expected3 = new RawNumericMetric(scheduleId3, hour(5).plusMinutes(3).getMillis(), 3.14);
RawNumericMetric expected4 = new RawNumericMetric(scheduleId4, hour(5).plusMinutes(4).getMillis(), 3.14);
assertRawDataEquals(scheduleId1, hour(5), hour(6), expected1);
assertRawDataEquals(scheduleId2, hour(5), hour(6), expected2);
assertRawDataEquals(scheduleId3, hour(5), hour(6), expected3);
assertRawDataEquals(scheduleId4, hour(5), hour(6), expected4);