edu.udayton.udri.asset.novatel/test/edu/udayton/udri/asset/novatel/TestNovatelAsset.java
@Test
    public void testIllegalStateHandling() throws AssetException
    {
        m_SUT.onActivate();

        doThrow(IllegalStateException.class).when(m_ConnectionManager).stopProcessing();
        doThrow(IllegalStateException.class).when(m_MessageReader).stopRetrieving();
        
        m_SUT.updated(createConfigProps());

        //verify that both methods are still called
        verify(m_ConnectionManager).stopProcessing();
        verify(m_MessageReader).stopRetrieving();
        //once for activate once on update
        verify(m_MessageReader, times(2)).startRetreiving(m_SUT);
    }
/**
     * Verify illegal state exception handling if the reading thread and serial port are not processing and stop has 
     * been called.
     */
Verify illegal state exception handling if the reading thread and serial port are not processing and stop has
been called.
Verify illegal state exception handling if the reading thread and serial port are not processing and stop has been called .
@Test
    public void testIllegalStateHandling() throws AssetException
    {
        m_SUT.onActivate();
        doThrow(IllegalStateException.class).when(m_ConnectionManager).stopProcessing();
        doThrow(IllegalStateException.class).when(m_MessageReader).stopRetrieving();
        m_SUT.updated(createConfigProps());
        verify(m_ConnectionManager).stopProcessing();
        verify(m_MessageReader).stopRetrieving();
        verify(m_MessageReader, times(2)).startRetreiving(m_SUT);
    }
@ Test public void testIllegalStateHandling ( ) throws AssetException { m_SUT . onActivate ( ) ; doThrow ( IllegalStateException . class ) . when ( m_ConnectionManager ) . stopProcessing ( ) ; doThrow ( IllegalStateException . class ) . when ( m_MessageReader ) . stopRetrieving ( ) ; m_SUT . updated ( createConfigProps ( ) ) ; verify ( m_ConnectionManager ) . stopProcessing ( ) ; verify ( m_MessageReader ) . stopRetrieving ( ) ; verify ( m_MessageReader , times ( 2 ) ) . startRetreiving ( m_SUT ) ; }
Verify illegal state exception handling if the reading thread and serial port are not processing and stop has
 been called.
Verify illegal state exception handling if the reading thread and serial port are not processing and stop has been called .
//verify that both methods are still called //once for activate once on update