@Test public void testRemoveDevice() { assertThat(provider.discoverers.entrySet(), hasSize(2)); deviceListener.event(new DeviceEvent(DeviceEvent.Type.DEVICE_ADDED, dev3)); assertThat(provider.discoverers.entrySet(), hasSize(3)); deviceListener.event(new DeviceEvent(DeviceEvent.Type.DEVICE_REMOVED, dev3)); assertThat(provider.discoverers.entrySet(), hasSize(2)); }
private void removeDevice(final DeviceId deviceId) { discoverers.computeIfPresent(deviceId, (did, ld) -> { ld.stop(); return null; }); }
NetworkConfigLinksProvider extends AbstractProvider implements ProbedLinkProvider { private void removeDevice(final DeviceId deviceId) { discoverers.computeIfPresent(deviceId, (did, ld) -> { ld.stop(); return null; }); } }
NetworkConfigLinksProvider extends AbstractProvider implements ProbedLinkProvider { private void removeDevice(final DeviceId deviceId) { discoverers.computeIfPresent(deviceId, (did, ld) -> { ld.stop(); return null; }); } NetworkConfigLinksProvider(); }
NetworkConfigLinksProvider extends AbstractProvider implements ProbedLinkProvider { private void removeDevice(final DeviceId deviceId) { discoverers.computeIfPresent(deviceId, (did, ld) -> { ld.stop(); return null; }); } NetworkConfigLinksProvider();  }
NetworkConfigLinksProvider extends AbstractProvider implements ProbedLinkProvider { private void removeDevice(final DeviceId deviceId) { discoverers.computeIfPresent(deviceId, (did, ld) -> { ld.stop(); return null; }); } NetworkConfigLinksProvider();   }