X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=restconf%2Frestconf-nb-rfc8040%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fnb%2Frfc8040%2Fjersey%2Fproviders%2Fpatch%2FJsonPatchBodyReaderTest.java;h=d9f42d9978f6247a0f53a38c25545f5c8ba58551;hb=a304aa0a7aeb0063624764b30a1501e0e5a9cf9f;hp=91a409d763eedd325052cf876f2e29201ccfee78;hpb=ad67f040475b5a037e1d9fafd2b5c7d5d5c11a3d;p=netconf.git diff --git a/restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/patch/JsonPatchBodyReaderTest.java b/restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/patch/JsonPatchBodyReaderTest.java index 91a409d763..d9f42d9978 100644 --- a/restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/patch/JsonPatchBodyReaderTest.java +++ b/restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/patch/JsonPatchBodyReaderTest.java @@ -162,4 +162,19 @@ public class JsonPatchBodyReaderTest extends AbstractBodyReaderTest { final PatchContext returnValue = jsonToPatchBodyReader.readFrom(null, null, null, mediaType, null, inputStream); checkPatchContext(returnValue); } + + /** + * Test of Yang Patch on the top-level container with empty URI for data root. + */ + @Test + public void modulePatchTargetTopLevelContainerWithEmptyURITest() throws Exception { + final String uri = ""; + mockBodyReader(uri, jsonToPatchBodyReader, false); + + final InputStream inputStream = JsonBodyReaderTest.class.getResourceAsStream( + "/instanceidentifier/json/jsonPATCHTargetTopLevelContainerWithEmptyURI.json"); + + final PatchContext returnValue = jsonToPatchBodyReader.readFrom(null, null, null, mediaType, null, inputStream); + checkPatchContext(returnValue); + } }