1 package org.opendaylight.controller.sal.restconf.impl.cnsn.to.json.test;
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertFalse;
5 import static org.junit.Assert.assertNotNull;
6 import static org.junit.Assert.assertNull;
7 import static org.junit.Assert.assertTrue;
9 import java.io.IOException;
10 import java.io.StringReader;
14 import javax.ws.rs.WebApplicationException;
16 import org.junit.BeforeClass;
17 import org.junit.Test;
18 import org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider;
19 import org.opendaylight.controller.sal.rest.impl.XmlToCompositeNodeProvider;
20 import org.opendaylight.controller.sal.restconf.impl.test.TestUtils;
21 import org.opendaylight.controller.sal.restconf.impl.test.YangAndXmlAndDataSchemaLoader;
22 import org.opendaylight.controller.sal.restconf.impl.test.structures.Cont;
23 import org.opendaylight.controller.sal.restconf.impl.test.structures.Lf;
24 import org.opendaylight.controller.sal.restconf.impl.test.structures.LfLst;
25 import org.opendaylight.controller.sal.restconf.impl.test.structures.Lst;
26 import org.opendaylight.controller.sal.restconf.impl.test.structures.LstItem;
27 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
28 import org.opendaylight.yangtools.yang.data.api.ModifyAction;
29 import org.opendaylight.yangtools.yang.data.api.MutableCompositeNode;
30 import org.opendaylight.yangtools.yang.data.api.MutableSimpleNode;
31 import org.opendaylight.yangtools.yang.data.impl.NodeFactory;
33 import com.google.gson.stream.JsonReader;
34 import com.google.gson.stream.JsonToken;
36 public class CnSnJsonBasicYangTypesTest extends YangAndXmlAndDataSchemaLoader {
39 public static void initialize() {
40 dataLoad("/cnsn-to-json/simple-yang-types", 1, "simple-yang-types", "cont1");
44 * Test of json output when as input are specified composite node with empty
48 public void compositeNodeAndYangWithJsonReaderEmptyDataTest() {
49 CompositeNode compositeNode = prepareCompositeNodeWithEmpties();
50 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
51 String jsonOutput = null;
53 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
54 StructuredDataToJsonProvider.INSTANCE);
55 } catch (WebApplicationException | IOException e) {
58 verifyJsonOutputForEmptyData(jsonOutput);
62 * Test of json output when as input are specified xml file (no empty
63 * elements)and YANG file
66 public void xmlAndYangTypesWithJsonReaderTest() {
67 CompositeNode compositeNode = TestUtils.readInputToCnSn("/cnsn-to-json/simple-yang-types/xml/data.xml",
68 XmlToCompositeNodeProvider.INSTANCE);
69 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
70 String jsonOutput = null;
72 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
73 StructuredDataToJsonProvider.INSTANCE);
74 } catch (WebApplicationException | IOException e) {
77 verifyJsonOutput(jsonOutput);
80 private void verifyJsonOutputForEmptyData(String jsonOutput) {
81 assertNotNull(jsonOutput);
82 StringReader strReader = new StringReader(jsonOutput);
83 JsonReader jReader = new JsonReader(strReader);
85 String exception = null;
86 Cont dataFromJson = null;
88 dataFromJson = jsonReadCont1(jReader);
89 } catch (IOException e) {
90 exception = e.getMessage();
93 assertNotNull("Data structures from json are missing.", dataFromJson);
94 checkDataFromJsonEmpty(dataFromJson);
96 assertNull("Error during reading Json output: " + exception, exception);
99 private void verifyJsonOutput(String jsonOutput) {
100 assertNotNull(jsonOutput);
101 StringReader strReader = new StringReader(jsonOutput);
102 JsonReader jReader = new JsonReader(strReader);
104 String exception = null;
105 Cont dataFromJson = null;
107 dataFromJson = jsonReadCont1(jReader);
108 } catch (IOException e) {
109 exception = e.getMessage();
112 assertNotNull("Data structures from json are missing.", dataFromJson);
113 checkDataFromJson(dataFromJson);
115 assertNull("Error during reading Json output: " + exception, exception);
118 private Cont jsonReadCont1(JsonReader jReader) throws IOException {
119 jReader.beginObject();
120 assertNotNull("cont1 is missing.", jReader.hasNext());
122 Cont dataFromJson = new Cont(jReader.nextName());
123 dataFromJson = jsonReadCont1Elements(jReader, dataFromJson);
125 assertFalse("cont shouldn't have other element.", jReader.hasNext());
131 private Cont jsonReadCont1Elements(JsonReader jReader, Cont redData) throws IOException {
132 jReader.beginObject();
133 while (jReader.hasNext()) {
134 String keyName = jReader.nextName();
135 if (keyName.equals("lf11")) {
136 redData.addLf(new Lf(keyName, nextValue(jReader)));
137 } else if (keyName.equals("lflst11")) {
138 LfLst lfLst = new LfLst(keyName);
139 lfLst = jsonReadLflstValues(jReader, lfLst);
140 redData.addLfLst(lfLst);
141 } else if (keyName.equals("lflst12")) {
142 LfLst lfLst = new LfLst(keyName);
143 jsonReadLflstValues(jReader, lfLst);
144 redData.addLfLst(lfLst);
145 } else if (keyName.equals("lst11")) {
146 Lst lst = new Lst(keyName);
147 lst = jsonReadLst11(jReader, lst);
150 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
158 private Lst jsonReadLst11(JsonReader jReader, Lst lst) throws IOException {
159 jReader.beginArray();
161 while (jReader.hasNext()) {
162 LstItem lstItem = jsonReadLst11Elements(jReader);
163 lst.addLstItem(lstItem);
169 private LstItem jsonReadLst11Elements(JsonReader jReader) throws IOException {
170 LstItem lstItem = new LstItem();
171 jReader.beginObject();
172 while (jReader.hasNext()) {
173 String keyName = jReader.nextName();
174 if (keyName.equals("lf111")) {
175 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
176 } else if (keyName.equals("lf112")) {
177 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
178 } else if (keyName.equals("cont111")) {
179 Cont cont = new Cont(keyName);
180 cont = jsonReadCont111(jReader, cont);
181 lstItem.addCont(cont);
182 } else if (keyName.equals("lst111")) {
183 Lst lst = new Lst(keyName);
184 lst = jsonReadLst111(jReader, lst);
186 } else if (keyName.equals("lst112")) {
187 Lst lst = new Lst(keyName);
188 lst = jsonReadLst112(jReader, lst);
191 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
198 private Lst jsonReadLst112(JsonReader jReader, Lst lst) throws IOException {
199 jReader.beginArray();
200 while (jReader.hasNext()) {
201 LstItem lstItem = jsonReadLst112Elements(jReader);
202 lst.addLstItem(lstItem);
208 private LstItem jsonReadLst112Elements(JsonReader jReader) throws IOException {
209 LstItem lstItem = new LstItem();
210 jReader.beginObject();
211 if (jReader.hasNext()) {
212 String keyName = jReader.nextName();
213 if (keyName.equals("lf1121")) {
214 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
222 private Lst jsonReadLst111(JsonReader jReader, Lst lst) throws IOException {
223 jReader.beginArray();
224 while (jReader.hasNext()) {
225 LstItem lstItem = jsonReadLst111Elements(jReader);
226 lst.addLstItem(lstItem);
232 private LstItem jsonReadLst111Elements(JsonReader jReader) throws IOException {
233 LstItem lstItem = new LstItem();
234 jReader.beginObject();
235 if (jReader.hasNext()) {
236 String keyName = jReader.nextName();
237 if (keyName.equals("lf1111")) {
238 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
245 private Object nextValue(JsonReader jReader) throws IOException {
246 if (jReader.peek().equals(JsonToken.NULL)) {
249 } else if (jReader.peek().equals(JsonToken.NUMBER)) {
250 return jReader.nextInt();
252 return jReader.nextString();
256 private Cont jsonReadCont111(JsonReader jReader, Cont cont) throws IOException {
257 jReader.beginObject();
258 cont = jsonReadCont111Elements(jReader, cont);
263 private Cont jsonReadCont111Elements(JsonReader jReader, Cont cont) throws IOException {
264 while (jReader.hasNext()) {
265 String keyName = jReader.nextName();
266 if (keyName.equals("lf1111")) {
267 cont.addLf(new Lf(keyName, nextValue(jReader)));
268 } else if (keyName.equals("lflst1111")) {
269 LfLst lfLst = new LfLst(keyName);
270 lfLst = jsonReadLflstValues(jReader, lfLst);
271 cont.addLfLst(lfLst);
272 } else if (keyName.equals("lst1111")) {
273 Lst lst = new Lst(keyName);
274 lst = jsonReadLst1111(jReader, lst);
277 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
284 private Lst jsonReadLst1111(JsonReader jReader, Lst lst) throws IOException {
285 jReader.beginArray();
286 while (jReader.hasNext()) {
287 LstItem lstItem = jsonReadLst1111Elements(jReader);
288 lst.addLstItem(lstItem);
294 private LstItem jsonReadLst1111Elements(JsonReader jReader) throws IOException {
295 jReader.beginObject();
296 LstItem lstItem = new LstItem();
297 while (jReader.hasNext()) {
298 String keyName = jReader.nextName();
299 if (keyName.equals("lf1111A") || keyName.equals("lf1111B")) {
300 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
307 private LfLst jsonReadLflstValues(JsonReader jReader, LfLst lfLst) throws IOException {
308 jReader.beginArray();
309 while (jReader.hasNext()) {
310 lfLst.addLf(new Lf(nextValue(jReader)));
316 private void checkDataFromJsonEmpty(Cont dataFromJson) {
317 assertTrue(dataFromJson.getLfs().isEmpty());
318 assertTrue(dataFromJson.getLfLsts().isEmpty());
319 assertTrue(dataFromJson.getConts().isEmpty());
321 Map<String, Lst> lsts = dataFromJson.getLsts();
322 assertEquals(1, lsts.size());
323 Lst lst11 = lsts.get("lst11");
324 assertNotNull(lst11);
325 Set<LstItem> lstItems = lst11.getLstItems();
326 assertNotNull(lstItems);
328 LstItem lst11_1 = null;
329 LstItem lst11_2 = null;
330 LstItem lst11_3 = null;
331 for (LstItem lstItem : lstItems) {
332 if (lstItem.getLfs().get("lf111").getValue().equals(1)) {
334 } else if (lstItem.getLfs().get("lf111").getValue().equals(2)) {
336 } else if (lstItem.getLfs().get("lf111").getValue().equals(3)) {
341 assertNotNull(lst11_1);
342 assertNotNull(lst11_2);
343 assertNotNull(lst11_3);
346 assertTrue(lst11_1.getLfLsts().isEmpty());
347 assertEquals(1, lst11_1.getLfs().size());
348 assertEquals(1, lst11_1.getConts().size());
349 assertEquals(1, lst11_1.getLsts().size());
351 lst11_1.getLsts().get("lst111"),
352 new Lst("lst111").addLstItem(new LstItem().addLf("lf1111", (int) 35))
353 .addLstItem(new LstItem().addLf("lf1111", (int) 34)).addLstItem(new LstItem())
354 .addLstItem(new LstItem()));
355 assertEquals(lst11_1.getConts().get("cont111"), new Cont("cont111"));
359 assertTrue(lst11_2.getLfLsts().isEmpty());
360 assertEquals(1, lst11_2.getLfs().size());
361 assertEquals(1, lst11_2.getConts().size());
362 assertEquals(1, lst11_2.getLsts().size());
364 Cont lst11_2_cont111 = lst11_2.getConts().get("cont111");
367 assertNotNull(lst11_2_cont111);
368 assertTrue(lst11_2_cont111.getLfs().isEmpty());
369 assertEquals(1, lst11_2_cont111.getLfLsts().size());
370 assertEquals(1, lst11_2_cont111.getLsts().size());
371 assertTrue(lst11_2_cont111.getConts().isEmpty());
373 assertEquals(new LfLst("lflst1111").addLf((int) 1024).addLf((int) 4096),
374 lst11_2_cont111.getLfLsts().get("lflst1111"));
376 new Lst("lst1111").addLstItem(new LstItem().addLf("lf1111B", (int) 4)).addLstItem(
377 new LstItem().addLf("lf1111A", "lf1111A str12")), lst11_2_cont111.getLsts().get("lst1111"));
379 assertEquals(lst11_2.getLsts().get("lst112"), new Lst("lst112").addLstItem(new LstItem()));
383 assertEquals(1, lst11_3.getLfs().size());
384 assertTrue(lst11_3.getLfLsts().isEmpty());
385 assertTrue(lst11_3.getLsts().isEmpty());
386 assertTrue(lst11_3.getLsts().isEmpty());
389 Cont lst11_3_cont111 = lst11_3.getConts().get("cont111");
390 assertEquals(0, lst11_3_cont111.getLfs().size());
391 assertEquals(0, lst11_3_cont111.getLfLsts().size());
392 assertEquals(1, lst11_3_cont111.getLsts().size());
393 assertTrue(lst11_3_cont111.getConts().isEmpty());
395 assertEquals(new Lst("lst1111").addLstItem(new LstItem()).addLstItem(new LstItem()), lst11_3_cont111.getLsts()
402 private void checkDataFromJson(Cont dataFromJson) {
403 assertNotNull(dataFromJson.getLfs().get("lf11"));
404 assertEquals(dataFromJson.getLfs().get("lf11"), new Lf("lf11", "lf"));
406 LfLst lflst11 = null;
407 LfLst lflst12 = null;
409 lflst11 = dataFromJson.getLfLsts().get("lflst11");
410 lflst12 = dataFromJson.getLfLsts().get("lflst12");
412 assertNotNull(lflst11);
413 assertNotNull(lflst12);
415 assertEquals(3, lflst11.getLfs().size());
416 assertTrue(lflst11.getLfs().contains(new Lf(55)));
417 assertTrue(lflst11.getLfs().contains(new Lf(56)));
418 assertTrue(lflst11.getLfs().contains(new Lf(57)));
420 assertEquals(3, lflst12.getLfs().size());
421 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str1")));
422 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str2")));
423 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str3")));
425 assertEquals(1, dataFromJson.getLsts().size());
426 Lst lst11 = dataFromJson.getLsts().get("lst11");
427 assertNotNull(lst11);
428 assertEquals(2, lst11.getLstItems().size());
430 LstItem lst11_1 = null;
431 LstItem lst11_2 = null;
432 for (LstItem lstItem : lst11.getLstItems()) {
433 Lf lf = lstItem.getLfs().get("lf111");
434 if (lf != null && lf.getValue().equals(140)) {
436 } else if (lf != null && lf.getValue().equals(141)) {
441 checkLst11_1(lst11_1);
442 checkLst11_2(lst11_2);
445 private void checkLst11_2(LstItem lst11_2) {
446 assertNotNull(lst11_2);
447 assertEquals(2, lst11_2.getLfs().size());
448 assertEquals(1, lst11_2.getConts().size());
449 assertEquals(2, lst11_2.getLsts().size());
451 assertEquals(lst11_2.getLfs().get("lf112"), new Lf("lf112", "lf112 str2"));
453 Cont lst11_2_cont = lst11_2.getConts().get("cont111");
454 assertEquals(0, lst11_2_cont.getConts().size());
455 assertEquals(1, lst11_2_cont.getLfLsts().size());
456 assertEquals(1, lst11_2_cont.getLfs().size());
457 assertEquals(1, lst11_2_cont.getLsts().size());
460 assertEquals(new Lf("lf1111", "lf1111 str2"), lst11_2_cont.getLfs().get("lf1111"));
461 assertEquals(new LfLst("lflst1111").addLf(new Lf(2049)).addLf(new Lf(1025)).addLf(new Lf(4097)), lst11_2_cont
462 .getLfLsts().get("lflst1111"));
464 assertNotNull(lst11_2_cont.getLsts().get("lst1111"));
465 checkLst1111(lst11_2_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str21"), new Lf(
466 "lf1111B", 5), new Lf("lf1111A", "lf1111A str22"), new Lf("lf1111B", 8));
468 checkLst11x(lst11_2.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 55)),
469 new LstItem().addLf(new Lf("lf1111", 56)));
470 checkLst11x(lst11_2.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str22")),
471 new LstItem().addLf(new Lf("lf1121", "lf1121 str21")));
474 private void checkLst11_1(LstItem lst11_1) {
475 assertNotNull(lst11_1);
477 assertEquals(2, lst11_1.getLfs().size());
478 assertEquals(1, lst11_1.getConts().size());
479 assertEquals(2, lst11_1.getLsts().size());
481 assertEquals(lst11_1.getLfs().get("lf112"), new Lf("lf112", "lf112 str"));
483 Cont lst11_1_cont = lst11_1.getConts().get("cont111");
484 assertEquals(0, lst11_1_cont.getConts().size());
485 assertEquals(1, lst11_1_cont.getLfLsts().size());
486 assertEquals(1, lst11_1_cont.getLfs().size());
487 assertEquals(1, lst11_1_cont.getLsts().size());
490 assertEquals(new Lf("lf1111", "lf1111 str"), lst11_1_cont.getLfs().get("lf1111"));
491 assertEquals(new LfLst("lflst1111").addLf(new Lf(2048)).addLf(new Lf(1024)).addLf(new Lf(4096)), lst11_1_cont
492 .getLfLsts().get("lflst1111"));
494 assertNotNull(lst11_1_cont.getLsts().get("lst1111"));
495 checkLst1111(lst11_1_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str11"), new Lf(
496 "lf1111B", 4), new Lf("lf1111A", "lf1111A str12"), new Lf("lf1111B", 7));
498 checkLst11x(lst11_1.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 65)));
499 checkLst11x(lst11_1.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str11")));
502 private void checkLst11x(Lst lst, LstItem... lstItems) {
505 Lst requiredLst = new Lst(lst.getName());
506 for (LstItem lstItem : lstItems) {
507 requiredLst.addLstItem(lstItem);
510 assertEquals(requiredLst, lst);
514 private void checkLst1111(Set<LstItem> lstItems, Lf lf11, Lf lf12, Lf lf21, Lf lf22) {
515 LstItem lst11_1_cont_lst1111_1 = null;
516 LstItem lst11_1_cont_lst1111_2 = null;
517 for (LstItem lstItem : lstItems) {
518 if (new LstItem().addLf(lf11).addLf(lf12).equals(lstItem)) {
519 lst11_1_cont_lst1111_1 = lstItem;
520 } else if (new LstItem().addLf(lf21).addLf(lf22).equals(lstItem)) {
521 lst11_1_cont_lst1111_2 = lstItem;
525 assertNotNull(lst11_1_cont_lst1111_1);
526 assertNotNull(lst11_1_cont_lst1111_2);
529 private CompositeNode prepareCompositeNodeWithEmpties() {
530 MutableCompositeNode cont1 = NodeFactory.createMutableCompositeNode(
531 TestUtils.buildQName("cont1", "simple:yang:types", "2013-11-5"), null, null, ModifyAction.CREATE, null);
534 MutableCompositeNode lst11_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
535 null, ModifyAction.CREATE, null);
536 cont1.getChildren().add(lst11_1);
538 MutableSimpleNode<?> lf111_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_1,
539 (short) 1, ModifyAction.CREATE, null);
540 lst11_1.getChildren().add(lf111_1);
543 MutableCompositeNode lst111_1_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
544 lst11_1, null, ModifyAction.CREATE, null);
545 lst11_1.getChildren().add(lst111_1_1);
546 MutableSimpleNode<?> lf1111_1_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111"),
547 lst111_1_1, (int) 34, ModifyAction.CREATE, null);
548 lst111_1_1.getChildren().add(lf1111_1_1);
553 MutableCompositeNode lst111_1_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
554 lst11_1, null, ModifyAction.CREATE, null);
555 lst11_1.getChildren().add(lst111_1_2);
556 MutableSimpleNode<?> lf1111_1_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111"),
557 lst111_1_2, (int) 35, ModifyAction.CREATE, null);
558 lst111_1_2.getChildren().add(lf1111_1_2);
563 MutableCompositeNode lst111_1_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
564 lst11_1, null, ModifyAction.CREATE, null);
565 lst11_1.getChildren().add(lst111_1_3);
570 MutableCompositeNode lst111_1_4 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
571 lst11_1, null, ModifyAction.CREATE, null);
572 lst11_1.getChildren().add(lst111_1_4);
576 MutableCompositeNode cont111_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
577 lst11_1, null, ModifyAction.CREATE, null);
578 lst11_1.getChildren().add(cont111_1);
584 MutableCompositeNode lst11_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
585 null, ModifyAction.CREATE, null);
586 cont1.getChildren().add(lst11_2);
588 MutableSimpleNode<?> lf111_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_2,
589 (short) 2, ModifyAction.CREATE, null);
590 lst11_2.getChildren().add(lf111_2);
593 MutableCompositeNode cont111_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
594 lst11_2, null, ModifyAction.CREATE, null);
595 lst11_2.getChildren().add(cont111_2);
597 MutableSimpleNode<?> lflst1111_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111"),
598 cont111_2, (int) 1024, ModifyAction.CREATE, null);
599 cont111_2.getChildren().add(lflst1111_2_2);
600 MutableSimpleNode<?> lflst1111_2_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111"),
601 cont111_2, (int) 4096, ModifyAction.CREATE, null);
602 cont111_2.getChildren().add(lflst1111_2_3);
605 MutableCompositeNode lst1111_2_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
606 cont111_2, null, ModifyAction.CREATE, null);
607 cont111_2.getChildren().add(lst1111_2_1);
608 MutableSimpleNode<?> lf1111B_2_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111B"),
609 lst1111_2_1, (short) 4, ModifyAction.CREATE, null);
610 lst1111_2_1.getChildren().add(lf1111B_2_1);
613 MutableCompositeNode lst1111_2_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
614 cont111_2, null, ModifyAction.CREATE, null);
615 cont111_2.getChildren().add(lst1111_2_2);
616 MutableSimpleNode<?> lf1111A_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111A"),
617 lst1111_2_2, "lf1111A str12", ModifyAction.CREATE, null);
618 lst1111_2_2.getChildren().add(lf1111A_2_2);
625 MutableCompositeNode lst112_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst112"), lst11_2,
626 null, ModifyAction.CREATE, null);
627 lst11_2.getChildren().add(lst112_2);
634 MutableCompositeNode lst11_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
635 null, ModifyAction.CREATE, null);
636 cont1.getChildren().add(lst11_3);
638 MutableSimpleNode<?> lf111_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_3,
639 (short) 3, ModifyAction.CREATE, null);
640 lst11_3.getChildren().add(lf111_3);
643 MutableCompositeNode cont111_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
644 lst11_3, null, ModifyAction.CREATE, null);
645 lst11_3.getChildren().add(cont111_3);
647 MutableCompositeNode lst1111_3_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
648 cont111_3, null, ModifyAction.CREATE, null);
649 cont111_3.getChildren().add(lst1111_3_1);
652 MutableCompositeNode lst1111_3_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
653 cont111_3, null, ModifyAction.CREATE, null);
654 cont111_3.getChildren().add(lst1111_3_2);