@Test
  public void testServiceRemovedEvent() throws Exception {
    Class<? extends AmbariEvent> eventClass = ServiceRemovedEvent.class;
    Assert.assertFalse(m_listener.isAmbariEventReceived(eventClass));
    installHdfsService();
    m_cluster.deleteAllServices();
    Assert.assertTrue(m_listener.isAmbariEventReceived(eventClass));
  }
Tests that {@link ServiceRemovedEvent}s are fired correctly.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java