diff options
Diffstat (limited to 'framework/src/onos/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java')
-rw-r--r-- | framework/src/onos/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/framework/src/onos/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java b/framework/src/onos/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java index 43b11f52..3a168936 100644 --- a/framework/src/onos/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java +++ b/framework/src/onos/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java @@ -802,31 +802,22 @@ public class GossipDeviceStoreTest { @Test public final void testEvents() throws InterruptedException { final CountDownLatch addLatch = new CountDownLatch(1); - DeviceStoreDelegate checkAdd = new DeviceStoreDelegate() { - @Override - public void notify(DeviceEvent event) { - assertEquals(DEVICE_ADDED, event.type()); - assertDevice(DID1, SW1, event.subject()); - addLatch.countDown(); - } + DeviceStoreDelegate checkAdd = event -> { + assertEquals(DEVICE_ADDED, event.type()); + assertDevice(DID1, SW1, event.subject()); + addLatch.countDown(); }; final CountDownLatch updateLatch = new CountDownLatch(1); - DeviceStoreDelegate checkUpdate = new DeviceStoreDelegate() { - @Override - public void notify(DeviceEvent event) { - assertEquals(DEVICE_UPDATED, event.type()); - assertDevice(DID1, SW2, event.subject()); - updateLatch.countDown(); - } + DeviceStoreDelegate checkUpdate = event -> { + assertEquals(DEVICE_UPDATED, event.type()); + assertDevice(DID1, SW2, event.subject()); + updateLatch.countDown(); }; final CountDownLatch removeLatch = new CountDownLatch(1); - DeviceStoreDelegate checkRemove = new DeviceStoreDelegate() { - @Override - public void notify(DeviceEvent event) { - assertEquals(DEVICE_REMOVED, event.type()); - assertDevice(DID1, SW2, event.subject()); - removeLatch.countDown(); - } + DeviceStoreDelegate checkRemove = event -> { + assertEquals(DEVICE_REMOVED, event.type()); + assertDevice(DID1, SW2, event.subject()); + removeLatch.countDown(); }; DeviceDescription description = |