Merge changes I805ec065,Idc9995b1
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / cnsn / to / json / test / CnSnToJsonNotExistingLeafTypeTest.java
index d1dca95f43418c4e4a1e34b820ae4e67f6aeeee0..17d7fe6be09eaa18f48ac5831527fc58076dbe18 100644 (file)
@@ -20,8 +20,13 @@ import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider;
-import org.opendaylight.controller.sal.restconf.impl.test.*;
-import org.opendaylight.yangtools.yang.data.api.*;
+import org.opendaylight.controller.sal.restconf.impl.test.DummyType;
+import org.opendaylight.controller.sal.restconf.impl.test.TestUtils;
+import org.opendaylight.controller.sal.restconf.impl.test.YangAndXmlAndDataSchemaLoader;
+import org.opendaylight.yangtools.yang.data.api.CompositeNode;
+import org.opendaylight.yangtools.yang.data.api.ModifyAction;
+import org.opendaylight.yangtools.yang.data.api.MutableCompositeNode;
+import org.opendaylight.yangtools.yang.data.api.MutableSimpleNode;
 import org.opendaylight.yangtools.yang.data.impl.NodeFactory;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.Module;
@@ -39,20 +44,13 @@ public class CnSnToJsonNotExistingLeafTypeTest extends YangAndXmlAndDataSchemaLo
         dataLoad("/cnsn-to-json/simple-data-types");
     }
 
-    // FIXME
-    @Ignore
     @Test
-    public void incorrectTopLevelElementTest() {
-
+    public void incorrectTopLevelElementTest() throws WebApplicationException, IOException {
         String jsonOutput = null;
-        try {
-            jsonOutput = TestUtils
-                    .writeCompNodeWithSchemaContextToOutput(prepareCompositeNode(),
-                            (Set<Module>) Collections.EMPTY_SET, prepareDataSchemaNode(),
-                            StructuredDataToJsonProvider.INSTANCE);
-        } catch (WebApplicationException | IOException e) {
-            LOG.error("WebApplicationException or IOException was raised");
-        }
+        jsonOutput = TestUtils
+                .writeCompNodeWithSchemaContextToOutput(prepareCompositeNode(),
+                        (Set<Module>) Collections.EMPTY_SET, prepareDataSchemaNode(),
+                        StructuredDataToJsonProvider.INSTANCE);
         assertNotNull(jsonOutput);
         assertTrue(jsonOutput.contains("\"lf1\": \"\""));
     }