@Test
public void testConnMgrClosesConnectionToDeletedDevices1() throws NetconfClientDispatcherException {

    List<Device> devicePresent = new ArrayList<>();
    Device nokia = spy(createDirectDevice("5"));
    doThrow(new EntityNotFoundException("Entity Not Found")).when(nokia).toString();
    devicePresent.add(nokia);
    when(m_deviceDao.findAllDevices()).thenReturn(devicePresent);
    try {
        m_cm.auditConnections();
        fail();
    } catch (Exception e) {
        assertEquals("Entity Not Found", e.getMessage());
    }
}