@Test
  public void testAggregateAlertRecalculateEvent() throws Exception {
    Class<? extends AlertEvent> eventClass = AggregateAlertRecalculateEvent.class;

    Assert.assertFalse(m_listener.isAlertEventReceived(eventClass));
    AlertsDAO dao = injector.getInstance(AlertsDAO.class);
    dao.removeCurrentByServiceComponentHost(1, "HDFS", "DATANODE", "c6401");
    Assert.assertTrue(m_listener.isAlertEventReceived(eventClass));
    Assert.assertEquals(1, m_listener.getAlertEventReceivedCount(eventClass));
  }
Tests that {@link AggregateAlertRecalculateEvent}s are fired correctly.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java