mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetMgrImpl.java
@Test
    public void testHandleRemoteEventCreatedObject()
    {
        //mock event that a factory object was created for this new system
        Event objectCreated = mockEventAssetCreated(systemId2);
        
        m_EventHelper.handleEvent(objectCreated);
        
        //verify request for assets
        verify(m_MessageFactory).createAssetDirectoryServiceMessage(
                eq(AssetDirectoryServiceMessageType.GetAssetsRequest),Mockito.any(Message.class));
        verify(m_MessageWrapper, times(4)).queue(eq(systemId2), (ResponseHandler) eq(null));
        
        //verify request for asset info
        verify(m_MessageFactory).createAssetMessage(
                eq(AssetMessageType.GetActiveStatusRequest), Mockito.any(Message.class));
        verify(m_MessageWrapper, times(4)).queue(eq(systemId2), (ResponseHandler) eq(null));
        verify(m_MessageFactory).createAssetMessage(
                eq(AssetMessageType.GetNameRequest),
                Mockito.any(Message.class));
        verify(m_MessageFactory,times(1)).createAssetMessage(eq(AssetMessageType.GetLastStatusRequest), 
               Mockito.any(Message.class));
        verify(m_MessageWrapper, times(4)).queue(eq(systemId2), (ResponseHandler) eq(null));
    }
/**
     * Test the handling of remote object created event message.
     * Verify the get assets request is sent.
     */
Test the handling of remote object created event message.
Verify the get assets request is sent.
Test the handling of remote object created event message . Verify the get assets request is sent .
@Test
    public void testHandleRemoteEventCreatedObject()
    {
        Event objectCreated = mockEventAssetCreated(systemId2);
        m_EventHelper.handleEvent(objectCreated);
        verify(m_MessageFactory).createAssetDirectoryServiceMessage(
                eq(AssetDirectoryServiceMessageType.GetAssetsRequest),Mockito.any(Message.class));
        verify(m_MessageWrapper, times(4)).queue(eq(systemId2), (ResponseHandler) eq(null));
        verify(m_MessageFactory).createAssetMessage(
                eq(AssetMessageType.GetActiveStatusRequest), Mockito.any(Message.class));
        verify(m_MessageWrapper, times(4)).queue(eq(systemId2), (ResponseHandler) eq(null));
        verify(m_MessageFactory).createAssetMessage(
                eq(AssetMessageType.GetNameRequest),
                Mockito.any(Message.class));
        verify(m_MessageFactory,times(1)).createAssetMessage(eq(AssetMessageType.GetLastStatusRequest), 
               Mockito.any(Message.class));
        verify(m_MessageWrapper, times(4)).queue(eq(systemId2), (ResponseHandler) eq(null));
    }
@ Test public void testHandleRemoteEventCreatedObject ( ) { Event objectCreated = mockEventAssetCreated ( systemId2 ) ; m_EventHelper . handleEvent ( objectCreated ) ; verify ( m_MessageFactory ) . createAssetDirectoryServiceMessage ( eq ( AssetDirectoryServiceMessageType . GetAssetsRequest ) , Mockito . any ( Message . class ) ) ; verify ( m_MessageWrapper , times ( 4 ) ) . queue ( eq ( systemId2 ) , ( ResponseHandler ) eq ( null ) ) ; verify ( m_MessageFactory ) . createAssetMessage ( eq ( AssetMessageType . GetActiveStatusRequest ) , Mockito . any ( Message . class ) ) ; verify ( m_MessageWrapper , times ( 4 ) ) . queue ( eq ( systemId2 ) , ( ResponseHandler ) eq ( null ) ) ; verify ( m_MessageFactory ) . createAssetMessage ( eq ( AssetMessageType . GetNameRequest ) , Mockito . any ( Message . class ) ) ; verify ( m_MessageFactory , times ( 1 ) ) . createAssetMessage ( eq ( AssetMessageType . GetLastStatusRequest ) , Mockito . any ( Message . class ) ) ; verify ( m_MessageWrapper , times ( 4 ) ) . queue ( eq ( systemId2 ) , ( ResponseHandler ) eq ( null ) ) ; }
Test the handling of remote object created event message.
Test the handling of remote object created event message .
//mock event that a factory object was created for this new system //verify request for assets //verify request for asset info