mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/advanced/configuration/TestSystemMetatypeMgrImpl.java
@Test
    public void testHandleRemoveController()
    {
        setupMetatypeList();

        assertThat(m_SUT.getConfigurationsListAsync(CONTROLLERID), is(notNullValue()));
        assertThat(m_SUT.getFactoriesListAsync(CONTROLLERID), is(notNullValue()));

        Map<String, Object> props = new HashMap<>();
        props.put(EventConstants.BUNDLE_ID, BUNDLEID);
        props.put(SharedPropertyConstants.EVENT_PROP_CONTROLLER_ID, CONTROLLERID);
        Event event = new Event(ControllerMgr.TOPIC_CONTROLLER_REMOVED, props);

        m_ControllerEventHandler.handleEvent(event);

        assertThat(m_SUT.getConfigurationsListAsync(CONTROLLERID).isEmpty(), is(true));
        assertThat(m_SUT.getFactoriesListAsync(CONTROLLERID).isEmpty(), is(true));
    }
/**
     * Test the controller event handler. Verify that all information for a given controller is removed when a
     * controller removed event is received.
     */
Test the controller event handler. Verify that all information for a given controller is removed when a
controller removed event is received.
Test the controller event handler . Verify that all information for a given controller is removed when a controller removed event is received .
@Test
    public void testHandleRemoveController()
    {
        setupMetatypeList();
        assertThat(m_SUT.getConfigurationsListAsync(CONTROLLERID), is(notNullValue()));
        assertThat(m_SUT.getFactoriesListAsync(CONTROLLERID), is(notNullValue()));
        Map<String, Object> props = new HashMap<>();
        props.put(EventConstants.BUNDLE_ID, BUNDLEID);
        props.put(SharedPropertyConstants.EVENT_PROP_CONTROLLER_ID, CONTROLLERID);
        Event event = new Event(ControllerMgr.TOPIC_CONTROLLER_REMOVED, props);
        m_ControllerEventHandler.handleEvent(event);
        assertThat(m_SUT.getConfigurationsListAsync(CONTROLLERID).isEmpty(), is(true));
        assertThat(m_SUT.getFactoriesListAsync(CONTROLLERID).isEmpty(), is(true));
    }
@ Test public void testHandleRemoveController ( ) { setupMetatypeList ( ) ; assertThat ( m_SUT . getConfigurationsListAsync ( CONTROLLERID ) , is ( notNullValue ( ) ) ) ; assertThat ( m_SUT . getFactoriesListAsync ( CONTROLLERID ) , is ( notNullValue ( ) ) ) ; Map < String , Object > props = new HashMap < > ( ) ; props . put ( EventConstants . BUNDLE_ID , BUNDLEID ) ; props . put ( SharedPropertyConstants . EVENT_PROP_CONTROLLER_ID , CONTROLLERID ) ; Event event = new Event ( ControllerMgr . TOPIC_CONTROLLER_REMOVED , props ) ; m_ControllerEventHandler . handleEvent ( event ) ; assertThat ( m_SUT . getConfigurationsListAsync ( CONTROLLERID ) . isEmpty ( ) , is ( true ) ) ; assertThat ( m_SUT . getFactoriesListAsync ( CONTROLLERID ) . isEmpty ( ) , is ( true ) ) ; }
Test the controller event handler.
Test the controller event handler .