Assert.assertEquals(0, notifListener.getNotifications().size());
dg.start();
Assert.assertEquals(1, notifListener.getNotifications().size());
Notification notif = notifListener.getNotifications().get(0);
Assert.assertEquals(NotificationType.DISCOVERY_GROUP_STARTED, notif.getType());
Assert.assertEquals(dg.getName(), notif.getProperties()
.getSimpleStringProperty(new SimpleString("name"))
.toString());
dg.stop();
Assert.assertEquals(2, notifListener.getNotifications().size());
notif = notifListener.getNotifications().get(1);
Assert.assertEquals(NotificationType.DISCOVERY_GROUP_STOPPED, notif.getType());
Assert.assertEquals(dg.getName(), notif.getProperties()
.getSimpleStringProperty(new SimpleString("name"))
.toString());
}