771312c05c50b46b7f921a377fd4f98fcd051b48
[mdsal.git] / dom / mdsal-dom-broker / src / test / java / org / opendaylight / mdsal / dom / broker / ShardedDOMDataTreeTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.mdsal.dom.broker;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertNotNull;
12 import static org.junit.Assert.assertTrue;
13 import static org.junit.Assert.fail;
14 import static org.mockito.ArgumentMatchers.any;
15 import static org.mockito.ArgumentMatchers.anyCollection;
16 import static org.mockito.ArgumentMatchers.anyMap;
17 import static org.mockito.Mockito.doNothing;
18 import static org.mockito.Mockito.mock;
19 import static org.mockito.Mockito.timeout;
20 import static org.mockito.Mockito.times;
21 import static org.mockito.Mockito.verify;
22 import static org.mockito.Mockito.verifyNoMoreInteractions;
23
24 import com.google.common.util.concurrent.ListenableFuture;
25 import java.util.ArrayList;
26 import java.util.Collection;
27 import java.util.Collections;
28 import java.util.List;
29 import java.util.Map;
30 import java.util.concurrent.ExecutorService;
31 import java.util.concurrent.Executors;
32 import org.junit.Before;
33 import org.junit.Test;
34 import org.mockito.ArgumentCaptor;
35 import org.mockito.Captor;
36 import org.mockito.MockitoAnnotations;
37 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
38 import org.opendaylight.mdsal.dom.api.DOMDataTreeCursorAwareTransaction;
39 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
40 import org.opendaylight.mdsal.dom.api.DOMDataTreeListener;
41 import org.opendaylight.mdsal.dom.api.DOMDataTreeProducer;
42 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteCursor;
43 import org.opendaylight.mdsal.dom.broker.util.TestModel;
44 import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataTreeShard;
45 import org.opendaylight.yangtools.concepts.ListenerRegistration;
46 import org.opendaylight.yangtools.yang.common.QName;
47 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
48 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
49 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
50 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
51 import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
52 import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
53 import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
54 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
55 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
56 import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
57 import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder;
58 import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafNodeBuilder;
59 import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableMapNodeBuilder;
60
61 public class ShardedDOMDataTreeTest extends AbstractDatastoreTest {
62
63     private static final DOMDataTreeIdentifier ROOT_ID =
64             new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION, YangInstanceIdentifier.empty());
65     private static final DOMDataTreeIdentifier TEST_ID =
66             new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION, TestModel.TEST_PATH);
67
68     private static final DOMDataTreeIdentifier INNER_CONTAINER_ID =
69             new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION, TestModel.INNER_CONTAINER_PATH);
70
71     private static final YangInstanceIdentifier OUTER_LIST_YID = TestModel.OUTER_LIST_PATH.node(
72             NodeIdentifierWithPredicates.of(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 1));
73     private static final DOMDataTreeIdentifier OUTER_LIST_ID =
74             new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION, OUTER_LIST_YID);
75
76     private InMemoryDOMDataTreeShard rootShard;
77
78     private ShardedDOMDataTree dataTreeService;
79     private ListenerRegistration<InMemoryDOMDataTreeShard> rootShardReg;
80
81     private final ExecutorService executor = Executors.newSingleThreadExecutor();
82
83     @Captor
84     private ArgumentCaptor<Collection<DataTreeCandidate>> captorForChanges;
85     @Captor
86     private ArgumentCaptor<Map<DOMDataTreeIdentifier, NormalizedNode<?, ?>>> captorForSubtrees;
87
88     private final ContainerNode crossShardContainer = createCrossShardContainer();
89
90     @Before
91     public void setUp() throws Exception {
92         MockitoAnnotations.initMocks(this);
93
94         rootShard = InMemoryDOMDataTreeShard.create(ROOT_ID, executor, 1);
95         rootShard.onModelContextUpdated(SCHEMA_CONTEXT);
96
97         final ShardedDOMDataTree dataTree = new ShardedDOMDataTree();
98         final DOMDataTreeProducer shardRegProducer = dataTree.createProducer(Collections.singletonList(ROOT_ID));
99         rootShardReg = dataTree.registerDataTreeShard(ROOT_ID, rootShard, shardRegProducer);
100         shardRegProducer.close();
101
102         dataTreeService = dataTree;
103     }
104
105     @Test(expected = IllegalArgumentException.class)
106     public void testProducerPathContention() throws Exception {
107         dataTreeService.createProducer(Collections.singletonList(ROOT_ID));
108         dataTreeService.createProducer(Collections.singletonList(TEST_ID));
109     }
110
111     @Test(expected = IllegalArgumentException.class)
112     public void testProducerPathContentionReverse() throws Exception {
113         dataTreeService.createProducer(Collections.singletonList(TEST_ID));
114         dataTreeService.createProducer(Collections.singletonList(ROOT_ID));
115     }
116
117     @Test
118     public void testShardRegistrationClose() throws Exception {
119         rootShardReg.close();
120
121         final InMemoryDOMDataTreeShard newRootShard = InMemoryDOMDataTreeShard.create(ROOT_ID, executor, 1);
122         newRootShard.onModelContextUpdated(SCHEMA_CONTEXT);
123         final DOMDataTreeProducer shardRegProducer = dataTreeService.createProducer(Collections.singletonList(ROOT_ID));
124
125         final ListenerRegistration<InMemoryDOMDataTreeShard> newRootShardReg =
126                 dataTreeService.registerDataTreeShard(ROOT_ID, newRootShard, shardRegProducer);
127         shardRegProducer.close();
128
129         final InMemoryDOMDataTreeShard innerShard = InMemoryDOMDataTreeShard.create(INNER_CONTAINER_ID, executor, 1);
130         innerShard.onModelContextUpdated(SCHEMA_CONTEXT);
131         final DOMDataTreeProducer shardRegProducer2 =
132                 dataTreeService.createProducer(Collections.singletonList(INNER_CONTAINER_ID));
133         ListenerRegistration<InMemoryDOMDataTreeShard> innerShardReg =
134                 dataTreeService.registerDataTreeShard(INNER_CONTAINER_ID, innerShard, shardRegProducer2);
135
136         innerShardReg.close();
137         // try to register the shard again
138         innerShardReg = dataTreeService.registerDataTreeShard(INNER_CONTAINER_ID, innerShard, shardRegProducer2);
139         final DOMDataTreeCursorAwareTransaction tx = shardRegProducer2.createTransaction(false);
140         final DOMDataTreeWriteCursor cursor = tx.createCursor(INNER_CONTAINER_ID);
141         assertNotNull(cursor);
142
143         cursor.close();
144         tx.cancel();
145         shardRegProducer2.close();
146
147         innerShardReg.close();
148         newRootShardReg.close();
149     }
150
151     @Test(expected = IllegalStateException.class)
152     public void testEmptyShardMapProducer() throws Exception {
153         final ShardedDOMDataTree dataTree = new ShardedDOMDataTree();
154         final DOMDataTreeProducer producer = dataTree.createProducer(Collections.singletonList(ROOT_ID));
155         producer.createTransaction(false);
156     }
157
158     @Test
159     public void testSingleShardWrite() throws Exception {
160         final DOMDataTreeListener mockedDataTreeListener = mock(DOMDataTreeListener.class);
161         doNothing().when(mockedDataTreeListener).onDataTreeChanged(anyCollection(), anyMap());
162
163         dataTreeService.registerListener(mockedDataTreeListener, Collections.singletonList(INNER_CONTAINER_ID),
164                 true, Collections.emptyList());
165
166         final DOMDataTreeProducer producer = dataTreeService.createProducer(Collections.singletonList(ROOT_ID));
167         DOMDataTreeCursorAwareTransaction tx = producer.createTransaction(false);
168         DOMDataTreeWriteCursor cursor = tx.createCursor(ROOT_ID);
169         assertNotNull(cursor);
170
171         cursor.write(TEST_ID.getRootIdentifier().getLastPathArgument(), crossShardContainer);
172
173         try {
174             tx.commit().get();
175             fail("There's still an open cursor");
176         } catch (final IllegalStateException e) {
177             assertTrue(e.getMessage().contains("cursor open"));
178         }
179
180         cursor.close();
181         tx.commit().get();
182
183         tx = producer.createTransaction(false);
184         cursor = tx.createCursor(TEST_ID);
185         assertNotNull(cursor);
186
187         cursor.delete(TestModel.INNER_CONTAINER_PATH.getLastPathArgument());
188         cursor.close();
189         tx.commit().get();
190
191         verify(mockedDataTreeListener, timeout(1000).times(3)).onDataTreeChanged(captorForChanges.capture(),
192                 captorForSubtrees.capture());
193         final List<Collection<DataTreeCandidate>> capturedValue = captorForChanges.getAllValues();
194         assertTrue(capturedValue.size() == 3);
195
196         final ContainerNode capturedChange =
197                 (ContainerNode) capturedValue.get(1).iterator().next().getRootNode().getDataAfter().get();
198         final ContainerNode innerContainerVerify = (ContainerNode) crossShardContainer.getChild(
199                 TestModel.INNER_CONTAINER_PATH.getLastPathArgument()).get();
200         assertEquals(innerContainerVerify, capturedChange);
201
202         verifyNoMoreInteractions(mockedDataTreeListener);
203     }
204
205     @Test
206     // TODO extract common logic from testSingleSubshardWrite and
207     // testSingleShardWrite tests
208     public void testSingleSubshardWrite() throws Exception {
209         final DOMDataTreeListener mockedDataTreeListener = mock(DOMDataTreeListener.class);
210         doNothing().when(mockedDataTreeListener).onDataTreeChanged(anyCollection(), anyMap());
211
212         InMemoryDOMDataTreeShard testShard = InMemoryDOMDataTreeShard.create(TEST_ID, executor, 1);
213         testShard.onModelContextUpdated(SCHEMA_CONTEXT);
214
215         final DOMDataTreeProducer regProducer = dataTreeService.createProducer(Collections.singleton(TEST_ID));
216         dataTreeService.registerDataTreeShard(TEST_ID, testShard, regProducer);
217         regProducer.close();
218
219         dataTreeService.registerListener(mockedDataTreeListener, Collections.singletonList(TEST_ID),
220                 true, Collections.emptyList());
221
222         final DOMDataTreeProducer producer = dataTreeService.createProducer(Collections.singletonList(ROOT_ID));
223         DOMDataTreeCursorAwareTransaction tx = producer.createTransaction(false);
224         DOMDataTreeWriteCursor cursor = tx.createCursor(ROOT_ID);
225         assertNotNull(cursor);
226
227         cursor.write(TEST_ID.getRootIdentifier().getLastPathArgument(), crossShardContainer);
228
229         cursor.close();
230         tx.commit().get();
231
232         tx = producer.createTransaction(false);
233         cursor = tx.createCursor(TEST_ID);
234         assertNotNull(cursor);
235
236         cursor.delete(TestModel.INNER_CONTAINER_PATH.getLastPathArgument());
237         cursor.close();
238         tx.commit().get();
239
240         verify(mockedDataTreeListener, timeout(5000).times(3)).onDataTreeChanged(captorForChanges.capture(),
241                 captorForSubtrees.capture());
242
243         final List<Collection<DataTreeCandidate>> capturedValue = captorForChanges.getAllValues();
244         final ContainerNode capturedChange =
245                 (ContainerNode) capturedValue.get(1).iterator().next().getRootNode().getDataAfter().get();
246         final ContainerNode innerContainerVerify = crossShardContainer;
247         assertEquals(innerContainerVerify, capturedChange);
248     }
249
250     @Test
251     public void testMultipleWritesIntoSingleMapEntry() throws Exception {
252
253         final YangInstanceIdentifier oid1 = TestModel.OUTER_LIST_PATH.node(NodeIdentifierWithPredicates.of(
254                 TestModel.OUTER_LIST_QNAME, QName.create(TestModel.OUTER_LIST_QNAME, "id"), 0));
255         final DOMDataTreeIdentifier outerListPath = new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION, oid1);
256
257         final DOMDataTreeProducer shardProducer = dataTreeService.createProducer(
258                 Collections.singletonList(outerListPath));
259         final InMemoryDOMDataTreeShard outerListShard = InMemoryDOMDataTreeShard.create(outerListPath, executor, 1000);
260         outerListShard.onModelContextUpdated(SCHEMA_CONTEXT);
261
262         final ListenerRegistration<InMemoryDOMDataTreeShard> oid1ShardRegistration =
263                 dataTreeService.registerDataTreeShard(outerListPath, outerListShard, shardProducer);
264
265         final DOMDataTreeCursorAwareTransaction tx = shardProducer.createTransaction(false);
266         final DOMDataTreeWriteCursor cursor =
267                 tx.createCursor(new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION, oid1));
268         assertNotNull(cursor);
269
270         MapNode innerList = ImmutableMapNodeBuilder
271                 .create()
272                 .withNodeIdentifier(new NodeIdentifier(TestModel.INNER_LIST_QNAME))
273                 .build();
274
275         cursor.write(new NodeIdentifier(TestModel.INNER_LIST_QNAME), innerList);
276         cursor.close();
277         tx.commit().get();
278
279         final ArrayList<ListenableFuture<?>> futures = new ArrayList<>();
280         for (int i = 0; i < 1000; i++) {
281             final Collection<MapEntryNode> innerListMapEntries = createInnerListMapEntries(1000, "run-" + i);
282             for (final MapEntryNode innerListMapEntry : innerListMapEntries) {
283                 final DOMDataTreeCursorAwareTransaction tx1 = shardProducer.createTransaction(false);
284                 final DOMDataTreeWriteCursor cursor1 = tx1.createCursor(
285                         new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION,
286                                 oid1.node(new NodeIdentifier(TestModel.INNER_LIST_QNAME))));
287                 cursor1.write(innerListMapEntry.getIdentifier(), innerListMapEntry);
288                 cursor1.close();
289                 futures.add(tx1.commit());
290             }
291         }
292
293         futures.get(futures.size() - 1).get();
294
295     }
296
297     private static Collection<MapEntryNode> createInnerListMapEntries(final int amount, final String valuePrefix) {
298         final Collection<MapEntryNode> ret = new ArrayList<>();
299         for (int i = 0; i < amount; i++) {
300             ret.add(ImmutableNodes.mapEntryBuilder()
301                     .withNodeIdentifier(NodeIdentifierWithPredicates.of(TestModel.INNER_LIST_QNAME,
302                             QName.create(TestModel.OUTER_LIST_QNAME, "name"), Integer.toString(i)))
303                     .withChild(ImmutableNodes
304                             .leafNode(QName.create(TestModel.INNER_LIST_QNAME, "name"), Integer.toString(i)))
305                     .withChild(ImmutableNodes
306                             .leafNode(QName.create(TestModel.INNER_LIST_QNAME, "value"), valuePrefix + "-" + i))
307                     .build());
308         }
309
310         return ret;
311     }
312
313     @Test
314     public void testMultipleProducerCursorCreation() throws Exception {
315
316         final DOMDataTreeProducer rootProducer = dataTreeService.createProducer(Collections.singletonList(ROOT_ID));
317         DOMDataTreeCursorAwareTransaction rootTx = rootProducer.createTransaction(false);
318         //check if we can create cursor where the new producer will be
319         DOMDataTreeWriteCursor rootTxCursor = rootTx.createCursor(INNER_CONTAINER_ID);
320         assertNotNull(rootTxCursor);
321         rootTxCursor.close();
322
323         try {
324             rootProducer.createProducer(Collections.singletonList(INNER_CONTAINER_ID));
325             fail("Should've failed there is still a tx open");
326         } catch (final IllegalStateException e) {
327             assertTrue(e.getMessage().contains("open"));
328         }
329
330         assertTrue(rootTx.cancel());
331
332         final DOMDataTreeProducer innerContainerProducer = rootProducer.createProducer(
333                 Collections.singletonList(INNER_CONTAINER_ID));
334
335         rootTx = rootProducer.createTransaction(false);
336         try {
337             rootTx.createCursor(INNER_CONTAINER_ID);
338             fail("Subtree should not be available to this producer");
339         } catch (final IllegalArgumentException e) {
340             assertTrue(e.getMessage().contains("delegated to child producer"));
341         }
342
343         rootTxCursor = rootTx.createCursor(TEST_ID);
344         assertNotNull(rootTxCursor);
345         try {
346             rootTxCursor.enter(INNER_CONTAINER_ID.getRootIdentifier().getLastPathArgument());
347             fail("Cursor should not have this subtree available");
348         } catch (final IllegalArgumentException e) {
349             assertTrue(e.getMessage().contains("not available to this cursor"));
350         }
351
352         try {
353             rootTxCursor.write(TestModel.INNER_CONTAINER_PATH.getLastPathArgument(),
354                     ImmutableContainerNodeBuilder.create()
355                             .withNodeIdentifier(new NodeIdentifier(TestModel.INNER_CONTAINER))
356                             .build());
357             fail("Cursor should not have this subtree available");
358         } catch (final IllegalArgumentException e) {
359             assertTrue(e.getMessage().contains("not available to this cursor"));
360         }
361
362         final DOMDataTreeCursorAwareTransaction innerShardTx = innerContainerProducer.createTransaction(false);
363         final DOMDataTreeWriteCursor innerShardCursor = innerShardTx.createCursor(INNER_CONTAINER_ID);
364         assertNotNull(innerShardCursor);
365     }
366
367     private static ContainerNode createCrossShardContainer() {
368         final LeafNode<String> shardedValue1 =
369                 ImmutableLeafNodeBuilder.<String>create().withNodeIdentifier(new NodeIdentifier(
370                         TestModel.SHARDED_VALUE_1)).withValue("sharded value 1").build();
371         final LeafNode<String> shardedValue2 =
372                 ImmutableLeafNodeBuilder.<String>create().withNodeIdentifier(new NodeIdentifier(
373                         TestModel.SHARDED_VALUE_2)).withValue("sharded value 2").build();
374
375
376         final ContainerNode lowerShardContainer = ImmutableContainerNodeBuilder.create()
377                 .withNodeIdentifier(new NodeIdentifier(TestModel.ANOTHER_SHARD_CONTAINER))
378                 .withChild(ImmutableLeafNodeBuilder.create()
379                         .withNodeIdentifier(new NodeIdentifier(TestModel.ANOTHER_SHARD_VALUE))
380                         .withValue("testing-value")
381                         .build())
382                 .build();
383
384         final ContainerNode containerNode =
385                 ImmutableContainerNodeBuilder.create()
386                         .withNodeIdentifier(new NodeIdentifier(TestModel.INNER_CONTAINER))
387                         .withChild(shardedValue1)
388                         .withChild(shardedValue2)
389                         .withChild(lowerShardContainer)
390                         .build();
391
392         final ContainerNode testContainer = ImmutableContainerNodeBuilder.create()
393                 .withNodeIdentifier(new NodeIdentifier(TestModel.TEST_QNAME))
394                 .withChild(containerNode)
395                 .build();
396
397         return testContainer;
398     }
399
400     //test multiple vertical levels between the shards
401     @Test
402     public void testLargerSubshardSpace() throws Exception {
403
404         final InMemoryDOMDataTreeShard outerListShard = InMemoryDOMDataTreeShard.create(OUTER_LIST_ID, executor, 1, 1);
405         outerListShard.onModelContextUpdated(SCHEMA_CONTEXT);
406
407         try (DOMDataTreeProducer producer =
408                      dataTreeService.createProducer(Collections.singletonList(OUTER_LIST_ID))) {
409             dataTreeService.registerDataTreeShard(OUTER_LIST_ID, outerListShard, producer);
410         }
411
412         final DOMDataTreeProducer producer = dataTreeService.createProducer(Collections.singletonList(ROOT_ID));
413         final DOMDataTreeCursorAwareTransaction tx = producer.createTransaction(false);
414         final DOMDataTreeWriteCursor cursor = tx.createCursor(ROOT_ID);
415
416         assertNotNull(cursor);
417         cursor.write(TestModel.TEST_PATH.getLastPathArgument(), createCrossShardContainer2());
418         cursor.close();
419
420         tx.commit().get();
421
422         final DOMDataTreeListener listener = mock(DOMDataTreeListener.class);
423         doNothing().when(listener).onDataTreeChanged(any(), any());
424         dataTreeService.registerListener(listener,
425                 Collections.singletonList(
426                         new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION, YangInstanceIdentifier.empty())),
427                 false, Collections.emptyList());
428
429         verify(listener, times(2)).onDataTreeChanged(any(), any());
430
431
432     }
433
434     private static ContainerNode createCrossShardContainer2() {
435
436         final MapEntryNode
437                 innerListEntry1 = ImmutableNodes
438                 .mapEntryBuilder(TestModel.INNER_LIST_QNAME, TestModel.NAME_QNAME, "name-1")
439                 .withChild(ImmutableNodes.leafNode(TestModel.NAME_QNAME, "name-1"))
440                 .withChild(ImmutableNodes.leafNode(TestModel.VALUE_QNAME, "value-1"))
441                 .build();
442         final MapEntryNode innerListEntry2 = ImmutableNodes
443                 .mapEntryBuilder(TestModel.INNER_LIST_QNAME, TestModel.NAME_QNAME, "name-2")
444                 .withChild(ImmutableNodes.leafNode(TestModel.NAME_QNAME, "name-2"))
445                 .withChild(ImmutableNodes.leafNode(TestModel.VALUE_QNAME, "value-2"))
446                 .build();
447
448         final MapNode innerList1 = ImmutableNodes
449                 .mapNodeBuilder(TestModel.INNER_LIST_QNAME).withChild(innerListEntry1).build();
450         final MapNode innerList2 = ImmutableNodes
451                 .mapNodeBuilder(TestModel.INNER_LIST_QNAME).withChild(innerListEntry2).build();
452
453         final MapEntryNode outerListEntry1 = ImmutableNodes
454                 .mapEntryBuilder(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 1)
455                 .withChild(innerList1)
456                 .build();
457         final MapEntryNode outerListEntry2 = ImmutableNodes
458                 .mapEntryBuilder(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 2)
459                 .withChild(innerList2)
460                 .build();
461
462         final MapNode outerList = ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
463                 .withChild(outerListEntry1)
464                 .withChild(outerListEntry2)
465                 .build();
466
467         final ContainerNode testContainer = ImmutableContainerNodeBuilder.create()
468                 .withNodeIdentifier(new NodeIdentifier(TestModel.TEST_QNAME))
469                 .withChild(outerList)
470                 .build();
471
472         return testContainer;
473     }
474 }