/*
+ * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
*/
+
package org.opendaylight.controller.cluster.datastore.node.utils.stream;
import java.io.ByteArrayInputStream;
QName toaster = QName.create("http://netconfcentral.org/ns/toaster","2009-11-20","toaster");
QName darknessFactor = QName.create("http://netconfcentral.org/ns/toaster","2009-11-20","darknessFactor");
+ QName description = QName.create("http://netconfcentral.org/ns/toaster","2009-11-20","description");
ContainerNode toasterNode = Builders.containerBuilder().
withNodeIdentifier(new NodeIdentifier(toaster)).
- withChild(ImmutableNodes.leafNode(darknessFactor, "1000")).build();
+ withChild(ImmutableNodes.leafNode(darknessFactor, "1000")).
+ withChild(ImmutableNodes.leafNode(description, largeString(20)))
+ .build();
ContainerNode toasterContainer = Builders.containerBuilder().
withNodeIdentifier(new NodeIdentifier(SchemaContext.NAME)).
writer.close();
}
- private NormalizedNode<?, ?> createTestContainer() {
+ private static NormalizedNode<?, ?> createTestContainer() {
byte[] bytes1 = {1,2,3};
LeafSetEntryNode<Object> entry1 = ImmutableLeafSetEntryNodeBuilder.create().withNodeIdentifier(
new YangInstanceIdentifier.NodeWithValue(TestModel.BINARY_LEAF_LIST_QNAME, bytes1)).
Assert.assertEquals(input, clone.getInput());
}
+
+ private String largeString(int pow){
+ String s = "X";
+ for(int i=0;i<pow;i++){
+ StringBuilder b = new StringBuilder();
+ b.append(s).append(s);
+ s = b.toString();
+ }
+ return s;
+ }
}