mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetMgrImpl.java
private Event mockGetStatusResponse(final int systemId)
    {
        //Call to add controller to list.
        m_SUT.getAssetsForControllerAsync(systemId);
        
        //create a status
        ObservationGen.Observation protoStat = ObservationGen.Observation.newBuilder().
                setSystemInTestMode(true).
                setAssetUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid1)).
                setAssetName("asset").
                setCreatedTimestamp(System.currentTimeMillis()).
                setAssetType("type").
                setVersion(Version.newBuilder().setMajorNumber(1).setMinorNumber(2).build()).
                setSystemId(0).
                setUuid(SharedMessageUtils.convertUUIDToProtoUUID(UUID.randomUUID())).
                setStatus(
                     StatusGen.Status.newBuilder().
                     setSummaryStatus(OperatingStatus.newBuilder()
                         .setSummary(SummaryStatusEnumConverter.convertJavaEnumToProto(SummaryStatusEnum.OFF))
                         .build())).build();
        GetLastStatusResponseData response = GetLastStatusResponseData.newBuilder().
            setAssetUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid1)).
            setStatusObservationNative(protoStat).build();

        // properties for the event
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, response);
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, systemId);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.Asset.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            AssetMessageType.GetLastStatusResponse.toString());
        //the event
        return new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
    }
/**
     * Used to mock a message from a remote controller representing an asset's summary status.
     */
Used to mock a message from a remote controller representing an asset's summary status.
Used to mock a message from a remote controller representing an asset ' s summary status .
private Event mockGetStatusResponse(final int systemId)
    {
        m_SUT.getAssetsForControllerAsync(systemId);
        ObservationGen.Observation protoStat = ObservationGen.Observation.newBuilder().
                setSystemInTestMode(true).
                setAssetUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid1)).
                setAssetName("asset").
                setCreatedTimestamp(System.currentTimeMillis()).
                setAssetType("type").
                setVersion(Version.newBuilder().setMajorNumber(1).setMinorNumber(2).build()).
                setSystemId(0).
                setUuid(SharedMessageUtils.convertUUIDToProtoUUID(UUID.randomUUID())).
                setStatus(
                     StatusGen.Status.newBuilder().
                     setSummaryStatus(OperatingStatus.newBuilder()
                         .setSummary(SummaryStatusEnumConverter.convertJavaEnumToProto(SummaryStatusEnum.OFF))
                         .build())).build();
        GetLastStatusResponseData response = GetLastStatusResponseData.newBuilder().
            setAssetUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid1)).
            setStatusObservationNative(protoStat).build();
        final Map<String, Object> props = new HashMap<String, Object>();
        props.put(RemoteConstants.EVENT_PROP_DATA_MESSAGE, response);
        props.put(RemoteConstants.EVENT_PROP_SOURCE_ID, systemId);
        props.put(RemoteConstants.EVENT_PROP_DEST_ID, 0);
        props.put(RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.Asset.toString());
        props.put(RemoteConstants.EVENT_PROP_MESSAGE_TYPE, 
            AssetMessageType.GetLastStatusResponse.toString());
        return new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
    }
private Event mockGetStatusResponse ( final int systemId ) { m_SUT . getAssetsForControllerAsync ( systemId ) ; ObservationGen . Observation protoStat = ObservationGen . Observation . newBuilder ( ) . setSystemInTestMode ( true ) . setAssetUuid ( SharedMessageUtils . convertUUIDToProtoUUID ( uuid1 ) ) . setAssetName ( "asset" ) . setCreatedTimestamp ( System . currentTimeMillis ( ) ) . setAssetType ( "type" ) . setVersion ( Version . newBuilder ( ) . setMajorNumber ( 1 ) . setMinorNumber ( 2 ) . build ( ) ) . setSystemId ( 0 ) . setUuid ( SharedMessageUtils . convertUUIDToProtoUUID ( UUID . randomUUID ( ) ) ) . setStatus ( StatusGen . Status . newBuilder ( ) . setSummaryStatus ( OperatingStatus . newBuilder ( ) . setSummary ( SummaryStatusEnumConverter . convertJavaEnumToProto ( SummaryStatusEnum . OFF ) ) . build ( ) ) ) . build ( ) ; GetLastStatusResponseData response = GetLastStatusResponseData . newBuilder ( ) . setAssetUuid ( SharedMessageUtils . convertUUIDToProtoUUID ( uuid1 ) ) . setStatusObservationNative ( protoStat ) . build ( ) ; final Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( RemoteConstants . EVENT_PROP_DATA_MESSAGE , response ) ; props . put ( RemoteConstants . EVENT_PROP_SOURCE_ID , systemId ) ; props . put ( RemoteConstants . EVENT_PROP_DEST_ID , 0 ) ; props . put ( RemoteConstants . EVENT_PROP_NAMESPACE , Namespace . Asset . toString ( ) ) ; props . put ( RemoteConstants . EVENT_PROP_MESSAGE_TYPE , AssetMessageType . GetLastStatusResponse . toString ( ) ) ; return new Event ( RemoteConstants . TOPIC_MESSAGE_RECEIVED , props ) ; }
Used to mock a message from a remote controller representing an asset's summary status.
Used to mock a message from a remote controller representing an asset ' s summary status .
//Call to add controller to list. //create a status // properties for the event //the event