- VerifyingNotificationListener notificationVerifier = createCommitNotificationListener();
- VerifyingPersister mockedAggregator = mockAggregator();
-
- try (NetconfClient persisterClient = new NetconfClient("persister", tcpAddress, 4000, clientDispatcher)) {
- ConfigPersisterNotificationHandler configPersisterNotificationHandler = new ConfigPersisterNotificationHandler(
- platformMBeanServer, persisterClient, mockedAggregator,
- Pattern.compile(""));
- configPersisterNotificationHandler.init();
-
- try (NetconfClient netconfClient = new NetconfClient("client", tcpAddress, 4000, clientDispatcher)) {
- NetconfMessage response = netconfClient.sendMessage(loadGetConfigMessage());
- assertResponse(response, "<modules");
- assertResponse(response, "<services");
- response = netconfClient.sendMessage(loadCommitMessage());
- assertResponse(response, "ok");
-
- response = netconfClient.sendMessage(loadEditConfigMessage());
- assertResponse(response, "ok");
- response = netconfClient.sendMessage(loadCommitMessage());
- assertResponse(response, "ok");
+ response = netconfClient.sendMessage(loadEditConfigMessage());
+ assertContainsElementWithName(response.getDocument(), "ok");
+ response = netconfClient.sendMessage(loadCommitMessage());
+ assertContainsElementWithName(response.getDocument(), "ok");
+ }