@Test
public void validateAlarmWithNoWarnThresholdFails() throws Exception {

    Alarm alarm = TestUtils.getDefaultAlarm();
    alarm.setWarn(null);
    try {
        validator.validateAlarm(alarm);
    } catch (CerebroException ce) {
        assertEquals(ErrorCode.ALARM_INVALID, ce.getErrorCode());
    }
}