AlertCondition ac = new AlertCondition();
ac.setCategory(AlertConditionCategory.THRESHOLD);
ac.setMeasurementDefinition(testData.getMeasurementDef());
ac.setComparator("<");
ac.setThreshold(0.5);
alertDefinition.addCondition(ac);
AlertDefinition newAlertDefinition = alertDefinitionManager.createAlertDefinitionInNewTransaction(
testData.getSubject(), alertDefinition, null, true);
testData.getAlertDefinitionIds().add(newAlertDefinition.getId());
return newAlertDefinition.getId();