edu.udayton.udri.asset.canon.ipcamera/test/edu/udayton/udri/asset/canon/ipcamera/TestIpCameraAsset.java
@Test
    public void testUpdatedIoException1() throws AssetException, IOException
    {
        m_SUT.onActivate();
        Map<String, Object> props = new HashMap<>();
        props.put(IpCameraAssetAttributes.IP, "https://192.186.1.55/-wvhttp-01-/");
        when(m_UrlUtil.getConnection(any(URL.class))).thenThrow(new IOException());
        m_SUT.updated(props);
        
        verify(m_WakeLock).activate();
        verify(m_WakeLock).cancel();
    }
//Catches the IO exception when the Update method creates a URLconnection to the URL.
Catches the IO exception when the Update method creates a URLconnection to the URL.
Catches the IO exception when the Update method creates a URLconnection to the URL .
@Test
    public void testUpdatedIoException1() throws AssetException, IOException
    {
        m_SUT.onActivate();
        Map<String, Object> props = new HashMap<>();
        props.put(IpCameraAssetAttributes.IP, "https://192.186.1.55/-wvhttp-01-/");
        when(m_UrlUtil.getConnection(any(URL.class))).thenThrow(new IOException());
        m_SUT.updated(props);
        verify(m_WakeLock).activate();
        verify(m_WakeLock).cancel();
    }
@ Test public void testUpdatedIoException1 ( ) throws AssetException , IOException { m_SUT . onActivate ( ) ; Map < String , Object > props = new HashMap < > ( ) ; props . put ( IpCameraAssetAttributes . IP , "https://192.186.1.55/-wvhttp-01-/" ) ; when ( m_UrlUtil . getConnection ( any ( URL . class ) ) ) . thenThrow ( new IOException ( ) ) ; m_SUT . updated ( props ) ; verify ( m_WakeLock ) . activate ( ) ; verify ( m_WakeLock ) . cancel ( ) ; }
Catches the IO exception when the Update method creates a URLconnection to the URL.
Catches the IO exception when the Update method creates a URLconnection to the URL .