X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fmessagebus-netconf%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fmessagebus%2Feventsources%2Fnetconf%2FNetconfEventSourceTest.java;h=7e94e2348663e4663c8373c7cc2f4ac45da5a37c;hb=45cfee1861924b4a8086d38079ce8cbd320386d6;hp=56ce4ee61ad9bfc3a29b01cf68928b738d96ee63;hpb=e2f838d72117730ceaae4b4ac4992cc244678c71;p=netconf.git diff --git a/netconf/messagebus-netconf/src/test/java/org/opendaylight/netconf/messagebus/eventsources/netconf/NetconfEventSourceTest.java b/netconf/messagebus-netconf/src/test/java/org/opendaylight/netconf/messagebus/eventsources/netconf/NetconfEventSourceTest.java index 56ce4ee61a..7e94e23486 100644 --- a/netconf/messagebus-netconf/src/test/java/org/opendaylight/netconf/messagebus/eventsources/netconf/NetconfEventSourceTest.java +++ b/netconf/messagebus-netconf/src/test/java/org/opendaylight/netconf/messagebus/eventsources/netconf/NetconfEventSourceTest.java @@ -98,6 +98,7 @@ public class NetconfEventSourceTest { final Node nodeId1 = NetconfTestUtils.getNetconfNode("NodeId1", "node.test.local", ConnectionStatus .Connected, NetconfTestUtils.NOTIFICATION_CAPABILITY_PREFIX); doReturn(nodeId1).when(mount).getNode(); + doReturn(nodeId1.getNodeId().getValue()).when(mount).getNodeId(); Map streamMap = new HashMap<>(); streamMap.put(NOTIFICATION_1_PATH.getLastComponent().getNamespace().toString(), "stream-1"); @@ -126,8 +127,7 @@ public class NetconfEventSourceTest { final TopicDOMNotification value = (TopicDOMNotification) captor.getValue(); final QName qname = TopicNotification.QNAME; final YangInstanceIdentifier.NodeIdentifier topicIdNode = - new YangInstanceIdentifier.NodeIdentifier(QName.create(qname.getNamespace().toString(), qname - .getFormattedRevision(), "topic-id")); + new YangInstanceIdentifier.NodeIdentifier(QName.create(qname, "topic-id")); final Object actualTopicId = value.getBody().getChild(topicIdNode).get().getValue(); Assert.assertEquals(topic1.getTopicId(), actualTopicId); } @@ -151,14 +151,14 @@ public class NetconfEventSourceTest { verify(domNotificationPublishServiceMock, only()).putNotification(any()); } - private Stream createStream(String name) { + private static Stream createStream(final String name) { return new StreamBuilder() .setName(new StreamNameType(name)) .setReplaySupport(true) .build(); } - private NotificationDefinition getNotificationDefinitionMock(QName qualifiedName) { + private static NotificationDefinition getNotificationDefinitionMock(final QName qualifiedName) { NotificationDefinition notification = mock(NotificationDefinition.class); doReturn(qualifiedName).when(notification).getQName(); doReturn(SchemaPath.create(true, qualifiedName)).when(notification).getPath();