2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.sal.restconf.impl.cnsn.to.json.test;
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertFalse;
12 import static org.junit.Assert.assertNotNull;
13 import static org.junit.Assert.assertNull;
14 import static org.junit.Assert.assertTrue;
16 import java.io.IOException;
17 import java.io.StringReader;
21 import javax.ws.rs.WebApplicationException;
23 import org.junit.BeforeClass;
24 import org.junit.Test;
25 import org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider;
26 import org.opendaylight.controller.sal.rest.impl.XmlToCompositeNodeProvider;
27 import org.opendaylight.controller.sal.restconf.impl.test.TestUtils;
28 import org.opendaylight.controller.sal.restconf.impl.test.YangAndXmlAndDataSchemaLoader;
29 import org.opendaylight.controller.sal.restconf.impl.test.structures.Cont;
30 import org.opendaylight.controller.sal.restconf.impl.test.structures.Lf;
31 import org.opendaylight.controller.sal.restconf.impl.test.structures.LfLst;
32 import org.opendaylight.controller.sal.restconf.impl.test.structures.Lst;
33 import org.opendaylight.controller.sal.restconf.impl.test.structures.LstItem;
34 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
35 import org.opendaylight.yangtools.yang.data.api.ModifyAction;
36 import org.opendaylight.yangtools.yang.data.api.MutableCompositeNode;
37 import org.opendaylight.yangtools.yang.data.api.MutableSimpleNode;
38 import org.opendaylight.yangtools.yang.data.impl.NodeFactory;
40 import com.google.gson.stream.JsonReader;
41 import com.google.gson.stream.JsonToken;
43 public class CnSnJsonBasicYangTypesTest extends YangAndXmlAndDataSchemaLoader {
46 public static void initialize() {
47 dataLoad("/cnsn-to-json/simple-yang-types", 1, "simple-yang-types", "cont1");
51 * Test of json output when as input are specified composite node with empty
56 public void compositeNodeAndYangWithJsonReaderEmptyDataTest() {
57 CompositeNode compositeNode = prepareCompositeNodeWithEmpties();
58 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
59 String jsonOutput = null;
61 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
62 StructuredDataToJsonProvider.INSTANCE);
63 } catch (WebApplicationException | IOException e) {
66 verifyJsonOutputForEmptyData(jsonOutput);
70 * Test of json output when as input are specified xml file (no empty
71 * elements)and YANG file
74 public void xmlAndYangTypesWithJsonReaderTest() {
75 CompositeNode compositeNode = TestUtils.readInputToCnSn("/cnsn-to-json/simple-yang-types/xml/data.xml",
76 XmlToCompositeNodeProvider.INSTANCE);
77 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
78 String jsonOutput = null;
80 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
81 StructuredDataToJsonProvider.INSTANCE);
82 } catch (WebApplicationException | IOException e) {
85 verifyJsonOutput(jsonOutput);
88 private void verifyJsonOutputForEmptyData(final String jsonOutput) {
89 assertNotNull(jsonOutput);
90 StringReader strReader = new StringReader(jsonOutput);
91 JsonReader jReader = new JsonReader(strReader);
93 String exception = null;
94 Cont dataFromJson = null;
96 dataFromJson = jsonReadCont1(jReader);
97 } catch (IOException e) {
98 exception = e.getMessage();
101 assertNotNull("Data structures from json are missing.", dataFromJson);
102 checkDataFromJsonEmpty(dataFromJson);
104 assertNull("Error during reading Json output: " + exception, exception);
107 private void verifyJsonOutput(final String jsonOutput) {
108 assertNotNull(jsonOutput);
109 StringReader strReader = new StringReader(jsonOutput);
110 JsonReader jReader = new JsonReader(strReader);
112 String exception = null;
113 Cont dataFromJson = null;
115 dataFromJson = jsonReadCont1(jReader);
116 } catch (IOException e) {
117 exception = e.getMessage();
120 assertNotNull("Data structures from json are missing.", dataFromJson);
121 checkDataFromJson(dataFromJson);
123 assertNull("Error during reading Json output: " + exception, exception);
126 private Cont jsonReadCont1(final JsonReader jReader) throws IOException {
127 jReader.beginObject();
128 assertNotNull("cont1 is missing.", jReader.hasNext());
130 Cont dataFromJson = new Cont(jReader.nextName());
131 dataFromJson = jsonReadCont1Elements(jReader, dataFromJson);
133 assertFalse("cont shouldn't have other element.", jReader.hasNext());
139 private Cont jsonReadCont1Elements(final JsonReader jReader, final Cont redData) throws IOException {
140 jReader.beginObject();
141 while (jReader.hasNext()) {
142 String keyName = jReader.nextName();
143 if (keyName.equals("lf11")) {
144 redData.addLf(new Lf(keyName, nextValue(jReader)));
145 } else if (keyName.equals("lflst11")) {
146 LfLst lfLst = new LfLst(keyName);
147 lfLst = jsonReadLflstValues(jReader, lfLst);
148 redData.addLfLst(lfLst);
149 } else if (keyName.equals("lflst12")) {
150 LfLst lfLst = new LfLst(keyName);
151 jsonReadLflstValues(jReader, lfLst);
152 redData.addLfLst(lfLst);
153 } else if (keyName.equals("lst11")) {
154 Lst lst = new Lst(keyName);
155 lst = jsonReadLst11(jReader, lst);
158 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
166 private Lst jsonReadLst11(final JsonReader jReader, final Lst lst) throws IOException {
167 jReader.beginArray();
169 while (jReader.hasNext()) {
170 LstItem lstItem = jsonReadLst11Elements(jReader);
171 lst.addLstItem(lstItem);
177 private LstItem jsonReadLst11Elements(final JsonReader jReader) throws IOException {
178 LstItem lstItem = new LstItem();
179 jReader.beginObject();
180 while (jReader.hasNext()) {
181 String keyName = jReader.nextName();
182 if (keyName.equals("lf111")) {
183 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
184 } else if (keyName.equals("lf112")) {
185 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
186 } else if (keyName.equals("cont111")) {
187 Cont cont = new Cont(keyName);
188 cont = jsonReadCont111(jReader, cont);
189 lstItem.addCont(cont);
190 } else if (keyName.equals("lst111")) {
191 Lst lst = new Lst(keyName);
192 lst = jsonReadLst111(jReader, lst);
194 } else if (keyName.equals("lst112")) {
195 Lst lst = new Lst(keyName);
196 lst = jsonReadLst112(jReader, lst);
199 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
206 private Lst jsonReadLst112(final JsonReader jReader, final Lst lst) throws IOException {
207 jReader.beginArray();
208 while (jReader.hasNext()) {
209 LstItem lstItem = jsonReadLst112Elements(jReader);
210 lst.addLstItem(lstItem);
216 private LstItem jsonReadLst112Elements(final JsonReader jReader) throws IOException {
217 LstItem lstItem = new LstItem();
218 jReader.beginObject();
219 if (jReader.hasNext()) {
220 String keyName = jReader.nextName();
221 if (keyName.equals("lf1121")) {
222 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
230 private Lst jsonReadLst111(final JsonReader jReader, final Lst lst) throws IOException {
231 jReader.beginArray();
232 while (jReader.hasNext()) {
233 LstItem lstItem = jsonReadLst111Elements(jReader);
234 lst.addLstItem(lstItem);
240 private LstItem jsonReadLst111Elements(final JsonReader jReader) throws IOException {
241 LstItem lstItem = new LstItem();
242 jReader.beginObject();
243 if (jReader.hasNext()) {
244 String keyName = jReader.nextName();
245 if (keyName.equals("lf1111")) {
246 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
253 private Object nextValue(final JsonReader jReader) throws IOException {
254 if (jReader.peek().equals(JsonToken.NULL)) {
257 } else if (jReader.peek().equals(JsonToken.NUMBER)) {
258 return jReader.nextInt();
260 return jReader.nextString();
264 private Cont jsonReadCont111(final JsonReader jReader, Cont cont) throws IOException {
265 jReader.beginObject();
266 cont = jsonReadCont111Elements(jReader, cont);
271 private Cont jsonReadCont111Elements(final JsonReader jReader, final Cont cont) throws IOException {
272 while (jReader.hasNext()) {
273 String keyName = jReader.nextName();
274 if (keyName.equals("lf1111")) {
275 cont.addLf(new Lf(keyName, nextValue(jReader)));
276 } else if (keyName.equals("lflst1111")) {
277 LfLst lfLst = new LfLst(keyName);
278 lfLst = jsonReadLflstValues(jReader, lfLst);
279 cont.addLfLst(lfLst);
280 } else if (keyName.equals("lst1111")) {
281 Lst lst = new Lst(keyName);
282 lst = jsonReadLst1111(jReader, lst);
285 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
292 private Lst jsonReadLst1111(final JsonReader jReader, final Lst lst) throws IOException {
293 jReader.beginArray();
294 while (jReader.hasNext()) {
295 LstItem lstItem = jsonReadLst1111Elements(jReader);
296 lst.addLstItem(lstItem);
302 private LstItem jsonReadLst1111Elements(final JsonReader jReader) throws IOException {
303 jReader.beginObject();
304 LstItem lstItem = new LstItem();
305 while (jReader.hasNext()) {
306 String keyName = jReader.nextName();
307 if (keyName.equals("lf1111A") || keyName.equals("lf1111B")) {
308 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
315 private LfLst jsonReadLflstValues(final JsonReader jReader, final LfLst lfLst) throws IOException {
316 jReader.beginArray();
317 while (jReader.hasNext()) {
318 lfLst.addLf(new Lf(nextValue(jReader)));
324 private void checkDataFromJsonEmpty(final Cont dataFromJson) {
325 assertTrue(dataFromJson.getLfs().isEmpty());
326 assertTrue(dataFromJson.getLfLsts().isEmpty());
327 assertTrue(dataFromJson.getConts().isEmpty());
329 Map<String, Lst> lsts = dataFromJson.getLsts();
330 assertEquals(1, lsts.size());
331 Lst lst11 = lsts.get("lst11");
332 assertNotNull(lst11);
333 Set<LstItem> lstItems = lst11.getLstItems();
334 assertNotNull(lstItems);
336 LstItem lst11_1 = null;
337 LstItem lst11_2 = null;
338 LstItem lst11_3 = null;
339 for (LstItem lstItem : lstItems) {
340 if (lstItem.getLfs().get("lf111").getValue().equals(1)) {
342 } else if (lstItem.getLfs().get("lf111").getValue().equals(2)) {
344 } else if (lstItem.getLfs().get("lf111").getValue().equals(3)) {
349 assertNotNull(lst11_1);
350 assertNotNull(lst11_2);
351 assertNotNull(lst11_3);
354 assertTrue(lst11_1.getLfLsts().isEmpty());
355 assertEquals(1, lst11_1.getLfs().size());
356 assertEquals(1, lst11_1.getConts().size());
357 assertEquals(1, lst11_1.getLsts().size());
359 lst11_1.getLsts().get("lst111"),
360 new Lst("lst111").addLstItem(new LstItem().addLf("lf1111", 35))
361 .addLstItem(new LstItem().addLf("lf1111", 34)).addLstItem(new LstItem())
362 .addLstItem(new LstItem()));
363 assertEquals(lst11_1.getConts().get("cont111"), new Cont("cont111"));
367 assertTrue(lst11_2.getLfLsts().isEmpty());
368 assertEquals(1, lst11_2.getLfs().size());
369 assertEquals(1, lst11_2.getConts().size());
370 assertEquals(1, lst11_2.getLsts().size());
372 Cont lst11_2_cont111 = lst11_2.getConts().get("cont111");
375 assertNotNull(lst11_2_cont111);
376 assertTrue(lst11_2_cont111.getLfs().isEmpty());
377 assertEquals(1, lst11_2_cont111.getLfLsts().size());
378 assertEquals(1, lst11_2_cont111.getLsts().size());
379 assertTrue(lst11_2_cont111.getConts().isEmpty());
381 assertEquals(new LfLst("lflst1111").addLf(1024).addLf(4096),
382 lst11_2_cont111.getLfLsts().get("lflst1111"));
384 new Lst("lst1111").addLstItem(new LstItem().addLf("lf1111B", 4)).addLstItem(
385 new LstItem().addLf("lf1111A", "lf1111A str12")), lst11_2_cont111.getLsts().get("lst1111"));
387 assertEquals(lst11_2.getLsts().get("lst112"), new Lst("lst112").addLstItem(new LstItem()));
391 assertEquals(1, lst11_3.getLfs().size());
392 assertTrue(lst11_3.getLfLsts().isEmpty());
393 assertTrue(lst11_3.getLsts().isEmpty());
394 assertTrue(lst11_3.getLsts().isEmpty());
397 Cont lst11_3_cont111 = lst11_3.getConts().get("cont111");
398 assertEquals(0, lst11_3_cont111.getLfs().size());
399 assertEquals(0, lst11_3_cont111.getLfLsts().size());
400 assertEquals(1, lst11_3_cont111.getLsts().size());
401 assertTrue(lst11_3_cont111.getConts().isEmpty());
403 assertEquals(new Lst("lst1111").addLstItem(new LstItem()).addLstItem(new LstItem()), lst11_3_cont111.getLsts()
410 private void checkDataFromJson(final Cont dataFromJson) {
411 assertNotNull(dataFromJson.getLfs().get("lf11"));
412 assertEquals(dataFromJson.getLfs().get("lf11"), new Lf("lf11", "lf"));
414 LfLst lflst11 = null;
415 LfLst lflst12 = null;
417 lflst11 = dataFromJson.getLfLsts().get("lflst11");
418 lflst12 = dataFromJson.getLfLsts().get("lflst12");
420 assertNotNull(lflst11);
421 assertNotNull(lflst12);
423 assertEquals(3, lflst11.getLfs().size());
424 assertTrue(lflst11.getLfs().contains(new Lf(55)));
425 assertTrue(lflst11.getLfs().contains(new Lf(56)));
426 assertTrue(lflst11.getLfs().contains(new Lf(57)));
428 assertEquals(3, lflst12.getLfs().size());
429 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str1")));
430 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str2")));
431 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str3")));
433 assertEquals(1, dataFromJson.getLsts().size());
434 Lst lst11 = dataFromJson.getLsts().get("lst11");
435 assertNotNull(lst11);
436 assertEquals(2, lst11.getLstItems().size());
438 LstItem lst11_1 = null;
439 LstItem lst11_2 = null;
440 for (LstItem lstItem : lst11.getLstItems()) {
441 Lf lf = lstItem.getLfs().get("lf111");
442 if (lf != null && lf.getValue().equals(140)) {
444 } else if (lf != null && lf.getValue().equals(141)) {
449 checkLst11_1(lst11_1);
450 checkLst11_2(lst11_2);
453 private void checkLst11_2(final LstItem lst11_2) {
454 assertNotNull(lst11_2);
455 assertEquals(2, lst11_2.getLfs().size());
456 assertEquals(1, lst11_2.getConts().size());
457 assertEquals(2, lst11_2.getLsts().size());
459 assertEquals(lst11_2.getLfs().get("lf112"), new Lf("lf112", "lf112 str2"));
461 Cont lst11_2_cont = lst11_2.getConts().get("cont111");
462 assertEquals(0, lst11_2_cont.getConts().size());
463 assertEquals(1, lst11_2_cont.getLfLsts().size());
464 assertEquals(1, lst11_2_cont.getLfs().size());
465 assertEquals(1, lst11_2_cont.getLsts().size());
468 assertEquals(new Lf("lf1111", "lf1111 str2"), lst11_2_cont.getLfs().get("lf1111"));
469 assertEquals(new LfLst("lflst1111").addLf(new Lf(2049)).addLf(new Lf(1025)).addLf(new Lf(4097)), lst11_2_cont
470 .getLfLsts().get("lflst1111"));
472 assertNotNull(lst11_2_cont.getLsts().get("lst1111"));
473 checkLst1111(lst11_2_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str21"), new Lf(
474 "lf1111B", 5), new Lf("lf1111A", "lf1111A str22"), new Lf("lf1111B", 8));
476 checkLst11x(lst11_2.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 55)),
477 new LstItem().addLf(new Lf("lf1111", 56)));
478 checkLst11x(lst11_2.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str22")),
479 new LstItem().addLf(new Lf("lf1121", "lf1121 str21")));
482 private void checkLst11_1(final LstItem lst11_1) {
483 assertNotNull(lst11_1);
485 assertEquals(2, lst11_1.getLfs().size());
486 assertEquals(1, lst11_1.getConts().size());
487 assertEquals(2, lst11_1.getLsts().size());
489 assertEquals(lst11_1.getLfs().get("lf112"), new Lf("lf112", "lf112 str"));
491 Cont lst11_1_cont = lst11_1.getConts().get("cont111");
492 assertEquals(0, lst11_1_cont.getConts().size());
493 assertEquals(1, lst11_1_cont.getLfLsts().size());
494 assertEquals(1, lst11_1_cont.getLfs().size());
495 assertEquals(1, lst11_1_cont.getLsts().size());
498 assertEquals(new Lf("lf1111", "lf1111 str"), lst11_1_cont.getLfs().get("lf1111"));
499 assertEquals(new LfLst("lflst1111").addLf(new Lf(2048)).addLf(new Lf(1024)).addLf(new Lf(4096)), lst11_1_cont
500 .getLfLsts().get("lflst1111"));
502 assertNotNull(lst11_1_cont.getLsts().get("lst1111"));
503 checkLst1111(lst11_1_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str11"), new Lf(
504 "lf1111B", 4), new Lf("lf1111A", "lf1111A str12"), new Lf("lf1111B", 7));
506 checkLst11x(lst11_1.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 65)));
507 checkLst11x(lst11_1.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str11")));
510 private void checkLst11x(final Lst lst, final LstItem... lstItems) {
513 Lst requiredLst = new Lst(lst.getName());
514 for (LstItem lstItem : lstItems) {
515 requiredLst.addLstItem(lstItem);
518 assertEquals(requiredLst, lst);
522 private void checkLst1111(final Set<LstItem> lstItems, final Lf lf11, final Lf lf12, final Lf lf21, final Lf lf22) {
523 LstItem lst11_1_cont_lst1111_1 = null;
524 LstItem lst11_1_cont_lst1111_2 = null;
525 for (LstItem lstItem : lstItems) {
526 if (new LstItem().addLf(lf11).addLf(lf12).equals(lstItem)) {
527 lst11_1_cont_lst1111_1 = lstItem;
528 } else if (new LstItem().addLf(lf21).addLf(lf22).equals(lstItem)) {
529 lst11_1_cont_lst1111_2 = lstItem;
533 assertNotNull(lst11_1_cont_lst1111_1);
534 assertNotNull(lst11_1_cont_lst1111_2);
537 private CompositeNode prepareCompositeNodeWithEmpties() {
538 MutableCompositeNode cont1 = NodeFactory.createMutableCompositeNode(
539 TestUtils.buildQName("cont1", "simple:yang:types", "2013-11-5"), null, null, ModifyAction.CREATE, null);
542 MutableCompositeNode lst11_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11","simple:yang:types","2013-11-5"), cont1,
543 null, ModifyAction.CREATE, null);
544 cont1.getValue().add(lst11_1);
546 MutableSimpleNode<?> lf111_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111","simple:yang:types","2013-11-5"), lst11_1,
547 (short) 1, ModifyAction.CREATE, null);
548 lst11_1.getValue().add(lf111_1);
551 MutableCompositeNode lst111_1_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111","simple:yang:types","2013-11-5"),
552 lst11_1, null, ModifyAction.CREATE, null);
553 lst11_1.getValue().add(lst111_1_1);
554 MutableSimpleNode<?> lf1111_1_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111","simple:yang:types","2013-11-5"),
555 lst111_1_1, 34, ModifyAction.CREATE, null);
556 lst111_1_1.getValue().add(lf1111_1_1);
561 MutableCompositeNode lst111_1_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111","simple:yang:types","2013-11-5"),
562 lst11_1, null, ModifyAction.CREATE, null);
563 lst11_1.getValue().add(lst111_1_2);
564 MutableSimpleNode<?> lf1111_1_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111","simple:yang:types","2013-11-5"),
565 lst111_1_2, 35, ModifyAction.CREATE, null);
566 lst111_1_2.getValue().add(lf1111_1_2);
571 MutableCompositeNode lst111_1_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111","simple:yang:types","2013-11-5"),
572 lst11_1, null, ModifyAction.CREATE, null);
573 lst11_1.getValue().add(lst111_1_3);
578 MutableCompositeNode lst111_1_4 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111","simple:yang:types","2013-11-5"),
579 lst11_1, null, ModifyAction.CREATE, null);
580 lst11_1.getValue().add(lst111_1_4);
584 MutableCompositeNode cont111_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111","simple:yang:types","2013-11-5"),
585 lst11_1, null, ModifyAction.CREATE, null);
586 lst11_1.getValue().add(cont111_1);
592 MutableCompositeNode lst11_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11","simple:yang:types","2013-11-5"), cont1,
593 null, ModifyAction.CREATE, null);
594 cont1.getValue().add(lst11_2);
596 MutableSimpleNode<?> lf111_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111","simple:yang:types","2013-11-5"), lst11_2,
597 (short) 2, ModifyAction.CREATE, null);
598 lst11_2.getValue().add(lf111_2);
601 MutableCompositeNode cont111_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111","simple:yang:types","2013-11-5"),
602 lst11_2, null, ModifyAction.CREATE, null);
603 lst11_2.getValue().add(cont111_2);
605 MutableSimpleNode<?> lflst1111_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111","simple:yang:types","2013-11-5"),
606 cont111_2, 1024, ModifyAction.CREATE, null);
607 cont111_2.getValue().add(lflst1111_2_2);
608 MutableSimpleNode<?> lflst1111_2_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111","simple:yang:types","2013-11-5"),
609 cont111_2, 4096, ModifyAction.CREATE, null);
610 cont111_2.getValue().add(lflst1111_2_3);
613 MutableCompositeNode lst1111_2_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111","simple:yang:types","2013-11-5"),
614 cont111_2, null, ModifyAction.CREATE, null);
615 cont111_2.getValue().add(lst1111_2_1);
616 MutableSimpleNode<?> lf1111B_2_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111B","simple:yang:types","2013-11-5"),
617 lst1111_2_1, (short) 4, ModifyAction.CREATE, null);
618 lst1111_2_1.getValue().add(lf1111B_2_1);
621 MutableCompositeNode lst1111_2_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111","simple:yang:types","2013-11-5"),
622 cont111_2, null, ModifyAction.CREATE, null);
623 cont111_2.getValue().add(lst1111_2_2);
624 MutableSimpleNode<?> lf1111A_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111A","simple:yang:types","2013-11-5"),
625 lst1111_2_2, "lf1111A str12", ModifyAction.CREATE, null);
626 lst1111_2_2.getValue().add(lf1111A_2_2);
633 MutableCompositeNode lst112_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst112","simple:yang:types","2013-11-5"), lst11_2,
634 null, ModifyAction.CREATE, null);
635 lst11_2.getValue().add(lst112_2);
642 MutableCompositeNode lst11_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11","simple:yang:types","2013-11-5"), cont1,
643 null, ModifyAction.CREATE, null);
644 cont1.getValue().add(lst11_3);
646 MutableSimpleNode<?> lf111_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111","simple:yang:types","2013-11-5"), lst11_3,
647 (short) 3, ModifyAction.CREATE, null);
648 lst11_3.getValue().add(lf111_3);
651 MutableCompositeNode cont111_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111","simple:yang:types","2013-11-5"),
652 lst11_3, null, ModifyAction.CREATE, null);
653 lst11_3.getValue().add(cont111_3);
655 MutableCompositeNode lst1111_3_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111","simple:yang:types","2013-11-5"),
656 cont111_3, null, ModifyAction.CREATE, null);
657 cont111_3.getValue().add(lst1111_3_1);
660 MutableCompositeNode lst1111_3_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111","simple:yang:types","2013-11-5"),
661 cont111_3, null, ModifyAction.CREATE, null);
662 cont111_3.getValue().add(lst1111_3_2);