@Test
  public void testAlertInfo() throws Exception {
    AlertHistoryEntity history = m_histories.get(0);
    AlertInfo alertInfo = new AlertInfo(history);
    assertEquals(history.getAlertDefinition().getLabel(), alertInfo.getAlertName());
    assertEquals(history.getAlertState(), alertInfo.getAlertState());
    assertEquals(history.getAlertText(), alertInfo.getAlertText());
    assertEquals(history.getComponentName(), alertInfo.getComponentName());
    assertEquals(history.getHostName(), alertInfo.getHostName());
    assertEquals(history.getServiceName(), alertInfo.getServiceName());

    assertEquals(false, alertInfo.hasComponentName());
    assertEquals(true, alertInfo.hasHostName());
  }
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