private Set<AlertDefinitionEntity> getMockDefinitions() throws Exception {
    AlertDefinitionEntity entity = new AlertDefinitionEntity();
    entity.setClusterId(Long.valueOf(1L));
    entity.setComponentName(null);
    entity.setDefinitionId(ALERT_DEF_ID);
    entity.setDefinitionName(ALERT_DEF_NAME);
    entity.setLabel(ALERT_DEF_LABEL);
    entity.setDescription(ALERT_DEF_DESCRIPTION);
    entity.setEnabled(true);
    entity.setHash(DEFINITION_UUID);
    entity.setScheduleInterval(Integer.valueOf(2));
    entity.setServiceName(null);
    entity.setSourceType(SourceType.METRIC);
    entity.setSource("{\"type\" : \"METRIC\"}");

    Set<AlertDefinitionEntity> definitions = new HashSet<>();
    definitions.add(entity);

    return definitions;
  }
Gets some mock {@link AlertDefinitionEntity} instances.

@return
@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProviderTest.java