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.Ignore;
25 import org.junit.Test;
26 import org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider;
27 import org.opendaylight.controller.sal.rest.impl.XmlToCompositeNodeProvider;
28 import org.opendaylight.controller.sal.restconf.impl.test.TestUtils;
29 import org.opendaylight.controller.sal.restconf.impl.test.YangAndXmlAndDataSchemaLoader;
30 import org.opendaylight.controller.sal.restconf.impl.test.structures.Cont;
31 import org.opendaylight.controller.sal.restconf.impl.test.structures.Lf;
32 import org.opendaylight.controller.sal.restconf.impl.test.structures.LfLst;
33 import org.opendaylight.controller.sal.restconf.impl.test.structures.Lst;
34 import org.opendaylight.controller.sal.restconf.impl.test.structures.LstItem;
35 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
36 import org.opendaylight.yangtools.yang.data.api.ModifyAction;
37 import org.opendaylight.yangtools.yang.data.api.MutableCompositeNode;
38 import org.opendaylight.yangtools.yang.data.api.MutableSimpleNode;
39 import org.opendaylight.yangtools.yang.data.impl.NodeFactory;
41 import com.google.gson.stream.JsonReader;
42 import com.google.gson.stream.JsonToken;
44 public class CnSnJsonBasicYangTypesTest extends YangAndXmlAndDataSchemaLoader {
47 public static void initialize() {
48 dataLoad("/cnsn-to-json/simple-yang-types", 1, "simple-yang-types", "cont1");
52 * Test of json output when as input are specified composite node with empty
57 public void compositeNodeAndYangWithJsonReaderEmptyDataTest() {
58 CompositeNode compositeNode = prepareCompositeNodeWithEmpties();
59 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
60 String jsonOutput = null;
62 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
63 StructuredDataToJsonProvider.INSTANCE);
64 } catch (WebApplicationException | IOException e) {
67 verifyJsonOutputForEmptyData(jsonOutput);
71 * Test of json output when as input are specified xml file (no empty
72 * elements)and YANG file
75 public void xmlAndYangTypesWithJsonReaderTest() {
76 CompositeNode compositeNode = TestUtils.readInputToCnSn("/cnsn-to-json/simple-yang-types/xml/data.xml",
77 XmlToCompositeNodeProvider.INSTANCE);
78 TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
79 String jsonOutput = null;
81 jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
82 StructuredDataToJsonProvider.INSTANCE);
83 } catch (WebApplicationException | IOException e) {
86 verifyJsonOutput(jsonOutput);
89 private void verifyJsonOutputForEmptyData(String jsonOutput) {
90 assertNotNull(jsonOutput);
91 StringReader strReader = new StringReader(jsonOutput);
92 JsonReader jReader = new JsonReader(strReader);
94 String exception = null;
95 Cont dataFromJson = null;
97 dataFromJson = jsonReadCont1(jReader);
98 } catch (IOException e) {
99 exception = e.getMessage();
102 assertNotNull("Data structures from json are missing.", dataFromJson);
103 checkDataFromJsonEmpty(dataFromJson);
105 assertNull("Error during reading Json output: " + exception, exception);
108 private void verifyJsonOutput(String jsonOutput) {
109 assertNotNull(jsonOutput);
110 StringReader strReader = new StringReader(jsonOutput);
111 JsonReader jReader = new JsonReader(strReader);
113 String exception = null;
114 Cont dataFromJson = null;
116 dataFromJson = jsonReadCont1(jReader);
117 } catch (IOException e) {
118 exception = e.getMessage();
121 assertNotNull("Data structures from json are missing.", dataFromJson);
122 checkDataFromJson(dataFromJson);
124 assertNull("Error during reading Json output: " + exception, exception);
127 private Cont jsonReadCont1(JsonReader jReader) throws IOException {
128 jReader.beginObject();
129 assertNotNull("cont1 is missing.", jReader.hasNext());
131 Cont dataFromJson = new Cont(jReader.nextName());
132 dataFromJson = jsonReadCont1Elements(jReader, dataFromJson);
134 assertFalse("cont shouldn't have other element.", jReader.hasNext());
140 private Cont jsonReadCont1Elements(JsonReader jReader, Cont redData) throws IOException {
141 jReader.beginObject();
142 while (jReader.hasNext()) {
143 String keyName = jReader.nextName();
144 if (keyName.equals("lf11")) {
145 redData.addLf(new Lf(keyName, nextValue(jReader)));
146 } else if (keyName.equals("lflst11")) {
147 LfLst lfLst = new LfLst(keyName);
148 lfLst = jsonReadLflstValues(jReader, lfLst);
149 redData.addLfLst(lfLst);
150 } else if (keyName.equals("lflst12")) {
151 LfLst lfLst = new LfLst(keyName);
152 jsonReadLflstValues(jReader, lfLst);
153 redData.addLfLst(lfLst);
154 } else if (keyName.equals("lst11")) {
155 Lst lst = new Lst(keyName);
156 lst = jsonReadLst11(jReader, lst);
159 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
167 private Lst jsonReadLst11(JsonReader jReader, Lst lst) throws IOException {
168 jReader.beginArray();
170 while (jReader.hasNext()) {
171 LstItem lstItem = jsonReadLst11Elements(jReader);
172 lst.addLstItem(lstItem);
178 private LstItem jsonReadLst11Elements(JsonReader jReader) throws IOException {
179 LstItem lstItem = new LstItem();
180 jReader.beginObject();
181 while (jReader.hasNext()) {
182 String keyName = jReader.nextName();
183 if (keyName.equals("lf111")) {
184 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
185 } else if (keyName.equals("lf112")) {
186 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
187 } else if (keyName.equals("cont111")) {
188 Cont cont = new Cont(keyName);
189 cont = jsonReadCont111(jReader, cont);
190 lstItem.addCont(cont);
191 } else if (keyName.equals("lst111")) {
192 Lst lst = new Lst(keyName);
193 lst = jsonReadLst111(jReader, lst);
195 } else if (keyName.equals("lst112")) {
196 Lst lst = new Lst(keyName);
197 lst = jsonReadLst112(jReader, lst);
200 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
207 private Lst jsonReadLst112(JsonReader jReader, Lst lst) throws IOException {
208 jReader.beginArray();
209 while (jReader.hasNext()) {
210 LstItem lstItem = jsonReadLst112Elements(jReader);
211 lst.addLstItem(lstItem);
217 private LstItem jsonReadLst112Elements(JsonReader jReader) throws IOException {
218 LstItem lstItem = new LstItem();
219 jReader.beginObject();
220 if (jReader.hasNext()) {
221 String keyName = jReader.nextName();
222 if (keyName.equals("lf1121")) {
223 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
231 private Lst jsonReadLst111(JsonReader jReader, Lst lst) throws IOException {
232 jReader.beginArray();
233 while (jReader.hasNext()) {
234 LstItem lstItem = jsonReadLst111Elements(jReader);
235 lst.addLstItem(lstItem);
241 private LstItem jsonReadLst111Elements(JsonReader jReader) throws IOException {
242 LstItem lstItem = new LstItem();
243 jReader.beginObject();
244 if (jReader.hasNext()) {
245 String keyName = jReader.nextName();
246 if (keyName.equals("lf1111")) {
247 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
254 private Object nextValue(JsonReader jReader) throws IOException {
255 if (jReader.peek().equals(JsonToken.NULL)) {
258 } else if (jReader.peek().equals(JsonToken.NUMBER)) {
259 return jReader.nextInt();
261 return jReader.nextString();
265 private Cont jsonReadCont111(JsonReader jReader, Cont cont) throws IOException {
266 jReader.beginObject();
267 cont = jsonReadCont111Elements(jReader, cont);
272 private Cont jsonReadCont111Elements(JsonReader jReader, Cont cont) throws IOException {
273 while (jReader.hasNext()) {
274 String keyName = jReader.nextName();
275 if (keyName.equals("lf1111")) {
276 cont.addLf(new Lf(keyName, nextValue(jReader)));
277 } else if (keyName.equals("lflst1111")) {
278 LfLst lfLst = new LfLst(keyName);
279 lfLst = jsonReadLflstValues(jReader, lfLst);
280 cont.addLfLst(lfLst);
281 } else if (keyName.equals("lst1111")) {
282 Lst lst = new Lst(keyName);
283 lst = jsonReadLst1111(jReader, lst);
286 assertTrue("Key " + keyName + " doesn't exists in yang file.", false);
293 private Lst jsonReadLst1111(JsonReader jReader, Lst lst) throws IOException {
294 jReader.beginArray();
295 while (jReader.hasNext()) {
296 LstItem lstItem = jsonReadLst1111Elements(jReader);
297 lst.addLstItem(lstItem);
303 private LstItem jsonReadLst1111Elements(JsonReader jReader) throws IOException {
304 jReader.beginObject();
305 LstItem lstItem = new LstItem();
306 while (jReader.hasNext()) {
307 String keyName = jReader.nextName();
308 if (keyName.equals("lf1111A") || keyName.equals("lf1111B")) {
309 lstItem.addLf(new Lf(keyName, nextValue(jReader)));
316 private LfLst jsonReadLflstValues(JsonReader jReader, LfLst lfLst) throws IOException {
317 jReader.beginArray();
318 while (jReader.hasNext()) {
319 lfLst.addLf(new Lf(nextValue(jReader)));
325 private void checkDataFromJsonEmpty(Cont dataFromJson) {
326 assertTrue(dataFromJson.getLfs().isEmpty());
327 assertTrue(dataFromJson.getLfLsts().isEmpty());
328 assertTrue(dataFromJson.getConts().isEmpty());
330 Map<String, Lst> lsts = dataFromJson.getLsts();
331 assertEquals(1, lsts.size());
332 Lst lst11 = lsts.get("lst11");
333 assertNotNull(lst11);
334 Set<LstItem> lstItems = lst11.getLstItems();
335 assertNotNull(lstItems);
337 LstItem lst11_1 = null;
338 LstItem lst11_2 = null;
339 LstItem lst11_3 = null;
340 for (LstItem lstItem : lstItems) {
341 if (lstItem.getLfs().get("lf111").getValue().equals(1)) {
343 } else if (lstItem.getLfs().get("lf111").getValue().equals(2)) {
345 } else if (lstItem.getLfs().get("lf111").getValue().equals(3)) {
350 assertNotNull(lst11_1);
351 assertNotNull(lst11_2);
352 assertNotNull(lst11_3);
355 assertTrue(lst11_1.getLfLsts().isEmpty());
356 assertEquals(1, lst11_1.getLfs().size());
357 assertEquals(1, lst11_1.getConts().size());
358 assertEquals(1, lst11_1.getLsts().size());
360 lst11_1.getLsts().get("lst111"),
361 new Lst("lst111").addLstItem(new LstItem().addLf("lf1111", (int) 35))
362 .addLstItem(new LstItem().addLf("lf1111", (int) 34)).addLstItem(new LstItem())
363 .addLstItem(new LstItem()));
364 assertEquals(lst11_1.getConts().get("cont111"), new Cont("cont111"));
368 assertTrue(lst11_2.getLfLsts().isEmpty());
369 assertEquals(1, lst11_2.getLfs().size());
370 assertEquals(1, lst11_2.getConts().size());
371 assertEquals(1, lst11_2.getLsts().size());
373 Cont lst11_2_cont111 = lst11_2.getConts().get("cont111");
376 assertNotNull(lst11_2_cont111);
377 assertTrue(lst11_2_cont111.getLfs().isEmpty());
378 assertEquals(1, lst11_2_cont111.getLfLsts().size());
379 assertEquals(1, lst11_2_cont111.getLsts().size());
380 assertTrue(lst11_2_cont111.getConts().isEmpty());
382 assertEquals(new LfLst("lflst1111").addLf((int) 1024).addLf((int) 4096),
383 lst11_2_cont111.getLfLsts().get("lflst1111"));
385 new Lst("lst1111").addLstItem(new LstItem().addLf("lf1111B", (int) 4)).addLstItem(
386 new LstItem().addLf("lf1111A", "lf1111A str12")), lst11_2_cont111.getLsts().get("lst1111"));
388 assertEquals(lst11_2.getLsts().get("lst112"), new Lst("lst112").addLstItem(new LstItem()));
392 assertEquals(1, lst11_3.getLfs().size());
393 assertTrue(lst11_3.getLfLsts().isEmpty());
394 assertTrue(lst11_3.getLsts().isEmpty());
395 assertTrue(lst11_3.getLsts().isEmpty());
398 Cont lst11_3_cont111 = lst11_3.getConts().get("cont111");
399 assertEquals(0, lst11_3_cont111.getLfs().size());
400 assertEquals(0, lst11_3_cont111.getLfLsts().size());
401 assertEquals(1, lst11_3_cont111.getLsts().size());
402 assertTrue(lst11_3_cont111.getConts().isEmpty());
404 assertEquals(new Lst("lst1111").addLstItem(new LstItem()).addLstItem(new LstItem()), lst11_3_cont111.getLsts()
411 private void checkDataFromJson(Cont dataFromJson) {
412 assertNotNull(dataFromJson.getLfs().get("lf11"));
413 assertEquals(dataFromJson.getLfs().get("lf11"), new Lf("lf11", "lf"));
415 LfLst lflst11 = null;
416 LfLst lflst12 = null;
418 lflst11 = dataFromJson.getLfLsts().get("lflst11");
419 lflst12 = dataFromJson.getLfLsts().get("lflst12");
421 assertNotNull(lflst11);
422 assertNotNull(lflst12);
424 assertEquals(3, lflst11.getLfs().size());
425 assertTrue(lflst11.getLfs().contains(new Lf(55)));
426 assertTrue(lflst11.getLfs().contains(new Lf(56)));
427 assertTrue(lflst11.getLfs().contains(new Lf(57)));
429 assertEquals(3, lflst12.getLfs().size());
430 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str1")));
431 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str2")));
432 assertTrue(lflst12.getLfs().contains(new Lf("lflst12 str3")));
434 assertEquals(1, dataFromJson.getLsts().size());
435 Lst lst11 = dataFromJson.getLsts().get("lst11");
436 assertNotNull(lst11);
437 assertEquals(2, lst11.getLstItems().size());
439 LstItem lst11_1 = null;
440 LstItem lst11_2 = null;
441 for (LstItem lstItem : lst11.getLstItems()) {
442 Lf lf = lstItem.getLfs().get("lf111");
443 if (lf != null && lf.getValue().equals(140)) {
445 } else if (lf != null && lf.getValue().equals(141)) {
450 checkLst11_1(lst11_1);
451 checkLst11_2(lst11_2);
454 private void checkLst11_2(LstItem lst11_2) {
455 assertNotNull(lst11_2);
456 assertEquals(2, lst11_2.getLfs().size());
457 assertEquals(1, lst11_2.getConts().size());
458 assertEquals(2, lst11_2.getLsts().size());
460 assertEquals(lst11_2.getLfs().get("lf112"), new Lf("lf112", "lf112 str2"));
462 Cont lst11_2_cont = lst11_2.getConts().get("cont111");
463 assertEquals(0, lst11_2_cont.getConts().size());
464 assertEquals(1, lst11_2_cont.getLfLsts().size());
465 assertEquals(1, lst11_2_cont.getLfs().size());
466 assertEquals(1, lst11_2_cont.getLsts().size());
469 assertEquals(new Lf("lf1111", "lf1111 str2"), lst11_2_cont.getLfs().get("lf1111"));
470 assertEquals(new LfLst("lflst1111").addLf(new Lf(2049)).addLf(new Lf(1025)).addLf(new Lf(4097)), lst11_2_cont
471 .getLfLsts().get("lflst1111"));
473 assertNotNull(lst11_2_cont.getLsts().get("lst1111"));
474 checkLst1111(lst11_2_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str21"), new Lf(
475 "lf1111B", 5), new Lf("lf1111A", "lf1111A str22"), new Lf("lf1111B", 8));
477 checkLst11x(lst11_2.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 55)),
478 new LstItem().addLf(new Lf("lf1111", 56)));
479 checkLst11x(lst11_2.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str22")),
480 new LstItem().addLf(new Lf("lf1121", "lf1121 str21")));
483 private void checkLst11_1(LstItem lst11_1) {
484 assertNotNull(lst11_1);
486 assertEquals(2, lst11_1.getLfs().size());
487 assertEquals(1, lst11_1.getConts().size());
488 assertEquals(2, lst11_1.getLsts().size());
490 assertEquals(lst11_1.getLfs().get("lf112"), new Lf("lf112", "lf112 str"));
492 Cont lst11_1_cont = lst11_1.getConts().get("cont111");
493 assertEquals(0, lst11_1_cont.getConts().size());
494 assertEquals(1, lst11_1_cont.getLfLsts().size());
495 assertEquals(1, lst11_1_cont.getLfs().size());
496 assertEquals(1, lst11_1_cont.getLsts().size());
499 assertEquals(new Lf("lf1111", "lf1111 str"), lst11_1_cont.getLfs().get("lf1111"));
500 assertEquals(new LfLst("lflst1111").addLf(new Lf(2048)).addLf(new Lf(1024)).addLf(new Lf(4096)), lst11_1_cont
501 .getLfLsts().get("lflst1111"));
503 assertNotNull(lst11_1_cont.getLsts().get("lst1111"));
504 checkLst1111(lst11_1_cont.getLsts().get("lst1111").getLstItems(), new Lf("lf1111A", "lf1111A str11"), new Lf(
505 "lf1111B", 4), new Lf("lf1111A", "lf1111A str12"), new Lf("lf1111B", 7));
507 checkLst11x(lst11_1.getLsts().get("lst111"), new LstItem().addLf(new Lf("lf1111", 65)));
508 checkLst11x(lst11_1.getLsts().get("lst112"), new LstItem().addLf(new Lf("lf1121", "lf1121 str11")));
511 private void checkLst11x(Lst lst, LstItem... lstItems) {
514 Lst requiredLst = new Lst(lst.getName());
515 for (LstItem lstItem : lstItems) {
516 requiredLst.addLstItem(lstItem);
519 assertEquals(requiredLst, lst);
523 private void checkLst1111(Set<LstItem> lstItems, Lf lf11, Lf lf12, Lf lf21, Lf lf22) {
524 LstItem lst11_1_cont_lst1111_1 = null;
525 LstItem lst11_1_cont_lst1111_2 = null;
526 for (LstItem lstItem : lstItems) {
527 if (new LstItem().addLf(lf11).addLf(lf12).equals(lstItem)) {
528 lst11_1_cont_lst1111_1 = lstItem;
529 } else if (new LstItem().addLf(lf21).addLf(lf22).equals(lstItem)) {
530 lst11_1_cont_lst1111_2 = lstItem;
534 assertNotNull(lst11_1_cont_lst1111_1);
535 assertNotNull(lst11_1_cont_lst1111_2);
538 private CompositeNode prepareCompositeNodeWithEmpties() {
539 MutableCompositeNode cont1 = NodeFactory.createMutableCompositeNode(
540 TestUtils.buildQName("cont1", "simple:yang:types", "2013-11-5"), null, null, ModifyAction.CREATE, null);
543 MutableCompositeNode lst11_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
544 null, ModifyAction.CREATE, null);
545 cont1.getChildren().add(lst11_1);
547 MutableSimpleNode<?> lf111_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_1,
548 (short) 1, ModifyAction.CREATE, null);
549 lst11_1.getChildren().add(lf111_1);
552 MutableCompositeNode lst111_1_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
553 lst11_1, null, ModifyAction.CREATE, null);
554 lst11_1.getChildren().add(lst111_1_1);
555 MutableSimpleNode<?> lf1111_1_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111"),
556 lst111_1_1, (int) 34, ModifyAction.CREATE, null);
557 lst111_1_1.getChildren().add(lf1111_1_1);
562 MutableCompositeNode lst111_1_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
563 lst11_1, null, ModifyAction.CREATE, null);
564 lst11_1.getChildren().add(lst111_1_2);
565 MutableSimpleNode<?> lf1111_1_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111"),
566 lst111_1_2, (int) 35, ModifyAction.CREATE, null);
567 lst111_1_2.getChildren().add(lf1111_1_2);
572 MutableCompositeNode lst111_1_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
573 lst11_1, null, ModifyAction.CREATE, null);
574 lst11_1.getChildren().add(lst111_1_3);
579 MutableCompositeNode lst111_1_4 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst111"),
580 lst11_1, null, ModifyAction.CREATE, null);
581 lst11_1.getChildren().add(lst111_1_4);
585 MutableCompositeNode cont111_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
586 lst11_1, null, ModifyAction.CREATE, null);
587 lst11_1.getChildren().add(cont111_1);
593 MutableCompositeNode lst11_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
594 null, ModifyAction.CREATE, null);
595 cont1.getChildren().add(lst11_2);
597 MutableSimpleNode<?> lf111_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_2,
598 (short) 2, ModifyAction.CREATE, null);
599 lst11_2.getChildren().add(lf111_2);
602 MutableCompositeNode cont111_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
603 lst11_2, null, ModifyAction.CREATE, null);
604 lst11_2.getChildren().add(cont111_2);
606 MutableSimpleNode<?> lflst1111_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111"),
607 cont111_2, (int) 1024, ModifyAction.CREATE, null);
608 cont111_2.getChildren().add(lflst1111_2_2);
609 MutableSimpleNode<?> lflst1111_2_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lflst1111"),
610 cont111_2, (int) 4096, ModifyAction.CREATE, null);
611 cont111_2.getChildren().add(lflst1111_2_3);
614 MutableCompositeNode lst1111_2_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
615 cont111_2, null, ModifyAction.CREATE, null);
616 cont111_2.getChildren().add(lst1111_2_1);
617 MutableSimpleNode<?> lf1111B_2_1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111B"),
618 lst1111_2_1, (short) 4, ModifyAction.CREATE, null);
619 lst1111_2_1.getChildren().add(lf1111B_2_1);
622 MutableCompositeNode lst1111_2_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
623 cont111_2, null, ModifyAction.CREATE, null);
624 cont111_2.getChildren().add(lst1111_2_2);
625 MutableSimpleNode<?> lf1111A_2_2 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1111A"),
626 lst1111_2_2, "lf1111A str12", ModifyAction.CREATE, null);
627 lst1111_2_2.getChildren().add(lf1111A_2_2);
634 MutableCompositeNode lst112_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst112"), lst11_2,
635 null, ModifyAction.CREATE, null);
636 lst11_2.getChildren().add(lst112_2);
643 MutableCompositeNode lst11_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst11"), cont1,
644 null, ModifyAction.CREATE, null);
645 cont1.getChildren().add(lst11_3);
647 MutableSimpleNode<?> lf111_3 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf111"), lst11_3,
648 (short) 3, ModifyAction.CREATE, null);
649 lst11_3.getChildren().add(lf111_3);
652 MutableCompositeNode cont111_3 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont111"),
653 lst11_3, null, ModifyAction.CREATE, null);
654 lst11_3.getChildren().add(cont111_3);
656 MutableCompositeNode lst1111_3_1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
657 cont111_3, null, ModifyAction.CREATE, null);
658 cont111_3.getChildren().add(lst1111_3_1);
661 MutableCompositeNode lst1111_3_2 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("lst1111"),
662 cont111_3, null, ModifyAction.CREATE, null);
663 cont111_3.getChildren().add(lst1111_3_2);