@Test
  public void testServiceComponentUninstalledEvent() throws Exception {
    Class<? extends AmbariEvent> eventClass = ServiceComponentUninstalledEvent.class;
    installHdfsService();

    Assert.assertFalse(m_listener.isAmbariEventReceived(eventClass));
    m_cluster.getServiceComponentHosts(HOSTNAME).get(0).delete(new DeleteHostComponentStatusMetaData());

    Assert.assertTrue(m_listener.isAmbariEventReceived(eventClass));
  }
Tests that {@link ServiceComponentUninstalledEvent}s are fired correctly.

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