@Test
public void updateNonexistentAlarmFail() throws Exception {

    Alarm updatedAlarm = TestUtils.getDefaultAlarm();
    updatedAlarm.setId(TestUtils.NONEXISTING_ALARM_ID);
    try {
        alarmService.updateAlarm(updatedAlarm);
        fail("Update non existing alarm should throw an exception");
    } catch (CerebroException ce) {
        assertEquals(ErrorCode.ALARM_UNKNOWN, ce.getErrorCode());
    }
}