mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestScanForAssetsHelperImpl.java
@Test
    public void testHandlerResponseScanRequest()
    {
        when(m_MessageFactory.createAssetDirectoryServiceMessage(
                eq(AssetDirectoryServiceMessageType.ScanForNewAssetsRequest), 
                Mockito.any(Message.class))).thenReturn(m_MessageWrapper);
        
        AssetDirectoryServiceNamespace namespaceMsg = AssetDirectoryServiceNamespace.newBuilder()
                .setType(AssetDirectoryServiceMessageType.ScanForNewAssetsResponse).build();
        TerraHarvestPayload payload = TerraHarvestPayload.newBuilder().setNamespace(Namespace.AssetDirectoryService)
                .setNamespaceMessage(namespaceMsg.toByteString()).build();
        Version version = Version.newBuilder().setMajor(0).setMinor(0).build();
        TerraHarvestMessage thMsg = TerraHarvestMessage.newBuilder().setDestId(0).setSourceId(500).setMessageId(5)
                    .setVersion(version).setTerraHarvestPayload(payload.toByteString()).build();
        
        m_SUT.handleResponse(thMsg, payload, namespaceMsg, null);

        verify(m_GrowlUtil).createLocalFacesMessage(FacesMessage.SEVERITY_INFO, "Asset Scan Complete", 
                "Scan for new assets has completed.");
    }
/**
     * Verify that a growl message is posted when a get scan for asset response message
     * is received.
     */
Verify that a growl message is posted when a get scan for asset response message
is received.
Verify that a growl message is posted when a get scan for asset response message is received .
@Test
    public void testHandlerResponseScanRequest()
    {
        when(m_MessageFactory.createAssetDirectoryServiceMessage(
                eq(AssetDirectoryServiceMessageType.ScanForNewAssetsRequest), 
                Mockito.any(Message.class))).thenReturn(m_MessageWrapper);
        AssetDirectoryServiceNamespace namespaceMsg = AssetDirectoryServiceNamespace.newBuilder()
                .setType(AssetDirectoryServiceMessageType.ScanForNewAssetsResponse).build();
        TerraHarvestPayload payload = TerraHarvestPayload.newBuilder().setNamespace(Namespace.AssetDirectoryService)
                .setNamespaceMessage(namespaceMsg.toByteString()).build();
        Version version = Version.newBuilder().setMajor(0).setMinor(0).build();
        TerraHarvestMessage thMsg = TerraHarvestMessage.newBuilder().setDestId(0).setSourceId(500).setMessageId(5)
                    .setVersion(version).setTerraHarvestPayload(payload.toByteString()).build();
        m_SUT.handleResponse(thMsg, payload, namespaceMsg, null);
        verify(m_GrowlUtil).createLocalFacesMessage(FacesMessage.SEVERITY_INFO, "Asset Scan Complete", 
                "Scan for new assets has completed.");
    }
@ Test public void testHandlerResponseScanRequest ( ) { when ( m_MessageFactory . createAssetDirectoryServiceMessage ( eq ( AssetDirectoryServiceMessageType . ScanForNewAssetsRequest ) , Mockito . any ( Message . class ) ) ) . thenReturn ( m_MessageWrapper ) ; AssetDirectoryServiceNamespace namespaceMsg = AssetDirectoryServiceNamespace . newBuilder ( ) . setType ( AssetDirectoryServiceMessageType . ScanForNewAssetsResponse ) . build ( ) ; TerraHarvestPayload payload = TerraHarvestPayload . newBuilder ( ) . setNamespace ( Namespace . AssetDirectoryService ) . setNamespaceMessage ( namespaceMsg . toByteString ( ) ) . build ( ) ; Version version = Version . newBuilder ( ) . setMajor ( 0 ) . setMinor ( 0 ) . build ( ) ; TerraHarvestMessage thMsg = TerraHarvestMessage . newBuilder ( ) . setDestId ( 0 ) . setSourceId ( 500 ) . setMessageId ( 5 ) . setVersion ( version ) . setTerraHarvestPayload ( payload . toByteString ( ) ) . build ( ) ; m_SUT . handleResponse ( thMsg , payload , namespaceMsg , null ) ; verify ( m_GrowlUtil ) . createLocalFacesMessage ( FacesMessage . SEVERITY_INFO , "Asset Scan Complete" , "Scan for new assets has completed." ) ; }
Verify that a growl message is posted when a get scan for asset response message
 is received.
Verify that a growl message is posted when a get scan for asset response message is received .