edu.udayton.udri.asset.axis/test/edu/udayton/udri/asset/axis/TestAxisAsset.java
@Test
    public void testSetPanTilt() throws AssetException, IOException, IllegalStateException, InterruptedException
    {
        //Command
        SetPanTiltCommand command = new SetPanTiltCommand().withPanTilt(
                SpatialTypesFactory.newOrientationOffset(0f, 0f));
        
        //mock behavior
        when(m_CommandProcessor.processSetPanTilt(command, m_Ip)).thenReturn(m_UrlString);
        when(m_UrlService.constructUrlConnection(m_UrlString)).thenReturn(m_Connection);
        when(m_Connection.getDate()).thenReturn(1L);
        
        //process the command
        SetPanTiltResponse response = (SetPanTiltResponse)m_SUT.onExecuteCommand(command);
        
        verify(m_CommandProcessor).processSetPanTilt(command, m_Ip);
        verify(m_UrlService).constructUrlConnection(m_UrlString);
        assertThat(response, is(notNullValue()));
    }
/**
     * Verify set pan/tilt command interactions.
     */
Verify set pan/tilt command interactions.
Verify set pan / tilt command interactions .
@Test
    public void testSetPanTilt() throws AssetException, IOException, IllegalStateException, InterruptedException
    {
        SetPanTiltCommand command = new SetPanTiltCommand().withPanTilt(
                SpatialTypesFactory.newOrientationOffset(0f, 0f));
        when(m_CommandProcessor.processSetPanTilt(command, m_Ip)).thenReturn(m_UrlString);
        when(m_UrlService.constructUrlConnection(m_UrlString)).thenReturn(m_Connection);
        when(m_Connection.getDate()).thenReturn(1L);
        SetPanTiltResponse response = (SetPanTiltResponse)m_SUT.onExecuteCommand(command);
        verify(m_CommandProcessor).processSetPanTilt(command, m_Ip);
        verify(m_UrlService).constructUrlConnection(m_UrlString);
        assertThat(response, is(notNullValue()));
    }
@ Test public void testSetPanTilt ( ) throws AssetException , IOException , IllegalStateException , InterruptedException { SetPanTiltCommand command = new SetPanTiltCommand ( ) . withPanTilt ( SpatialTypesFactory . newOrientationOffset ( 0f , 0f ) ) ; when ( m_CommandProcessor . processSetPanTilt ( command , m_Ip ) ) . thenReturn ( m_UrlString ) ; when ( m_UrlService . constructUrlConnection ( m_UrlString ) ) . thenReturn ( m_Connection ) ; when ( m_Connection . getDate ( ) ) . thenReturn ( 1L ) ; SetPanTiltResponse response = ( SetPanTiltResponse ) m_SUT . onExecuteCommand ( command ) ; verify ( m_CommandProcessor ) . processSetPanTilt ( command , m_Ip ) ; verify ( m_UrlService ) . constructUrlConnection ( m_UrlString ) ; assertThat ( response , is ( notNullValue ( ) ) ) ; }
Verify set pan/tilt command interactions.
Verify set pan / tilt command interactions .
//Command //mock behavior //process the command