edu.udayton.udri.asset.novatel/test/edu/udayton/udri/asset/novatel/impl/connection/TestNovatelConnectionMgrImpl.java
@Test
    public void testStartProcessingNoLinkFound() throws IllegalArgumentException, CCommException
    {
        when(m_CustomCommService.tryCreatePhysicalLink(PhysicalLinkTypeEnum.SERIAL_PORT, m_PhysPort)).
            thenReturn(m_UUID);
        
        doThrow(IllegalArgumentException.class).when(m_CustomCommService).requestPhysicalLink(m_UUID);
        try
        {
            m_SUT.startProcessing(m_PhysPort, m_BaudRate);
            fail("Expected exception");
        }
        catch (final AssetException exception)
        {
            //expected exception
        }
    }
/**
     * Verify the start processing method throws an asset exception if the serial port cannot be found.
     */
Verify the start processing method throws an asset exception if the serial port cannot be found.
Verify the start processing method throws an asset exception if the serial port cannot be found .
@Test
    public void testStartProcessingNoLinkFound() throws IllegalArgumentException, CCommException
    {
        when(m_CustomCommService.tryCreatePhysicalLink(PhysicalLinkTypeEnum.SERIAL_PORT, m_PhysPort)).
            thenReturn(m_UUID);
        doThrow(IllegalArgumentException.class).when(m_CustomCommService).requestPhysicalLink(m_UUID);
        try
        {
            m_SUT.startProcessing(m_PhysPort, m_BaudRate);
            fail("Expected exception");
        }
        catch (final AssetException exception)
        {
        }
    }
@ Test public void testStartProcessingNoLinkFound ( ) throws IllegalArgumentException , CCommException { when ( m_CustomCommService . tryCreatePhysicalLink ( PhysicalLinkTypeEnum . SERIAL_PORT , m_PhysPort ) ) . thenReturn ( m_UUID ) ; doThrow ( IllegalArgumentException . class ) . when ( m_CustomCommService ) . requestPhysicalLink ( m_UUID ) ; try { m_SUT . startProcessing ( m_PhysPort , m_BaudRate ) ; fail ( "Expected exception" ) ; } catch ( final AssetException exception ) { } }
Verify the start processing method throws an asset exception if the serial port cannot be found.
Verify the start processing method throws an asset exception if the serial port cannot be found .
//expected exception