@Test
  public void testAlertSummaryInfo() throws Exception {
    AlertSummaryInfo alertInfo = new AlertSummaryInfo(m_histories);
    assertEquals(50, alertInfo.getAlerts().size());
    assertEquals(10, alertInfo.getAlerts("Service 1").size());
    assertEquals(10, alertInfo.getAlerts("Service 2").size());

    assertEquals(8, alertInfo.getAlerts("Service 1", "OK").size());
    assertEquals(2, alertInfo.getAlerts("Service 1", "CRITICAL").size());
    assertNull(alertInfo.getAlerts("Service 1", "WARNING"));
    assertNull(alertInfo.getAlerts("Service 1", "UNKNOWN"));

    assertEquals(5, alertInfo.getServices().size());
  }
Tests the parsing of the {@link AlertHistoryEntity} list into
{@link AlertSummaryInfo}.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/state/services/AlertNoticeDispatchServiceTest.java