X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fnode%2Futils%2Fstream%2FNormalizedNodeStreamReaderWriterTest.java;h=6dbb0f8e64e7ec143fa54d993c1c802353601702;hp=67a342b440666e3febfd6e5b390953fa3d54bebf;hb=5c3e3812eca4e7a06c69c376037578fae49828a2;hpb=6b9ec89c77e614b44dbd01de77a45ee8d9e6d0ec diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeStreamReaderWriterTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeStreamReaderWriterTest.java index 67a342b440..6dbb0f8e64 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeStreamReaderWriterTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeStreamReaderWriterTest.java @@ -1,12 +1,11 @@ /* + * 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; @@ -44,9 +43,12 @@ public class NormalizedNodeStreamReaderWriterTest { 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)). @@ -65,7 +67,7 @@ public class NormalizedNodeStreamReaderWriterTest { writer.close(); } - private NormalizedNode createTestContainer() { + private static NormalizedNode createTestContainer() { byte[] bytes1 = {1,2,3}; LeafSetEntryNode entry1 = ImmutableLeafSetEntryNodeBuilder.create().withNodeIdentifier( new YangInstanceIdentifier.NodeWithValue(TestModel.BINARY_LEAF_LIST_QNAME, bytes1)). @@ -173,4 +175,14 @@ public class NormalizedNodeStreamReaderWriterTest { Assert.assertEquals(input, clone.getInput()); } + + private String largeString(int pow){ + String s = "X"; + for(int i=0;i