import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import javax.management.InstanceAlreadyExistsException;
import javax.management.InstanceNotFoundException;
import javax.management.ObjectName;
import javax.xml.parsers.ParserConfigurationException;
import javax.management.InstanceAlreadyExistsException;
import javax.management.InstanceNotFoundException;
import javax.management.ObjectName;
import javax.xml.parsers.ParserConfigurationException;
import org.custommonkey.xmlunit.AbstractNodeTester;
import org.custommonkey.xmlunit.NodeTest;
import org.custommonkey.xmlunit.NodeTestException;
import org.custommonkey.xmlunit.NodeTester;
import org.custommonkey.xmlunit.XMLAssert;
import org.custommonkey.xmlunit.XMLUnit;
import org.custommonkey.xmlunit.AbstractNodeTester;
import org.custommonkey.xmlunit.NodeTest;
import org.custommonkey.xmlunit.NodeTestException;
import org.custommonkey.xmlunit.NodeTester;
import org.custommonkey.xmlunit.XMLAssert;
import org.custommonkey.xmlunit.XMLUnit;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.opendaylight.controller.config.api.ConflictingVersionException;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.opendaylight.controller.config.api.ConflictingVersionException;
private static final String INSTANCE_NAME = "instance-from-code";
private static final String NETCONF_SESSION_ID = "foo";
private static final String INSTANCE_NAME = "instance-from-code";
private static final String NETCONF_SESSION_ID = "foo";
for (int i = 0; i < TESTS_COUNT; i++) {
String file = String.format(format, i + 1);
for (int i = 0; i < TESTS_COUNT; i++) {
String file = String.format(format, i + 1);
assertEquals(8 * 4, getElementsSize(response, "inner-inner-running-data"));
assertEquals(8 * 4, getElementsSize(response, "deep3"));
assertEquals(8 * 4 * 2, getElementsSize(response, "list-of-strings"));
assertEquals(8 * 4, getElementsSize(response, "inner-inner-running-data"));
assertEquals(8 * 4, getElementsSize(response, "deep3"));
assertEquals(8 * 4 * 2, getElementsSize(response, "list-of-strings"));
- assertEquals(8, getElementsSize(response, "inner-running-data-additional"));
+ assertEquals(8, getElementsSize(response, "inner-running-data-additional", "urn:opendaylight:params:xml:ns:yang:controller:test:impl"));
private Document executeOp(final NetconfOperation op, final String filename) throws ParserConfigurationException,
SAXException, IOException, NetconfDocumentedException {
final Document request = XmlFileLoader.xmlFileToDocument(filename);
private Document executeOp(final NetconfOperation op, final String filename) throws ParserConfigurationException,
SAXException, IOException, NetconfDocumentedException {
final Document request = XmlFileLoader.xmlFileToDocument(filename);
HandlingPriority priority = op.canHandle(request);
Preconditions.checkState(priority != HandlingPriority.CANNOT_HANDLE);
final Document response = op.handle(request, NetconfOperationChainedExecution.EXECUTION_TERMINATION_POINT);
HandlingPriority priority = op.canHandle(request);
Preconditions.checkState(priority != HandlingPriority.CANNOT_HANDLE);
final Document response = op.handle(request, NetconfOperationChainedExecution.EXECUTION_TERMINATION_POINT);