X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Fcnsn%2Fto%2Fjson%2Ftest%2FCnSnToJsonNotExistingLeafTypeTest.java;h=3f89c97367efd2f849802a61d5e4fec1f12149f1;hp=24dba17c90cdff4e9a87d0a059160357dcbaad88;hb=b5fcde5020da05b4447d2efd994f3538a7401094;hpb=c2fd5f62f3b80a7e7b4b7e167349ede433e785d6 diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonNotExistingLeafTypeTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonNotExistingLeafTypeTest.java index 24dba17c90..3f89c97367 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonNotExistingLeafTypeTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonNotExistingLeafTypeTest.java @@ -9,6 +9,7 @@ package org.opendaylight.controller.sal.restconf.impl.cnsn.to.json.test; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import static org.opendaylight.controller.sal.restconf.impl.test.TestUtils.containsStringData; import java.io.IOException; import java.util.Collections; @@ -50,7 +51,9 @@ public class CnSnToJsonNotExistingLeafTypeTest extends YangAndXmlAndDataSchemaLo Collections.emptySet(), prepareDataSchemaNode(), StructuredDataToJsonProvider.INSTANCE); assertNotNull(jsonOutput); - assertTrue(jsonOutput.contains("\"lf1\": \"\"")); + +// pattern for e.g. > "lf1" : "" < or >"lf1":""< + assertTrue(containsStringData(jsonOutput, "\"lf1\"",":","\"\"")); } private CompositeNode prepareCompositeNode() {