1 package org.opendaylight.controller.sal.restconf.impl.cnsn.to.json.test;
3 import static org.junit.Assert.*;
5 import java.io.IOException;
6 import java.io.StringReader;
10 import javax.ws.rs.WebApplicationException;
12 import org.junit.BeforeClass;
13 import org.junit.Test;
14 import org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider;
15 import org.opendaylight.controller.sal.restconf.impl.test.TestUtils;
16 import org.opendaylight.controller.sal.restconf.impl.test.YangAndXmlAndDataSchemaLoader;
17 import org.opendaylight.controller.sal.restconf.impl.test.structures.*;
18 import org.opendaylight.yangtools.yang.data.api.*;
19 import org.opendaylight.yangtools.yang.data.impl.NodeFactory;
21 import com.google.gson.stream.JsonReader;
22 import com.google.gson.stream.JsonToken;
24 public class CnSnJsonBasicYangTypesTest extends YangAndXmlAndDataSchemaLoader {
27 public static void initialize() {
28 dataLoad("/cnsn-to-json/simple-yang-types", 1, "simple-yang-types", "cont1");
32 * Test of json output when as input are specified composite node with empty
36 public void compositeNodeAndYangWithJsonReaderEmptyDataTest() {
37 CompositeNode compositeNode = prepareCompositeNodeWithEmpties();
38 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
39 String jsonOutput = null;
41 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
42 StructuredDataToJsonProvider.INSTANCE);
43 } catch (WebApplicationException | IOException e) {
46 verifyJsonOutputForEmptyData(jsonOutput);
50 * Test of json output when as input are specified xml file (no empty
51 * elements)and YANG file
54 public void xmlAndYangTypesWithJsonReaderTest() {
55 CompositeNode compositeNode = TestUtils.loadCompositeNode("/cnsn-to-json/simple-yang-types/xml/data.xml");
56 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
57 String jsonOutput = null;
59 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
60 StructuredDataToJsonProvider.INSTANCE);
61 } catch (WebApplicationException | IOException e) {
64 verifyJsonOutput(jsonOutput);
67 private void verifyJsonOutputForEmptyData(String jsonOutput) {
68 assertNotNull(jsonOutput);
69 StringReader strReader = new StringReader(jsonOutput);
70 JsonReader jReader = new JsonReader(strReader);
72 String exception = null;
73 Cont dataFromJson = null;
75 dataFromJson = jsonReadCont1(jReader);
76 } catch (IOException e) {
77 exception = e.getMessage();
80 assertNotNull("Data structures from json are missing.", dataFromJson);
81 checkDataFromJsonEmpty(dataFromJson);
83 assertNull("Error during reading Json output: " + exception, exception);
86 private void verifyJsonOutput(String jsonOutput) {
87 assertNotNull(jsonOutput);
88 StringReader strReader = new StringReader(jsonOutput);
89 JsonReader jReader = new JsonReader(strReader);
91 String exception = null;
92 Cont dataFromJson = null;
94 dataFromJson = jsonReadCont1(jReader);
95 } catch (IOException e) {
96 exception = e.getMessage();
99 assertNotNull("Data structures from json are missing.", dataFromJson);
100 checkDataFromJson(dataFromJson);
102 assertNull("Error during reading Json output: " + exception, exception);
105 private Cont jsonReadCont1(JsonReader jReader) throws IOException {
106 jReader.beginObject();
107 assertNotNull("cont1 is missing.", jReader.hasNext());
109 Cont dataFromJson = new Cont(jReader.nextName());
110 dataFromJson = jsonReadCont1Elements(jReader, dataFromJson);
112 assertFalse("cont shouldn't have other element.", jReader.hasNext());
118 private Cont jsonReadCont1Elements(JsonReader jReader, Cont redData) throws IOException {
119 jReader.beginObject();
120 while (jReader.hasNext()) {
121 String keyName = jReader.nextName();
122 if (keyName.equals("lf11")) {
123 redData.addLf(new Lf(keyName, nextValue(jReader)));
124 } else if (keyName.equals("lflst11")) {
125 LfLst lfLst = new LfLst(keyName);
126 lfLst = jsonReadLflstValues(jReader, lfLst);
127 redData.addLfLst(lfLst);
128 } else if (keyName.equals("lflst12")) {
129 LfLst lfLst = new LfLst(keyName);
130 jsonReadLflstValues(jReader, lfLst);
131 redData.addLfLst(lfLst);
132 } else if (keyName.equals("lst11")) {
133 Lst lst = new Lst(keyName);
134 lst = jsonReadLst11(jReader, lst);
137 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
145 private Lst jsonReadLst11(JsonReader jReader, Lst lst) throws IOException {
146 jReader.beginArray();
148 while (jReader.hasNext()) {
149 LstItem lstItem = jsonReadLst11Elements(jReader);
150 lst.addLstItem(lstItem);
156 private LstItem jsonReadLst11Elements(JsonReader jReader) throws IOException {
157 LstItem lstItem = new LstItem();
158 jReader.beginObject();
159 while (jReader.hasNext()) {
160 String keyName = jReader.nextName();
161 if (keyName.equals("lf111")) {
162 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
163 } else if (keyName.equals("lf112")) {
164 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
165 } else if (keyName.equals("cont111")) {
166 Cont cont = new Cont(keyName);
167 cont = jsonReadCont111(jReader, cont);
168 lstItem.addCont(cont);
169 } else if (keyName.equals("lst111")) {
170 Lst lst = new Lst(keyName);
171 lst = jsonReadLst111(jReader, lst);
173 } else if (keyName.equals("lst112")) {
174 Lst lst = new Lst(keyName);
175 lst = jsonReadLst112(jReader, lst);
178 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
185 private Lst jsonReadLst112(JsonReader jReader, Lst lst) throws IOException {
186 jReader.beginArray();
187 while (jReader.hasNext()) {
188 LstItem lstItem = jsonReadLst112Elements(jReader);
189 lst.addLstItem(lstItem);
195 private LstItem jsonReadLst112Elements(JsonReader jReader) throws IOException {
196 LstItem lstItem = new LstItem();
197 jReader.beginObject();
198 if (jReader.hasNext()) {
199 String keyName = jReader.nextName();
200 if (keyName.equals("lf1121")) {
201 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
209 private Lst jsonReadLst111(JsonReader jReader, Lst lst) throws IOException {
210 jReader.beginArray();
211 while (jReader.hasNext()) {
212 LstItem lstItem = jsonReadLst111Elements(jReader);
213 lst.addLstItem(lstItem);
219 private LstItem jsonReadLst111Elements(JsonReader jReader) throws IOException {
220 LstItem lstItem = new LstItem();
221 jReader.beginObject();
222 if (jReader.hasNext()) {
223 String keyName = jReader.nextName();
224 if (keyName.equals("lf1111")) {
225 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
232 private Object nextValue(JsonReader jReader) throws IOException {
233 if (jReader.peek().equals(JsonToken.NULL)) {
236 } else if (jReader.peek().equals(JsonToken.NUMBER)) {
237 return jReader.nextInt();
239 return jReader.nextString();
243 private Cont jsonReadCont111(JsonReader jReader, Cont cont) throws IOException {
244 jReader.beginObject();
245 cont = jsonReadCont111Elements(jReader, cont);
250 private Cont jsonReadCont111Elements(JsonReader jReader, Cont cont) throws IOException {
251 while (jReader.hasNext()) {
252 String keyName = jReader.nextName();
253 if (keyName.equals("lf1111")) {
254 cont.addLf(new Lf(keyName, nextValue(jReader)));
255 } else if (keyName.equals("lflst1111")) {
256 LfLst lfLst = new LfLst(keyName);
257 lfLst = jsonReadLflstValues(jReader, lfLst);
258 cont.addLfLst(lfLst);
259 } else if (keyName.equals("lst1111")) {
260 Lst lst = new Lst(keyName);
261 lst = jsonReadLst1111(jReader, lst);
264 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
271 private Lst jsonReadLst1111(JsonReader jReader, Lst lst) throws IOException {
272 jReader.beginArray();
273 while (jReader.hasNext()) {
274 LstItem lstItem = jsonReadLst1111Elements(jReader);
275 lst.addLstItem(lstItem);
281 private LstItem jsonReadLst1111Elements(JsonReader jReader) throws IOException {
282 jReader.beginObject();
283 LstItem lstItem = new LstItem();
284 while (jReader.hasNext()) {
285 String keyName = jReader.nextName();
286 if (keyName.equals("lf1111A") || keyName.equals("lf1111B")) {
287 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
294 private LfLst jsonReadLflstValues(JsonReader jReader, LfLst lfLst) throws IOException {
295 jReader.beginArray();
296 while (jReader.hasNext()) {
297 lfLst.addLf(new Lf(nextValue(jReader)));
303 private void checkDataFromJsonEmpty(Cont dataFromJson) {
304 assertTrue(dataFromJson.getLfs().isEmpty());
305 assertTrue(dataFromJson.getLfLsts().isEmpty());
306 assertTrue(dataFromJson.getConts().isEmpty());
308 Map<String, Lst> lsts = dataFromJson.getLsts();
309 assertEquals(1, lsts.size());
310 Lst lst11 = lsts.get("lst11");
311 assertNotNull(lst11);
312 Set<LstItem> lstItems = lst11.getLstItems();
313 assertNotNull(lstItems);
315 LstItem lst11_1 = null;
316 LstItem lst11_2 = null;
317 LstItem lst11_3 = null;
318 for (LstItem lstItem : lstItems) {
319 if (lstItem.getLfs().get("lf111").getValue().equals(1)) {
321 } else if (lstItem.getLfs().get("lf111").getValue().equals(2)) {
323 } else if (lstItem.getLfs().get("lf111").getValue().equals(3)) {
328 assertNotNull(lst11_1);
329 assertNotNull(lst11_2);
330 assertNotNull(lst11_3);
333 assertTrue(lst11_1.getLfLsts().isEmpty());
334 assertEquals(1, lst11_1.getLfs().size());
335 assertEquals(1, lst11_1.getConts().size());
336 assertEquals(1, lst11_1.getLsts().size());
338 lst11_1.getLsts().get("lst111"),
339 new Lst("lst111").addLstItem(new LstItem().addLf("lf1111", (int) 35))
340 .addLstItem(new LstItem().addLf("lf1111", (int) 34)).addLstItem(new LstItem())
341 .addLstItem(new LstItem()));
342 assertEquals(lst11_1.getConts().get("cont111"), new Cont("cont111"));
346 assertTrue(lst11_2.getLfLsts().isEmpty());
347 assertEquals(1, lst11_2.getLfs().size());
348 assertEquals(1, lst11_2.getConts().size());
349 assertEquals(1, lst11_2.getLsts().size());
351 Cont lst11_2_cont111 = lst11_2.getConts().get("cont111");
354 assertNotNull(lst11_2_cont111);
355 assertTrue(lst11_2_cont111.getLfs().isEmpty());
356 assertEquals(1, lst11_2_cont111.getLfLsts().size());
357 assertEquals(1, lst11_2_cont111.getLsts().size());
358 assertTrue(lst11_2_cont111.getConts().isEmpty());
360 assertEquals(new LfLst("lflst1111").addLf((int) 1024).addLf((int) 4096),
361 lst11_2_cont111.getLfLsts().get("lflst1111"));
363 new Lst("lst1111").addLstItem(new LstItem().addLf("lf1111B", (int) 4)).addLstItem(
364 new LstItem().addLf("lf1111A", "lf1111A str12")), lst11_2_cont111.getLsts().get("lst1111"));
366 assertEquals(lst11_2.getLsts().get("lst112"), new Lst("lst112").addLstItem(new LstItem()));
370 assertEquals(1, lst11_3.getLfs().size());
371 assertTrue(lst11_3.getLfLsts().isEmpty());
372 assertTrue(lst11_3.getLsts().isEmpty());
373 assertTrue(lst11_3.getLsts().isEmpty());
376 Cont lst11_3_cont111 = lst11_3.getConts().get("cont111");
377 assertEquals(0, lst11_3_cont111.getLfs().size());
378 assertEquals(0, lst11_3_cont111.getLfLsts().size());
379 assertEquals(1, lst11_3_cont111.getLsts().size());
380 assertTrue(lst11_3_cont111.getConts().isEmpty());
382 assertEquals(new Lst("lst1111").addLstItem(new LstItem()).addLstItem(new LstItem()), lst11_3_cont111.getLsts()
389 private void checkDataFromJson(Cont dataFromJson) {
390 assertNotNull(dataFromJson.getLfs().get("lf11"));
391 assertEquals(dataFromJson.getLfs().get("lf11"), new Lf("lf11", "lf"));
393 LfLst lflst11 = null;
394 LfLst lflst12 = null;
396 lflst11 = dataFromJson.getLfLsts().get("lflst11");
397 lflst12 = dataFromJson.getLfLsts().get("lflst12");
399 assertNotNull(lflst11);
400 assertNotNull(lflst12);
402 assertEquals(3, lflst11.getLfs().size());
403 assertTrue(lflst11.getLfs().contains(new Lf(55)));
404 assertTrue(lflst11.getLfs().contains(new Lf(56)));
405 assertTrue(lflst11.getLfs().contains(new Lf(57)));
407 assertEquals(3, lflst12.getLfs().size());
408 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str1")));
409 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str2")));
410 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str3")));
412 assertEquals(1, dataFromJson.getLsts().size());
413 Lst lst11 = dataFromJson.getLsts().get("lst11");
414 assertNotNull(lst11);
415 assertEquals(2, lst11.getLstItems().size());
417 LstItem lst11_1 = null;
418 LstItem lst11_2 = null;
419 for (LstItem lstItem : lst11.getLstItems()) {
420 Lf lf = lstItem.getLfs().get("lf111");
421 if (lf != null && lf.getValue().equals(140)) {
423 } else if (lf != null && lf.getValue().equals(141)) {
428 checkLst11_1(lst11_1);
429 checkLst11_2(lst11_2);
432 private void checkLst11_2(LstItem lst11_2) {
433 assertNotNull(lst11_2);
434 assertEquals(2, lst11_2.getLfs().size());
435 assertEquals(1, lst11_2.getConts().size());
436 assertEquals(2, lst11_2.getLsts().size());
438 assertEquals(lst11_2.getLfs().get("lf112"), new Lf("lf112", "lf112 str2"));
440 Cont lst11_2_cont = lst11_2.getConts().get("cont111");
441 assertEquals(0, lst11_2_cont.getConts().size());
442 assertEquals(1, lst11_2_cont.getLfLsts().size());
443 assertEquals(1, lst11_2_cont.getLfs().size());
444 assertEquals(1, lst11_2_cont.getLsts().size());
447 assertEquals(new Lf("lf1111", "lf1111 str2"), lst11_2_cont.getLfs().get("lf1111"));
448 assertEquals(new LfLst("lflst1111").addLf(new Lf(2049)).addLf(new Lf(1025)).addLf(new Lf(4097)), lst11_2_cont
449 .getLfLsts().get("lflst1111"));
451 assertNotNull(lst11_2_cont.getLsts().get("lst1111"));
452 checkLst1111(lst11_2_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str21"), new Lf(
453 "lf1111B", 5), new Lf("lf1111A", "lf1111A str22"), new Lf("lf1111B", 8));
455 checkLst11x(lst11_2.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 55)),
456 new LstItem().addLf(new Lf("lf1111", 56)));
457 checkLst11x(lst11_2.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str22")),
458 new LstItem().addLf(new Lf("lf1121", "lf1121 str21")));
461 private void checkLst11_1(LstItem lst11_1) {
462 assertNotNull(lst11_1);
464 assertEquals(2, lst11_1.getLfs().size());
465 assertEquals(1, lst11_1.getConts().size());
466 assertEquals(2, lst11_1.getLsts().size());
468 assertEquals(lst11_1.getLfs().get("lf112"), new Lf("lf112", "lf112 str"));
470 Cont lst11_1_cont = lst11_1.getConts().get("cont111");
471 assertEquals(0, lst11_1_cont.getConts().size());
472 assertEquals(1, lst11_1_cont.getLfLsts().size());
473 assertEquals(1, lst11_1_cont.getLfs().size());
474 assertEquals(1, lst11_1_cont.getLsts().size());
477 assertEquals(new Lf("lf1111", "lf1111 str"), lst11_1_cont.getLfs().get("lf1111"));
478 assertEquals(new LfLst("lflst1111").addLf(new Lf(2048)).addLf(new Lf(1024)).addLf(new Lf(4096)), lst11_1_cont
479 .getLfLsts().get("lflst1111"));
481 assertNotNull(lst11_1_cont.getLsts().get("lst1111"));
482 checkLst1111(lst11_1_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str11"), new Lf(
483 "lf1111B", 4), new Lf("lf1111A", "lf1111A str12"), new Lf("lf1111B", 7));
485 checkLst11x(lst11_1.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 65)));
486 checkLst11x(lst11_1.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str11")));
489 private void checkLst11x(Lst lst, LstItem... lstItems) {
492 Lst requiredLst = new Lst(lst.getName());
493 for (LstItem lstItem : lstItems) {
494 requiredLst.addLstItem(lstItem);
497 assertEquals(requiredLst, lst);
501 private void checkLst1111(Set<LstItem> lstItems, Lf lf11, Lf lf12, Lf lf21, Lf lf22) {
502 LstItem lst11_1_cont_lst1111_1 = null;
503 LstItem lst11_1_cont_lst1111_2 = null;
504 for (LstItem lstItem : lstItems) {
505 if (new LstItem().addLf(lf11).addLf(lf12).equals(lstItem)) {
506 lst11_1_cont_lst1111_1 = lstItem;
507 } else if (new LstItem().addLf(lf21).addLf(lf22).equals(lstItem)) {
508 lst11_1_cont_lst1111_2 = lstItem;
512 assertNotNull(lst11_1_cont_lst1111_1);
513 assertNotNull(lst11_1_cont_lst1111_2);
516 private CompositeNode prepareCompositeNodeWithEmpties() {
517 MutableCompositeNode cont1 = NodeFactory.createMutableCompositeNode(
518 TestUtils.buildQName("cont1", "simple:yang:types", "2013-11-5"), null, null, ModifyAction.CREATE, null);
521 MutableCompositeNode lst11_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
522 null, ModifyAction.CREATE, null);
523 cont1.getChildren().add(lst11_1);
525 MutableSimpleNode<?> lf111_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_1,
526 (short) 1, ModifyAction.CREATE, null);
527 lst11_1.getChildren().add(lf111_1);
530 MutableCompositeNode lst111_1_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
531 lst11_1, null, ModifyAction.CREATE, null);
532 lst11_1.getChildren().add(lst111_1_1);
533 MutableSimpleNode<?> lf1111_1_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111"),
534 lst111_1_1, (int) 34, ModifyAction.CREATE, null);
535 lst111_1_1.getChildren().add(lf1111_1_1);
540 MutableCompositeNode lst111_1_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
541 lst11_1, null, ModifyAction.CREATE, null);
542 lst11_1.getChildren().add(lst111_1_2);
543 MutableSimpleNode<?> lf1111_1_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111"),
544 lst111_1_2, (int) 35, ModifyAction.CREATE, null);
545 lst111_1_2.getChildren().add(lf1111_1_2);
550 MutableCompositeNode lst111_1_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
551 lst11_1, null, ModifyAction.CREATE, null);
552 lst11_1.getChildren().add(lst111_1_3);
557 MutableCompositeNode lst111_1_4 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
558 lst11_1, null, ModifyAction.CREATE, null);
559 lst11_1.getChildren().add(lst111_1_4);
563 MutableCompositeNode cont111_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
564 lst11_1, null, ModifyAction.CREATE, null);
565 lst11_1.getChildren().add(cont111_1);
571 MutableCompositeNode lst11_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
572 null, ModifyAction.CREATE, null);
573 cont1.getChildren().add(lst11_2);
575 MutableSimpleNode<?> lf111_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_2,
576 (short) 2, ModifyAction.CREATE, null);
577 lst11_2.getChildren().add(lf111_2);
580 MutableCompositeNode cont111_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
581 lst11_2, null, ModifyAction.CREATE, null);
582 lst11_2.getChildren().add(cont111_2);
584 MutableSimpleNode<?> lflst1111_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111"),
585 cont111_2, (int) 1024, ModifyAction.CREATE, null);
586 cont111_2.getChildren().add(lflst1111_2_2);
587 MutableSimpleNode<?> lflst1111_2_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111"),
588 cont111_2, (int) 4096, ModifyAction.CREATE, null);
589 cont111_2.getChildren().add(lflst1111_2_3);
592 MutableCompositeNode lst1111_2_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
593 cont111_2, null, ModifyAction.CREATE, null);
594 cont111_2.getChildren().add(lst1111_2_1);
595 MutableSimpleNode<?> lf1111B_2_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111B"),
596 lst1111_2_1, (short) 4, ModifyAction.CREATE, null);
597 lst1111_2_1.getChildren().add(lf1111B_2_1);
600 MutableCompositeNode lst1111_2_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
601 cont111_2, null, ModifyAction.CREATE, null);
602 cont111_2.getChildren().add(lst1111_2_2);
603 MutableSimpleNode<?> lf1111A_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111A"),
604 lst1111_2_2, "lf1111A str12", ModifyAction.CREATE, null);
605 lst1111_2_2.getChildren().add(lf1111A_2_2);
612 MutableCompositeNode lst112_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst112"), lst11_2,
613 null, ModifyAction.CREATE, null);
614 lst11_2.getChildren().add(lst112_2);
621 MutableCompositeNode lst11_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
622 null, ModifyAction.CREATE, null);
623 cont1.getChildren().add(lst11_3);
625 MutableSimpleNode<?> lf111_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_3,
626 (short) 3, ModifyAction.CREATE, null);
627 lst11_3.getChildren().add(lf111_3);
630 MutableCompositeNode cont111_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
631 lst11_3, null, ModifyAction.CREATE, null);
632 lst11_3.getChildren().add(cont111_3);
634 MutableCompositeNode lst1111_3_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
635 cont111_3, null, ModifyAction.CREATE, null);
636 cont111_3.getChildren().add(lst1111_3_1);
639 MutableCompositeNode lst1111_3_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
640 cont111_3, null, ModifyAction.CREATE, null);
641 cont111_3.getChildren().add(lst1111_3_2);