mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetMgrImpl.java
private Event mockExecuteGetPositionCommandResponse(final int systemId, double expectedLongitude, 
            double expectedLatitude, double expectedAltitude, double expectedBank, double expectedElevation, 
            double expectedHeading)
    {
        //Call to add controller to list.
        m_SUT.getAssetsForControllerAsync(systemId);
        
        //create all the orientation and coordinates measurements and put them in the response
        LongitudeWgsDegrees newLongitude = LongitudeWgsDegrees.newBuilder().
                setValue(expectedLongitude).
                build();
        
        LatitudeWgsDegrees newLatitude = LatitudeWgsDegrees.newBuilder().
                setValue(expectedLatitude).
                build();
        
        HaeMeters newHaeMeters = HaeMeters.newBuilder().
                setValue(expectedAltitude).
                build();
        
        //Create new observation object
        BankDegrees newBank = BankDegrees.newBuilder().
                setValue(expectedBank).
                build();
        
        ElevationDegrees newElevation = ElevationDegrees.newBuilder().
                setValue(expectedElevation).
                build();
        
        HeadingDegrees newHeading = HeadingDegrees.newBuilder().
                setValue(expectedHeading).
                build();
        
        Orientation orien = Orientation.newBuilder().
                setBank(newBank).
                setElevation(newElevation).
                setHeading(newHeading).
                build();
        
        Coordinates local = Coordinates.newBuilder().
                setLongitude(newLongitude).
                setAltitude(newHaeMeters).
                setLatitude(newLatitude).
                build();
        
        Response baseRespnse = Response.newBuilder().build();
        
        GetPositionResponseGen.GetPositionResponse getPositionResponse = GetPositionResponseGen.
                GetPositionResponse.newBuilder().
                setBase(baseRespnse).
                setOrientation(orien).
                setLocation(local).
                build();
                
        ExecuteCommandResponseData response = ExecuteCommandResponseData.newBuilder().
                setUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid1)).
                setResponse(getPositionResponse.toByteString()).
                setResponseType(
                    CommandResponseEnumConverter.convertJavaEnumToProto(CommandResponseEnum.GET_POSITION_RESPONSE)).
                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.ExecuteCommandResponse.toString());
        //the event
        return new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
    }
/**
     * Used to mock a message representing an asset get position response based off the results
     * of a get position request.
     */
Used to mock a message representing an asset get position response based off the results
of a get position request.
Used to mock a message representing an asset get position response based off the results of a get position request .
private Event mockExecuteGetPositionCommandResponse(final int systemId, double expectedLongitude, 
            double expectedLatitude, double expectedAltitude, double expectedBank, double expectedElevation, 
            double expectedHeading)
    {
        m_SUT.getAssetsForControllerAsync(systemId);
        LongitudeWgsDegrees newLongitude = LongitudeWgsDegrees.newBuilder().
                setValue(expectedLongitude).
                build();
        LatitudeWgsDegrees newLatitude = LatitudeWgsDegrees.newBuilder().
                setValue(expectedLatitude).
                build();
        HaeMeters newHaeMeters = HaeMeters.newBuilder().
                setValue(expectedAltitude).
                build();
        BankDegrees newBank = BankDegrees.newBuilder().
                setValue(expectedBank).
                build();
        ElevationDegrees newElevation = ElevationDegrees.newBuilder().
                setValue(expectedElevation).
                build();
        HeadingDegrees newHeading = HeadingDegrees.newBuilder().
                setValue(expectedHeading).
                build();
        Orientation orien = Orientation.newBuilder().
                setBank(newBank).
                setElevation(newElevation).
                setHeading(newHeading).
                build();
        Coordinates local = Coordinates.newBuilder().
                setLongitude(newLongitude).
                setAltitude(newHaeMeters).
                setLatitude(newLatitude).
                build();
        Response baseRespnse = Response.newBuilder().build();
        GetPositionResponseGen.GetPositionResponse getPositionResponse = GetPositionResponseGen.
                GetPositionResponse.newBuilder().
                setBase(baseRespnse).
                setOrientation(orien).
                setLocation(local).
                build();
        ExecuteCommandResponseData response = ExecuteCommandResponseData.newBuilder().
                setUuid(SharedMessageUtils.convertUUIDToProtoUUID(uuid1)).
                setResponse(getPositionResponse.toByteString()).
                setResponseType(
                    CommandResponseEnumConverter.convertJavaEnumToProto(CommandResponseEnum.GET_POSITION_RESPONSE)).
                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.ExecuteCommandResponse.toString());
        return new Event(RemoteConstants.TOPIC_MESSAGE_RECEIVED, props);
    }
private Event mockExecuteGetPositionCommandResponse ( final int systemId , double expectedLongitude , double expectedLatitude , double expectedAltitude , double expectedBank , double expectedElevation , double expectedHeading ) { m_SUT . getAssetsForControllerAsync ( systemId ) ; LongitudeWgsDegrees newLongitude = LongitudeWgsDegrees . newBuilder ( ) . setValue ( expectedLongitude ) . build ( ) ; LatitudeWgsDegrees newLatitude = LatitudeWgsDegrees . newBuilder ( ) . setValue ( expectedLatitude ) . build ( ) ; HaeMeters newHaeMeters = HaeMeters . newBuilder ( ) . setValue ( expectedAltitude ) . build ( ) ; BankDegrees newBank = BankDegrees . newBuilder ( ) . setValue ( expectedBank ) . build ( ) ; ElevationDegrees newElevation = ElevationDegrees . newBuilder ( ) . setValue ( expectedElevation ) . build ( ) ; HeadingDegrees newHeading = HeadingDegrees . newBuilder ( ) . setValue ( expectedHeading ) . build ( ) ; Orientation orien = Orientation . newBuilder ( ) . setBank ( newBank ) . setElevation ( newElevation ) . setHeading ( newHeading ) . build ( ) ; Coordinates local = Coordinates . newBuilder ( ) . setLongitude ( newLongitude ) . setAltitude ( newHaeMeters ) . setLatitude ( newLatitude ) . build ( ) ; Response baseRespnse = Response . newBuilder ( ) . build ( ) ; GetPositionResponseGen . GetPositionResponse getPositionResponse = GetPositionResponseGen . GetPositionResponse . newBuilder ( ) . setBase ( baseRespnse ) . setOrientation ( orien ) . setLocation ( local ) . build ( ) ; ExecuteCommandResponseData response = ExecuteCommandResponseData . newBuilder ( ) . setUuid ( SharedMessageUtils . convertUUIDToProtoUUID ( uuid1 ) ) . setResponse ( getPositionResponse . toByteString ( ) ) . setResponseType ( CommandResponseEnumConverter . convertJavaEnumToProto ( CommandResponseEnum . GET_POSITION_RESPONSE ) ) . 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 . ExecuteCommandResponse . toString ( ) ) ; return new Event ( RemoteConstants . TOPIC_MESSAGE_RECEIVED , props ) ; }
Used to mock a message representing an asset get position response based off the results
 of a get position request.
Used to mock a message representing an asset get position response based off the results of a get position request .
//Call to add controller to list. //create all the orientation and coordinates measurements and put them in the response //Create new observation object // properties for the event //the event