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%2FPathUtilsTest.java;h=75e8e2aa4a45c2106b5ccb70baa5a0220b667e74;hp=ffa8a1059eb49d77195f29954c9ead671abd2d68;hb=b17a51ecb983331f0e521e40f9dd2474f268de13;hpb=f4bad4be4f0838122b9799d133878877088e870d diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/PathUtilsTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/PathUtilsTest.java index ffa8a1059e..75e8e2aa4a 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/PathUtilsTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/PathUtilsTest.java @@ -1,28 +1,17 @@ package org.opendaylight.controller.cluster.datastore.node.utils; +import com.google.common.collect.ImmutableSet; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.util.TestModel; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; - import java.util.HashMap; -import java.util.HashSet; import java.util.Map; import java.util.Set; - import static junit.framework.TestCase.assertEquals; public class PathUtilsTest { - @Test - public void getParentPath(){ - assertEquals("", PathUtils.getParentPath("foobar")); - assertEquals("", PathUtils.getParentPath("/a")); - assertEquals("/a", PathUtils.getParentPath("/a/b")); - assertEquals("/a/b", PathUtils.getParentPath("/a/b/c")); - assertEquals("/a/b", PathUtils.getParentPath("a/b/c")); - } - @Test public void toStringNodeIdentifier(){ YangInstanceIdentifier.PathArgument pathArgument = nodeIdentifier(); @@ -101,8 +90,7 @@ public class PathUtilsTest { } private YangInstanceIdentifier.AugmentationIdentifier augmentationIdentifier(){ - Set childNames = new HashSet(); - childNames.add(QNameFactory.create("(urn:opendaylight:flow:table:statistics?revision=2013-12-15)flow-table-statistics")); + Set childNames = ImmutableSet.of(QNameFactory.create("(urn:opendaylight:flow:table:statistics?revision=2013-12-15)flow-table-statistics")); return new YangInstanceIdentifier.AugmentationIdentifier(childNames); }