mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetMgrImpl.java
private Event mockGetAssetsResponse(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);
        
        //mock asset information
        FactoryObjectInfo info2 = FactoryObjectInfo.newBuilder().
            setPid(pid2).
            setUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid2)).
            setProductType(Asset.class.getName()).build();
        response.addAssetInfo(info2);
        
        // 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. 
     */
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 .
private Event mockGetAssetsResponse(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);
        FactoryObjectInfo info2 = FactoryObjectInfo.newBuilder().
            setPid(pid2).
            setUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid2)).
            setProductType(Asset.class.getName()).build();
        response.addAssetInfo(info2);
        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 mockGetAssetsResponse ( 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 ) ; FactoryObjectInfo info2 = FactoryObjectInfo . newBuilder ( ) . setPid ( pid2 ) . setUuid ( SharedMessageUtils . convertUUIDToProtoUUID ( uuid2 ) ) . setProductType ( Asset . class . getName ( ) ) . build ( ) ; response . addAssetInfo ( info2 ) ; 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 //mock asset information // properties for the event //the event