Fix bug 2821 - restconf RPC parsing returns http status 500
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / rest / impl / test / providers / TestXmlBodyReaderMountPoint.java
index 6e35fd5ce08508590eebb806a513073dfc6a0b0b..a31d198aa6d30c5a846dd4060045d21795f2bf0b 100644 (file)
@@ -76,8 +76,8 @@ public class TestXmlBodyReaderMountPoint extends AbstractBodyReaderTest {
     public void moduleDataTest() throws Exception {
         final DataSchemaNode dataSchemaNode = schemaContext.getDataChildByName("cont");
         final String uri = "instance-identifier-module:cont/yang-ext:mount/instance-identifier-module:cont";
-        mockBodyReader(uri, xmlBodyReader);
-        final InputStream inputStream = TestXmlBodyReader.class
+        mockBodyReader(uri, xmlBodyReader, false);
+        final InputStream inputStream = TestXmlBodyReaderMountPoint.class
                 .getResourceAsStream("/instanceidentifier/xml/xmldata.xml");
         final NormalizedNodeContext returnValue = xmlBodyReader
                 .readFrom(null, null, null, mediaType, null, inputStream);
@@ -89,8 +89,8 @@ public class TestXmlBodyReaderMountPoint extends AbstractBodyReaderTest {
     public void moduleSubContainerDataPutTest() throws Exception {
         final DataSchemaNode dataSchemaNode = schemaContext.getDataChildByName("cont");
         final String uri = "instance-identifier-module:cont/yang-ext:mount/instance-identifier-module:cont/cont1";
-        mockBodyReader(uri, xmlBodyReader);
-        final InputStream inputStream = TestXmlBodyReader.class
+        mockBodyReader(uri, xmlBodyReader, false);
+        final InputStream inputStream = TestXmlBodyReaderMountPoint.class
                 .getResourceAsStream("/instanceidentifier/xml/xml_sub_container.xml");
         final NormalizedNodeContext returnValue = xmlBodyReader
                 .readFrom(null, null, null, mediaType, null, inputStream);
@@ -102,8 +102,8 @@ public class TestXmlBodyReaderMountPoint extends AbstractBodyReaderTest {
     public void moduleSubContainerDataPostTest() throws Exception {
         final DataSchemaNode dataSchemaNode = schemaContext.getDataChildByName("cont");
         final String uri = "instance-identifier-module:cont/yang-ext:mount/instance-identifier-module:cont";
-        mockBodyReader(uri, xmlBodyReader);
-        final InputStream inputStream = TestXmlBodyReader.class
+        mockBodyReader(uri, xmlBodyReader, true);
+        final InputStream inputStream = TestXmlBodyReaderMountPoint.class
                 .getResourceAsStream("/instanceidentifier/xml/xml_sub_container.xml");
         final NormalizedNodeContext returnValue = xmlBodyReader
                 .readFrom(null, null, null, mediaType, null, inputStream);
@@ -114,8 +114,8 @@ public class TestXmlBodyReaderMountPoint extends AbstractBodyReaderTest {
     @Test
     public void rpcModuleInputTest() throws Exception {
         final String uri = "instance-identifier-module:cont/yang-ext:mount/invoke-rpc-module:rpc-test";
-        mockBodyReader(uri, xmlBodyReader);
-        final InputStream inputStream = TestXmlBodyReader.class
+        mockBodyReader(uri, xmlBodyReader, true);
+        final InputStream inputStream = TestXmlBodyReaderMountPoint.class
                 .getResourceAsStream("/invoke-rpc/xml/rpc-input.xml");
         final NormalizedNodeContext returnValue = xmlBodyReader
                 .readFrom(null, null, null, mediaType, null, inputStream);