td.setProducerName(PaymentCounter.class.getSimpleName());
td.setIntervalName("1m");
td.setStatName("cc");
td.setValueName("counter");
Threshold tt = ThresholdRepository.getInstance().createThreshold(td);
tt.addLongGuardLineDownUp(5,5, 10, 15, 20);
System.out.println(tt);
//fire the threshold
IntervalRegistry.getInstance().forceUpdateIntervalForTestingPurposes("1m");
assertEquals(ThresholdStatus.GREEN, tt.getStatus());
//force next update
counter.cc(); counter.cc(); counter.cc();
counter.cc(); counter.cc(); counter.cc();
//fire the threshold
IntervalRegistry.getInstance().forceUpdateIntervalForTestingPurposes("1m");
assertEquals(ThresholdStatus.YELLOW, tt.getStatus());
}