mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetDisplayHelperImpl.java
@Test
    public void testActiveControllerEventHandler()
    {
        FactoryObjMgr mgr = mock(FactoryObjMgr.class);
        AssetModel asset = new AssetModel(5, UUID.randomUUID(), "bob", "bobType", 
                mgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        m_SUT.setSelectedFactoryObject(asset);
        
        //Verify that null isn't returned for the select asset.
        assertThat(m_SUT.getSelectedFactoryObject(), is(notNullValue()));
        
        //Create active controller changed event.
        Map<String, Object> props = new HashMap<String, Object>();
        Event actvieControllerChanged = new Event(ActiveController.TOPIC_ACTIVE_CONTROLLER_CHANGED, props);
        
        //Call active controller handle event method.
        m_ActiveControllerHandler.handleEvent(actvieControllerChanged);
        
        //Verify that null is returned for the select asset since the active controller has changed.
        assertThat(m_SUT.getSelectedFactoryObject(), is(nullValue()));
    }
/**
     * Test that the active controller event handler handles an active controller changed event appropriately.
     * Verify that the selected asset is returned to null when the active controller is changed.
     */
Test that the active controller event handler handles an active controller changed event appropriately.
Verify that the selected asset is returned to null when the active controller is changed.
Test that the active controller event handler handles an active controller changed event appropriately . Verify that the selected asset is returned to null when the active controller is changed .
@Test
    public void testActiveControllerEventHandler()
    {
        FactoryObjMgr mgr = mock(FactoryObjMgr.class);
        AssetModel asset = new AssetModel(5, UUID.randomUUID(), "bob", "bobType", 
                mgr, m_ConfigWrapper, m_AssetTypesMgr, m_AssetImageInterface);
        m_SUT.setSelectedFactoryObject(asset);
        assertThat(m_SUT.getSelectedFactoryObject(), is(notNullValue()));
        Map<String, Object> props = new HashMap<String, Object>();
        Event actvieControllerChanged = new Event(ActiveController.TOPIC_ACTIVE_CONTROLLER_CHANGED, props);
        m_ActiveControllerHandler.handleEvent(actvieControllerChanged);
        assertThat(m_SUT.getSelectedFactoryObject(), is(nullValue()));
    }
@ Test public void testActiveControllerEventHandler ( ) { FactoryObjMgr mgr = mock ( FactoryObjMgr . class ) ; AssetModel asset = new AssetModel ( 5 , UUID . randomUUID ( ) , "bob" , "bobType" , mgr , m_ConfigWrapper , m_AssetTypesMgr , m_AssetImageInterface ) ; m_SUT . setSelectedFactoryObject ( asset ) ; assertThat ( m_SUT . getSelectedFactoryObject ( ) , is ( notNullValue ( ) ) ) ; Map < String , Object > props = new HashMap < String , Object > ( ) ; Event actvieControllerChanged = new Event ( ActiveController . TOPIC_ACTIVE_CONTROLLER_CHANGED , props ) ; m_ActiveControllerHandler . handleEvent ( actvieControllerChanged ) ; assertThat ( m_SUT . getSelectedFactoryObject ( ) , is ( nullValue ( ) ) ) ; }
Test that the active controller event handler handles an active controller changed event appropriately.
Test that the active controller event handler handles an active controller changed event appropriately .
//Verify that null isn't returned for the select asset. //Create active controller changed event. //Call active controller handle event method. //Verify that null is returned for the select asset since the active controller has changed.