public AlertGroupEntity createAlertGroup(long clusterId,
      Set<AlertTargetEntity> targets) throws Exception {
    AlertGroupEntity group = new AlertGroupEntity();
    group.setDefault(false);
    group.setGroupName("Group Name " + System.currentTimeMillis() + uniqueCounter.incrementAndGet());
    group.setClusterId(clusterId);
    group.setAlertTargets(targets);

    alertDispatchDAO.create(group);
    return group;
  }
Creates an alert group.

@param clusterId
@param targets
@return
@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java