mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetMgrImpl.java
@Test
    public void testHandleRemoteEventNotAssetRelated()
    {
        //load assets for one system
        Event getAssetsReponse = mockGetAssetsResponse(systemId1);
        
        //this should render two assets for the system id
        m_AssetDirHelper.handleEvent(getAssetsReponse);
        
        //verify messages sent for the GetAssetsResponse
        //one asset dir svc to get the assets
        verify(m_MessageFactory, times(1)).createAssetDirectoryServiceMessage(Mockito.any(
            AssetDirectoryServiceMessageType.class), Mockito.any(Message.class));
        //asset messages for name, status, etc.
        verify(m_MessageFactory, times(6)).createAssetMessage(Mockito.any(
                AssetMessageType.class), Mockito.any(Message.class));
        verify(m_MessageWrapper, times(8)).queue(anyInt(), Mockito.any(ResponseHandler.class));
        
        //verify assets added
        assertThat(m_SUT.getAssetsForControllerAsync(systemId1).size(), is(2));
        
        //mock event that is not related to assets
        Event assetActivated = mockEventNotAssetRelated(systemId1);
        
        m_EventHelper.handleEvent(assetActivated);
        
        //verify that no messages were, nor growl messages posted
        verify(m_MessageFactory, times(1)).createAssetDirectoryServiceMessage(Mockito.any(
            AssetDirectoryServiceMessageType.class), Mockito.any(Message.class));
        verify(m_MessageFactory, times(6)).createAssetMessage(Mockito.any(
                AssetMessageType.class), Mockito.any(Message.class));
        verify(m_MessageWrapper, times(8)).queue(anyInt(), Mockito.any(ResponseHandler.class));
        
        verify(m_GrowlUtil, never()).createGlobalFacesMessage(Mockito.any(Severity.class), anyString(), anyString());

        //verify that no additional asset models were added
        List<AssetModel> models = m_SUT.getAssetsForControllerAsync(systemId1);
        assertThat(models.size(), is(2));

        /* Aside from adding an asset, or updating a configuration value an event message can change an
         * asset's status. Verify that the assets status's are set at the default of null. 
         */
        for (AssetModel model : models)
        {
            assertThat(model.getActiveStatus(), is(nullValue()));
        }
    }
/**
     * Test the handling of event that is not an asset related event.
     * Verify nothing happens.
     */
Test the handling of event that is not an asset related event.
Verify nothing happens.
Test the handling of event that is not an asset related event . Verify nothing happens .
@Test
    public void testHandleRemoteEventNotAssetRelated()
    {
        Event getAssetsReponse = mockGetAssetsResponse(systemId1);
        m_AssetDirHelper.handleEvent(getAssetsReponse);
        verify(m_MessageFactory, times(1)).createAssetDirectoryServiceMessage(Mockito.any(
            AssetDirectoryServiceMessageType.class), Mockito.any(Message.class));
        verify(m_MessageFactory, times(6)).createAssetMessage(Mockito.any(
                AssetMessageType.class), Mockito.any(Message.class));
        verify(m_MessageWrapper, times(8)).queue(anyInt(), Mockito.any(ResponseHandler.class));
        assertThat(m_SUT.getAssetsForControllerAsync(systemId1).size(), is(2));
        Event assetActivated = mockEventNotAssetRelated(systemId1);
        m_EventHelper.handleEvent(assetActivated);
        verify(m_MessageFactory, times(1)).createAssetDirectoryServiceMessage(Mockito.any(
            AssetDirectoryServiceMessageType.class), Mockito.any(Message.class));
        verify(m_MessageFactory, times(6)).createAssetMessage(Mockito.any(
                AssetMessageType.class), Mockito.any(Message.class));
        verify(m_MessageWrapper, times(8)).queue(anyInt(), Mockito.any(ResponseHandler.class));
        verify(m_GrowlUtil, never()).createGlobalFacesMessage(Mockito.any(Severity.class), anyString(), anyString());
        List<AssetModel> models = m_SUT.getAssetsForControllerAsync(systemId1);
        assertThat(models.size(), is(2));
        /* Aside from adding an asset, or updating a configuration value an event message can change an
         * asset's status. Verify that the assets status's are set at the default of null. 
         */
        for (AssetModel model : models)
        {
            assertThat(model.getActiveStatus(), is(nullValue()));
        }
    }
@ Test public void testHandleRemoteEventNotAssetRelated ( ) { Event getAssetsReponse = mockGetAssetsResponse ( systemId1 ) ; m_AssetDirHelper . handleEvent ( getAssetsReponse ) ; verify ( m_MessageFactory , times ( 1 ) ) . createAssetDirectoryServiceMessage ( Mockito . any ( AssetDirectoryServiceMessageType . class ) , Mockito . any ( Message . class ) ) ; verify ( m_MessageFactory , times ( 6 ) ) . createAssetMessage ( Mockito . any ( AssetMessageType . class ) , Mockito . any ( Message . class ) ) ; verify ( m_MessageWrapper , times ( 8 ) ) . queue ( anyInt ( ) , Mockito . any ( ResponseHandler . class ) ) ; assertThat ( m_SUT . getAssetsForControllerAsync ( systemId1 ) . size ( ) , is ( 2 ) ) ; Event assetActivated = mockEventNotAssetRelated ( systemId1 ) ; m_EventHelper . handleEvent ( assetActivated ) ; verify ( m_MessageFactory , times ( 1 ) ) . createAssetDirectoryServiceMessage ( Mockito . any ( AssetDirectoryServiceMessageType . class ) , Mockito . any ( Message . class ) ) ; verify ( m_MessageFactory , times ( 6 ) ) . createAssetMessage ( Mockito . any ( AssetMessageType . class ) , Mockito . any ( Message . class ) ) ; verify ( m_MessageWrapper , times ( 8 ) ) . queue ( anyInt ( ) , Mockito . any ( ResponseHandler . class ) ) ; verify ( m_GrowlUtil , never ( ) ) . createGlobalFacesMessage ( Mockito . any ( Severity . class ) , anyString ( ) , anyString ( ) ) ; List < AssetModel > models = m_SUT . getAssetsForControllerAsync ( systemId1 ) ; assertThat ( models . size ( ) , is ( 2 ) ) ; /* Aside from adding an asset, or updating a configuration value an event message can change an
         * asset's status. Verify that the assets status's are set at the default of null. 
         */ for ( AssetModel model : models ) { assertThat ( model . getActiveStatus ( ) , is ( nullValue ( ) ) ) ; } }
Test the handling of event that is not an asset related event.
Test the handling of event that is not an asset related event .
//load assets for one system //this should render two assets for the system id //verify messages sent for the GetAssetsResponse //one asset dir svc to get the assets //asset messages for name, status, etc. //verify assets added //mock event that is not related to assets //verify that no messages were, nor growl messages posted //verify that no additional asset models were added