mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetMgrImpl.java
private Event mockGetAssetsResponseOneRemovedAsset(final int systemId)
    {
        //Call to add controller to list.
        m_SUT.getAssetsForControllerAsync(systemId);
        
        GetAssetsResponseData.Builder response = GetAssetsResponseData.newBuilder();

        //mock asset information
        FactoryObjectInfo info1 = FactoryObjectInfo.newBuilder().
            setPid(pid1).
            setUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid1)).
            setProductType(Asset.class.getName()).build();
        response.addAssetInfo(info1);
        
        // properties for the event
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, response.build());
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, systemId);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.AssetDirectoryService.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            AssetDirectoryServiceMessageType.GetAssetsResponse.toString());
        //the event
        return new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
    }
/**
     * Used to mock a message from a remote controller representing assets which that controller has.
     * This message differs from the other message that uses the same message, as this message will only
     * return one asset representing that an asset may have been removed externally. 
     */
Used to mock a message from a remote controller representing assets which that controller has.
This message differs from the other message that uses the same message, as this message will only
return one asset representing that an asset may have been removed externally.
Used to mock a message from a remote controller representing assets which that controller has . This message differs from the other message that uses the same message as this message will only return one asset representing that an asset may have been removed externally .
private Event mockGetAssetsResponseOneRemovedAsset(final int systemId)
    {
        m_SUT.getAssetsForControllerAsync(systemId);
        GetAssetsResponseData.Builder response = GetAssetsResponseData.newBuilder();
        FactoryObjectInfo info1 = FactoryObjectInfo.newBuilder().
            setPid(pid1).
            setUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid1)).
            setProductType(Asset.class.getName()).build();
        response.addAssetInfo(info1);
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, response.build());
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, systemId);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.AssetDirectoryService.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            AssetDirectoryServiceMessageType.GetAssetsResponse.toString());
        return new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
    }
private Event mockGetAssetsResponseOneRemovedAsset ( final int systemId ) { m_SUT . getAssetsForControllerAsync ( systemId ) ; GetAssetsResponseData . Builder response = GetAssetsResponseData . newBuilder ( ) ; FactoryObjectInfo info1 = FactoryObjectInfo . newBuilder ( ) . setPid ( pid1 ) . setUuid ( SharedMessageUtils . convertUUIDToProtoUUID ( uuid1 ) ) . setProductType ( Asset . class . getName ( ) ) . build ( ) ; response . addAssetInfo ( info1 ) ; final Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( RemoteConstants . EVENT_PROP_DATA_MESSAGE , response . build ( ) ) ; props . put ( RemoteConstants . EVENT_PROP_SOURCE_ID , systemId ) ; props . put ( RemoteConstants . EVENT_PROP_DEST_ID , 0 ) ; props . put ( RemoteConstants . EVENT_PROP_NAMESPACE , Namespace . AssetDirectoryService . toString ( ) ) ; props . put ( RemoteConstants . EVENT_PROP_MESSAGE_TYPE , AssetDirectoryServiceMessageType . GetAssetsResponse . toString ( ) ) ; return new Event ( RemoteConstants . TOPIC_MESSAGE_RECEIVED , props ) ; }
Used to mock a message from a remote controller representing assets which that controller has.
Used to mock a message from a remote controller representing assets which that controller has .
//Call to add controller to list. //mock asset information // properties for the event //the event