edu.udayton.udri.asset.canon.ipcamera/test/edu/udayton/udri/asset/canon/ipcamera/TestIpCameraAsset.java
@Test(expected = CommandExecutionException.class)
    public void testPerformBitIoException2() throws IOException, AssetException
    {
        m_SUT.onActivate();
        URLConnection urlCon = mock(URLConnection.class);
        when(m_UrlUtil.getConnection(any(URL.class))).thenReturn(urlCon);
        when(m_UrlUtil.getInputStream(any(URLConnection.class))).thenThrow(new IOException());
        m_SUT.onPerformBit();
    }
//Catches the IO exception when BIT tries to create an Input Stream from the camera.
Catches the IO exception when BIT tries to create an Input Stream from the camera.
Catches the IO exception when BIT tries to create an Input Stream from the camera .
@Test(expected = CommandExecutionException.class)
    public void testPerformBitIoException2() throws IOException, AssetException
    {
        m_SUT.onActivate();
        URLConnection urlCon = mock(URLConnection.class);
        when(m_UrlUtil.getConnection(any(URL.class))).thenReturn(urlCon);
        when(m_UrlUtil.getInputStream(any(URLConnection.class))).thenThrow(new IOException());
        m_SUT.onPerformBit();
    }
@ Test ( expected = CommandExecutionException . class ) public void testPerformBitIoException2 ( ) throws IOException , AssetException { m_SUT . onActivate ( ) ; URLConnection urlCon = mock ( URLConnection . class ) ; when ( m_UrlUtil . getConnection ( any ( URL . class ) ) ) . thenReturn ( urlCon ) ; when ( m_UrlUtil . getInputStream ( any ( URLConnection . class ) ) ) . thenThrow ( new IOException ( ) ) ; m_SUT . onPerformBit ( ) ; }
Catches the IO exception when BIT tries to create an Input Stream from the camera.
Catches the IO exception when BIT tries to create an Input Stream from the camera .