* violations. It also verifies that no OOB is generated a schedule whose values stay
* in bounds.
*/
@Test
public void calculateOOBs() {
final MeasurementSchedule schedule1 = createSchedule();
final MeasurementSchedule schedule2 = createSchedule();
MeasurementSchedule schedule3 = createSchedule();
DateTime currentHour = now().hourOfDay().roundFloorCopy();
final DateTime lastHour = currentHour.minusHours(1);
insertBaselines(asList( //
baseline(schedule1, 4.34, 3.9, 5.2), //
baseline(schedule2, 7.43, 7.38, 7.49), //
baseline(schedule3, 3.2, 2.95, 3.6) //
));
List<AggregateNumericMetric> metrics = asList( //
new AggregateNumericMetric(schedule1.getId(), Bucket.ONE_HOUR, 3.8, 2.11, 4.6, lastHour.getMillis()), //
new AggregateNumericMetric(schedule2.getId(), Bucket.ONE_HOUR, 9.492, 9.481, 9.53, lastHour.getMillis()), //
new AggregateNumericMetric(schedule3.getId(), Bucket.ONE_HOUR, 3.15, 2.96, 3.59, lastHour.getMillis()) //
);
oobManager.computeOOBsForLastHour(overlord, metrics);
executeInTransaction(new TransactionCallback() {