Fix bug that a list is mistakenly added as an element of another list

Change-Id: I1e4847b572e55bbf85f99ed8ef8df96da1f7bd7f
diff --git a/core/api/src/test/java/org/onosproject/net/newresource/ResourcePathTest.java b/core/api/src/test/java/org/onosproject/net/newresource/ResourcePathTest.java
index 83d9b44..ea7ff5e 100644
--- a/core/api/src/test/java/org/onosproject/net/newresource/ResourcePathTest.java
+++ b/core/api/src/test/java/org/onosproject/net/newresource/ResourcePathTest.java
@@ -75,6 +75,14 @@
     }
 
     @Test
+    public void testChild() {
+        ResourcePath r1 = ResourcePath.discrete(D1).child(P1);
+        ResourcePath sameAsR2 = ResourcePath.discrete(D1, P1);
+
+        assertThat(r1, is(sameAsR2));
+    }
+
+    @Test
     public void testThereIsParent() {
         ResourcePath path = ResourcePath.discrete(D1, P1, VLAN1);
         ResourcePath parent = ResourcePath.discrete(D1, P1);