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
55 public void compositeNodeAndYangWithJsonReaderEmptyDataTest() {
56 CompositeNode compositeNode = prepareCompositeNodeWithEmpties();
57 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
58 String jsonOutput = null;
60 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
61 StructuredDataToJsonProvider.INSTANCE);
62 } catch (WebApplicationException | IOException e) {
65 verifyJsonOutputForEmptyData(jsonOutput);
69 * Test of json output when as input are specified xml file (no empty
70 * elements)and YANG file
73 public void xmlAndYangTypesWithJsonReaderTest() {
74 CompositeNode compositeNode = TestUtils.readInputToCnSn("/cnsn-to-json/simple-yang-types/xml/data.xml",
75 XmlToCompositeNodeProvider.INSTANCE);
76 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
77 String jsonOutput = null;
79 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
80 StructuredDataToJsonProvider.INSTANCE);
81 } catch (WebApplicationException | IOException e) {
84 verifyJsonOutput(jsonOutput);
87 private void verifyJsonOutputForEmptyData(String jsonOutput) {
88 assertNotNull(jsonOutput);
89 StringReader strReader = new StringReader(jsonOutput);
90 JsonReader jReader = new JsonReader(strReader);
92 String exception = null;
93 Cont dataFromJson = null;
95 dataFromJson = jsonReadCont1(jReader);
96 } catch (IOException e) {
97 exception = e.getMessage();
100 assertNotNull("Data structures from json are missing.", dataFromJson);
101 checkDataFromJsonEmpty(dataFromJson);
103 assertNull("Error during reading Json output: " + exception, exception);
106 private void verifyJsonOutput(String jsonOutput) {
107 assertNotNull(jsonOutput);
108 StringReader strReader = new StringReader(jsonOutput);
109 JsonReader jReader = new JsonReader(strReader);
111 String exception = null;
112 Cont dataFromJson = null;
114 dataFromJson = jsonReadCont1(jReader);
115 } catch (IOException e) {
116 exception = e.getMessage();
119 assertNotNull("Data structures from json are missing.", dataFromJson);
120 checkDataFromJson(dataFromJson);
122 assertNull("Error during reading Json output: " + exception, exception);
125 private Cont jsonReadCont1(JsonReader jReader) throws IOException {
126 jReader.beginObject();
127 assertNotNull("cont1 is missing.", jReader.hasNext());
129 Cont dataFromJson = new Cont(jReader.nextName());
130 dataFromJson = jsonReadCont1Elements(jReader, dataFromJson);
132 assertFalse("cont shouldn't have other element.", jReader.hasNext());
138 private Cont jsonReadCont1Elements(JsonReader jReader, Cont redData) throws IOException {
139 jReader.beginObject();
140 while (jReader.hasNext()) {
141 String keyName = jReader.nextName();
142 if (keyName.equals("lf11")) {
143 redData.addLf(new Lf(keyName, nextValue(jReader)));
144 } else if (keyName.equals("lflst11")) {
145 LfLst lfLst = new LfLst(keyName);
146 lfLst = jsonReadLflstValues(jReader, lfLst);
147 redData.addLfLst(lfLst);
148 } else if (keyName.equals("lflst12")) {
149 LfLst lfLst = new LfLst(keyName);
150 jsonReadLflstValues(jReader, lfLst);
151 redData.addLfLst(lfLst);
152 } else if (keyName.equals("lst11")) {
153 Lst lst = new Lst(keyName);
154 lst = jsonReadLst11(jReader, lst);
157 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
165 private Lst jsonReadLst11(JsonReader jReader, Lst lst) throws IOException {
166 jReader.beginArray();
168 while (jReader.hasNext()) {
169 LstItem lstItem = jsonReadLst11Elements(jReader);
170 lst.addLstItem(lstItem);
176 private LstItem jsonReadLst11Elements(JsonReader jReader) throws IOException {
177 LstItem lstItem = new LstItem();
178 jReader.beginObject();
179 while (jReader.hasNext()) {
180 String keyName = jReader.nextName();
181 if (keyName.equals("lf111")) {
182 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
183 } else if (keyName.equals("lf112")) {
184 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
185 } else if (keyName.equals("cont111")) {
186 Cont cont = new Cont(keyName);
187 cont = jsonReadCont111(jReader, cont);
188 lstItem.addCont(cont);
189 } else if (keyName.equals("lst111")) {
190 Lst lst = new Lst(keyName);
191 lst = jsonReadLst111(jReader, lst);
193 } else if (keyName.equals("lst112")) {
194 Lst lst = new Lst(keyName);
195 lst = jsonReadLst112(jReader, lst);
198 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
205 private Lst jsonReadLst112(JsonReader jReader, Lst lst) throws IOException {
206 jReader.beginArray();
207 while (jReader.hasNext()) {
208 LstItem lstItem = jsonReadLst112Elements(jReader);
209 lst.addLstItem(lstItem);
215 private LstItem jsonReadLst112Elements(JsonReader jReader) throws IOException {
216 LstItem lstItem = new LstItem();
217 jReader.beginObject();
218 if (jReader.hasNext()) {
219 String keyName = jReader.nextName();
220 if (keyName.equals("lf1121")) {
221 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
229 private Lst jsonReadLst111(JsonReader jReader, Lst lst) throws IOException {
230 jReader.beginArray();
231 while (jReader.hasNext()) {
232 LstItem lstItem = jsonReadLst111Elements(jReader);
233 lst.addLstItem(lstItem);
239 private LstItem jsonReadLst111Elements(JsonReader jReader) throws IOException {
240 LstItem lstItem = new LstItem();
241 jReader.beginObject();
242 if (jReader.hasNext()) {
243 String keyName = jReader.nextName();
244 if (keyName.equals("lf1111")) {
245 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
252 private Object nextValue(JsonReader jReader) throws IOException {
253 if (jReader.peek().equals(JsonToken.NULL)) {
256 } else if (jReader.peek().equals(JsonToken.NUMBER)) {
257 return jReader.nextInt();
259 return jReader.nextString();
263 private Cont jsonReadCont111(JsonReader jReader, Cont cont) throws IOException {
264 jReader.beginObject();
265 cont = jsonReadCont111Elements(jReader, cont);
270 private Cont jsonReadCont111Elements(JsonReader jReader, Cont cont) throws IOException {
271 while (jReader.hasNext()) {
272 String keyName = jReader.nextName();
273 if (keyName.equals("lf1111")) {
274 cont.addLf(new Lf(keyName, nextValue(jReader)));
275 } else if (keyName.equals("lflst1111")) {
276 LfLst lfLst = new LfLst(keyName);
277 lfLst = jsonReadLflstValues(jReader, lfLst);
278 cont.addLfLst(lfLst);
279 } else if (keyName.equals("lst1111")) {
280 Lst lst = new Lst(keyName);
281 lst = jsonReadLst1111(jReader, lst);
284 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
291 private Lst jsonReadLst1111(JsonReader jReader, Lst lst) throws IOException {
292 jReader.beginArray();
293 while (jReader.hasNext()) {
294 LstItem lstItem = jsonReadLst1111Elements(jReader);
295 lst.addLstItem(lstItem);
301 private LstItem jsonReadLst1111Elements(JsonReader jReader) throws IOException {
302 jReader.beginObject();
303 LstItem lstItem = new LstItem();
304 while (jReader.hasNext()) {
305 String keyName = jReader.nextName();
306 if (keyName.equals("lf1111A") || keyName.equals("lf1111B")) {
307 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
314 private LfLst jsonReadLflstValues(JsonReader jReader, LfLst lfLst) throws IOException {
315 jReader.beginArray();
316 while (jReader.hasNext()) {
317 lfLst.addLf(new Lf(nextValue(jReader)));
323 private void checkDataFromJsonEmpty(Cont dataFromJson) {
324 assertTrue(dataFromJson.getLfs().isEmpty());
325 assertTrue(dataFromJson.getLfLsts().isEmpty());
326 assertTrue(dataFromJson.getConts().isEmpty());
328 Map<String, Lst> lsts = dataFromJson.getLsts();
329 assertEquals(1, lsts.size());
330 Lst lst11 = lsts.get("lst11");
331 assertNotNull(lst11);
332 Set<LstItem> lstItems = lst11.getLstItems();
333 assertNotNull(lstItems);
335 LstItem lst11_1 = null;
336 LstItem lst11_2 = null;
337 LstItem lst11_3 = null;
338 for (LstItem lstItem : lstItems) {
339 if (lstItem.getLfs().get("lf111").getValue().equals(1)) {
341 } else if (lstItem.getLfs().get("lf111").getValue().equals(2)) {
343 } else if (lstItem.getLfs().get("lf111").getValue().equals(3)) {
348 assertNotNull(lst11_1);
349 assertNotNull(lst11_2);
350 assertNotNull(lst11_3);
353 assertTrue(lst11_1.getLfLsts().isEmpty());
354 assertEquals(1, lst11_1.getLfs().size());
355 assertEquals(1, lst11_1.getConts().size());
356 assertEquals(1, lst11_1.getLsts().size());
358 lst11_1.getLsts().get("lst111"),
359 new Lst("lst111").addLstItem(new LstItem().addLf("lf1111", (int) 35))
360 .addLstItem(new LstItem().addLf("lf1111", (int) 34)).addLstItem(new LstItem())
361 .addLstItem(new LstItem()));
362 assertEquals(lst11_1.getConts().get("cont111"), new Cont("cont111"));
366 assertTrue(lst11_2.getLfLsts().isEmpty());
367 assertEquals(1, lst11_2.getLfs().size());
368 assertEquals(1, lst11_2.getConts().size());
369 assertEquals(1, lst11_2.getLsts().size());
371 Cont lst11_2_cont111 = lst11_2.getConts().get("cont111");
374 assertNotNull(lst11_2_cont111);
375 assertTrue(lst11_2_cont111.getLfs().isEmpty());
376 assertEquals(1, lst11_2_cont111.getLfLsts().size());
377 assertEquals(1, lst11_2_cont111.getLsts().size());
378 assertTrue(lst11_2_cont111.getConts().isEmpty());
380 assertEquals(new LfLst("lflst1111").addLf((int) 1024).addLf((int) 4096),
381 lst11_2_cont111.getLfLsts().get("lflst1111"));
383 new Lst("lst1111").addLstItem(new LstItem().addLf("lf1111B", (int) 4)).addLstItem(
384 new LstItem().addLf("lf1111A", "lf1111A str12")), lst11_2_cont111.getLsts().get("lst1111"));
386 assertEquals(lst11_2.getLsts().get("lst112"), new Lst("lst112").addLstItem(new LstItem()));
390 assertEquals(1, lst11_3.getLfs().size());
391 assertTrue(lst11_3.getLfLsts().isEmpty());
392 assertTrue(lst11_3.getLsts().isEmpty());
393 assertTrue(lst11_3.getLsts().isEmpty());
396 Cont lst11_3_cont111 = lst11_3.getConts().get("cont111");
397 assertEquals(0, lst11_3_cont111.getLfs().size());
398 assertEquals(0, lst11_3_cont111.getLfLsts().size());
399 assertEquals(1, lst11_3_cont111.getLsts().size());
400 assertTrue(lst11_3_cont111.getConts().isEmpty());
402 assertEquals(new Lst("lst1111").addLstItem(new LstItem()).addLstItem(new LstItem()), lst11_3_cont111.getLsts()
409 private void checkDataFromJson(Cont dataFromJson) {
410 assertNotNull(dataFromJson.getLfs().get("lf11"));
411 assertEquals(dataFromJson.getLfs().get("lf11"), new Lf("lf11", "lf"));
413 LfLst lflst11 = null;
414 LfLst lflst12 = null;
416 lflst11 = dataFromJson.getLfLsts().get("lflst11");
417 lflst12 = dataFromJson.getLfLsts().get("lflst12");
419 assertNotNull(lflst11);
420 assertNotNull(lflst12);
422 assertEquals(3, lflst11.getLfs().size());
423 assertTrue(lflst11.getLfs().contains(new Lf(55)));
424 assertTrue(lflst11.getLfs().contains(new Lf(56)));
425 assertTrue(lflst11.getLfs().contains(new Lf(57)));
427 assertEquals(3, lflst12.getLfs().size());
428 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str1")));
429 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str2")));
430 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str3")));
432 assertEquals(1, dataFromJson.getLsts().size());
433 Lst lst11 = dataFromJson.getLsts().get("lst11");
434 assertNotNull(lst11);
435 assertEquals(2, lst11.getLstItems().size());
437 LstItem lst11_1 = null;
438 LstItem lst11_2 = null;
439 for (LstItem lstItem : lst11.getLstItems()) {
440 Lf lf = lstItem.getLfs().get("lf111");
441 if (lf != null && lf.getValue().equals(140)) {
443 } else if (lf != null && lf.getValue().equals(141)) {
448 checkLst11_1(lst11_1);
449 checkLst11_2(lst11_2);
452 private void checkLst11_2(LstItem lst11_2) {
453 assertNotNull(lst11_2);
454 assertEquals(2, lst11_2.getLfs().size());
455 assertEquals(1, lst11_2.getConts().size());
456 assertEquals(2, lst11_2.getLsts().size());
458 assertEquals(lst11_2.getLfs().get("lf112"), new Lf("lf112", "lf112 str2"));
460 Cont lst11_2_cont = lst11_2.getConts().get("cont111");
461 assertEquals(0, lst11_2_cont.getConts().size());
462 assertEquals(1, lst11_2_cont.getLfLsts().size());
463 assertEquals(1, lst11_2_cont.getLfs().size());
464 assertEquals(1, lst11_2_cont.getLsts().size());
467 assertEquals(new Lf("lf1111", "lf1111 str2"), lst11_2_cont.getLfs().get("lf1111"));
468 assertEquals(new LfLst("lflst1111").addLf(new Lf(2049)).addLf(new Lf(1025)).addLf(new Lf(4097)), lst11_2_cont
469 .getLfLsts().get("lflst1111"));
471 assertNotNull(lst11_2_cont.getLsts().get("lst1111"));
472 checkLst1111(lst11_2_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str21"), new Lf(
473 "lf1111B", 5), new Lf("lf1111A", "lf1111A str22"), new Lf("lf1111B", 8));
475 checkLst11x(lst11_2.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 55)),
476 new LstItem().addLf(new Lf("lf1111", 56)));
477 checkLst11x(lst11_2.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str22")),
478 new LstItem().addLf(new Lf("lf1121", "lf1121 str21")));
481 private void checkLst11_1(LstItem lst11_1) {
482 assertNotNull(lst11_1);
484 assertEquals(2, lst11_1.getLfs().size());
485 assertEquals(1, lst11_1.getConts().size());
486 assertEquals(2, lst11_1.getLsts().size());
488 assertEquals(lst11_1.getLfs().get("lf112"), new Lf("lf112", "lf112 str"));
490 Cont lst11_1_cont = lst11_1.getConts().get("cont111");
491 assertEquals(0, lst11_1_cont.getConts().size());
492 assertEquals(1, lst11_1_cont.getLfLsts().size());
493 assertEquals(1, lst11_1_cont.getLfs().size());
494 assertEquals(1, lst11_1_cont.getLsts().size());
497 assertEquals(new Lf("lf1111", "lf1111 str"), lst11_1_cont.getLfs().get("lf1111"));
498 assertEquals(new LfLst("lflst1111").addLf(new Lf(2048)).addLf(new Lf(1024)).addLf(new Lf(4096)), lst11_1_cont
499 .getLfLsts().get("lflst1111"));
501 assertNotNull(lst11_1_cont.getLsts().get("lst1111"));
502 checkLst1111(lst11_1_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str11"), new Lf(
503 "lf1111B", 4), new Lf("lf1111A", "lf1111A str12"), new Lf("lf1111B", 7));
505 checkLst11x(lst11_1.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 65)));
506 checkLst11x(lst11_1.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str11")));
509 private void checkLst11x(Lst lst, LstItem... lstItems) {
512 Lst requiredLst = new Lst(lst.getName());
513 for (LstItem lstItem : lstItems) {
514 requiredLst.addLstItem(lstItem);
517 assertEquals(requiredLst, lst);
521 private void checkLst1111(Set<LstItem> lstItems, Lf lf11, Lf lf12, Lf lf21, Lf lf22) {
522 LstItem lst11_1_cont_lst1111_1 = null;
523 LstItem lst11_1_cont_lst1111_2 = null;
524 for (LstItem lstItem : lstItems) {
525 if (new LstItem().addLf(lf11).addLf(lf12).equals(lstItem)) {
526 lst11_1_cont_lst1111_1 = lstItem;
527 } else if (new LstItem().addLf(lf21).addLf(lf22).equals(lstItem)) {
528 lst11_1_cont_lst1111_2 = lstItem;
532 assertNotNull(lst11_1_cont_lst1111_1);
533 assertNotNull(lst11_1_cont_lst1111_2);
536 private CompositeNode prepareCompositeNodeWithEmpties() {
537 MutableCompositeNode cont1 = NodeFactory.createMutableCompositeNode(
538 TestUtils.buildQName("cont1", "simple:yang:types", "2013-11-5"), null, null, ModifyAction.CREATE, null);
541 MutableCompositeNode lst11_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
542 null, ModifyAction.CREATE, null);
543 cont1.getChildren().add(lst11_1);
545 MutableSimpleNode<?> lf111_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_1,
546 (short) 1, ModifyAction.CREATE, null);
547 lst11_1.getChildren().add(lf111_1);
550 MutableCompositeNode lst111_1_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
551 lst11_1, null, ModifyAction.CREATE, null);
552 lst11_1.getChildren().add(lst111_1_1);
553 MutableSimpleNode<?> lf1111_1_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111"),
554 lst111_1_1, (int) 34, ModifyAction.CREATE, null);
555 lst111_1_1.getChildren().add(lf1111_1_1);
560 MutableCompositeNode lst111_1_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
561 lst11_1, null, ModifyAction.CREATE, null);
562 lst11_1.getChildren().add(lst111_1_2);
563 MutableSimpleNode<?> lf1111_1_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111"),
564 lst111_1_2, (int) 35, ModifyAction.CREATE, null);
565 lst111_1_2.getChildren().add(lf1111_1_2);
570 MutableCompositeNode lst111_1_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
571 lst11_1, null, ModifyAction.CREATE, null);
572 lst11_1.getChildren().add(lst111_1_3);
577 MutableCompositeNode lst111_1_4 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
578 lst11_1, null, ModifyAction.CREATE, null);
579 lst11_1.getChildren().add(lst111_1_4);
583 MutableCompositeNode cont111_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
584 lst11_1, null, ModifyAction.CREATE, null);
585 lst11_1.getChildren().add(cont111_1);
591 MutableCompositeNode lst11_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
592 null, ModifyAction.CREATE, null);
593 cont1.getChildren().add(lst11_2);
595 MutableSimpleNode<?> lf111_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_2,
596 (short) 2, ModifyAction.CREATE, null);
597 lst11_2.getChildren().add(lf111_2);
600 MutableCompositeNode cont111_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
601 lst11_2, null, ModifyAction.CREATE, null);
602 lst11_2.getChildren().add(cont111_2);
604 MutableSimpleNode<?> lflst1111_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111"),
605 cont111_2, (int) 1024, ModifyAction.CREATE, null);
606 cont111_2.getChildren().add(lflst1111_2_2);
607 MutableSimpleNode<?> lflst1111_2_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111"),
608 cont111_2, (int) 4096, ModifyAction.CREATE, null);
609 cont111_2.getChildren().add(lflst1111_2_3);
612 MutableCompositeNode lst1111_2_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
613 cont111_2, null, ModifyAction.CREATE, null);
614 cont111_2.getChildren().add(lst1111_2_1);
615 MutableSimpleNode<?> lf1111B_2_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111B"),
616 lst1111_2_1, (short) 4, ModifyAction.CREATE, null);
617 lst1111_2_1.getChildren().add(lf1111B_2_1);
620 MutableCompositeNode lst1111_2_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
621 cont111_2, null, ModifyAction.CREATE, null);
622 cont111_2.getChildren().add(lst1111_2_2);
623 MutableSimpleNode<?> lf1111A_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111A"),
624 lst1111_2_2, "lf1111A str12", ModifyAction.CREATE, null);
625 lst1111_2_2.getChildren().add(lf1111A_2_2);
632 MutableCompositeNode lst112_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst112"), lst11_2,
633 null, ModifyAction.CREATE, null);
634 lst11_2.getChildren().add(lst112_2);
641 MutableCompositeNode lst11_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
642 null, ModifyAction.CREATE, null);
643 cont1.getChildren().add(lst11_3);
645 MutableSimpleNode<?> lf111_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_3,
646 (short) 3, ModifyAction.CREATE, null);
647 lst11_3.getChildren().add(lf111_3);
650 MutableCompositeNode cont111_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
651 lst11_3, null, ModifyAction.CREATE, null);
652 lst11_3.getChildren().add(cont111_3);
654 MutableCompositeNode lst1111_3_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
655 cont111_3, null, ModifyAction.CREATE, null);
656 cont111_3.getChildren().add(lst1111_3_1);
659 MutableCompositeNode lst1111_3_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
660 cont111_3, null, ModifyAction.CREATE, null);
661 cont111_3.getChildren().add(lst1111_3_2);