test_class.declarator: validator = new AlarmValidator()
test_class.modifier: private
test_class.original_string: private AlarmValidator validator = new AlarmValidator();
test_class.type: AlarmValidator
test_class.var_name: validator
test_class.file: services/src/test/java/com/vsct/supervision/notification/model/AlarmValidatorTest.java
test_class.identifier: AlarmValidatorTest
test_case.body: @Test
      public void validateAlarmWithNoTargetFails() throws Exception {
          Alarm alarm = TestUtils.getDefaultAlarm();
          alarm.setTarget(null);
          try {
              validator.validateAlarm(alarm);
          } catch (CerebroException ce) {
              assertEquals(ErrorCode.ALARM_INVALID, ce.getErrorCode());
          }
      }
test_case.class_method_signature: AlarmValidatorTest.validateAlarmWithNoTargetFails()
test_case.full_signature: @Test public void validateAlarmWithNoTargetFails()
test_case.identifier: validateAlarmWithNoTargetFails
test_case.invocations: getDefaultAlarm setTarget validateAlarm assertEquals getErrorCode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void validateAlarmWithNoTargetFails()
focal_class.file: services/src/main/java/com/vsct/supervision/notification/model/AlarmValidator.java
focal_class.identifier: AlarmValidator
focal_class.class_method_signature: AlarmValidator.validateAlarm(final Alarm alarm)
focal_class.full_signature: public void validateAlarm(final Alarm alarm)
focal_class.identifier: validateAlarm
focal_class.modifiers: public
focal_class.parameters: (final Alarm alarm)
focal_class.return: void
focal_class.signature: void validateAlarm(final Alarm alarm)
focal_method.body: public void validateAlarm(final Alarm alarm) throws CerebroException {
          // Validate required fields
          if (StringUtils.isEmpty(alarm.getName())) {
              throw new CerebroException(ErrorCode.ALARM_INVALID, "Alarm name is required.");
          }
  
          if (StringUtils.isEmpty(alarm.getTarget()) || StringUtils.startsWithIgnoreCase(alarm.getTarget(), "*")) {
              throw new CerebroException(ErrorCode.ALARM_INVALID, "Alarm target is required.");
          }
  
          if (StringUtils.isEmpty(alarm.getWarn())) {
              throw new CerebroException(ErrorCode.ALARM_INVALID, "Alarm warning threshold is required.");
          }
  
          if (StringUtils.isEmpty(alarm.getError())) {
              throw new CerebroException(ErrorCode.ALARM_INVALID, "Alarm error threshold is required.");
          }
      }
focal_method.class_method_signature: AlarmValidator.validateAlarm(final Alarm alarm)
focal_method.full_signature: public void validateAlarm(final Alarm alarm)
focal_method.identifier: validateAlarm
focal_method.invocations: isEmpty getName isEmpty getTarget startsWithIgnoreCase getTarget isEmpty getWarn isEmpty getError
focal_method.modifiers: public
focal_method.parameters: (final Alarm alarm)
focal_method.return: void
focal_method.signature: void validateAlarm(final Alarm alarm)