@Override
    public void triggerDisconnect(DeviceId deviceId) {
        log.debug("Forcing disconnect for device {}", deviceId);
        controller.disconnectDevice(deviceId, true);
    }
@Test
    public void testDiscoverPortsAfterDeviceAdded() {
        provider.connectionExecutor = MoreExecutors.newDirectExecutorService();
        prepareMocks(PORT_COUNT);

        deviceService.listener.event(new DeviceEvent(DeviceEvent.Type.DEVICE_ADDED, netconfDevice));
        assertEquals("Ports should be added", PORT_COUNT, providerService.ports.get(netconfDevice.id()).size());

        provider.triggerDisconnect(netconfDevice.id());
        assertEquals("Ports should be removed", 0, providerService.ports.get(netconfDevice.id()).size());
    }