@Override
    public boolean isReachable(DeviceId deviceId) {
        boolean sessionExists =
                Optional.ofNullable(controller.getDevicesMap().get(deviceId))
                        .map(NetconfDevice::isActive)
                        .orElse(false);
        if (sessionExists) {
            return true;
        }

        //FIXME this is a workaround util device state is shared
        // between controller instances.
        return isTcpConnectionAvailable(deviceId);
    }
@Test
    public void addDeviceNew() throws InterruptedException {
        // expecting 1 device add
        deviceAdded = new CountDownLatch(1);
        assertNotNull(providerService);
        assertTrue("Event should be relevant", provider.cfgListener.isRelevant(deviceAddedEvent));
        available = true;
        assertFalse("Device should not be reachable" + NETCONF_DEVICE_ID_STRING,
                provider.isReachable(DeviceId.deviceId(NETCONF_DEVICE_ID_STRING)));
        devices.clear();
    }