Fix the issue of ONOS-3423

Change-Id: I60c3105149f6ef46e2effb7de6d8f40152027ec7
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 8e44536..35dcf1e 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
@@ -26,6 +26,7 @@
 
 import java.util.Optional;
 
+import static org.hamcrest.Matchers.contains;
 import static org.hamcrest.Matchers.is;
 import static org.junit.Assert.assertThat;
 
@@ -63,6 +64,13 @@
     }
 
     @Test
+    public void testComponents() {
+        ResourcePath port = ResourcePath.discrete(D1, P1);
+
+        assertThat(port.components(), contains(D1, P1));
+    }
+
+    @Test
     public void testThereIsParent() {
         ResourcePath path = ResourcePath.discrete(LinkKey.linkKey(CP1_1, CP2_1), VLAN1);
         ResourcePath parent = ResourcePath.discrete(LinkKey.linkKey(CP1_1, CP2_1));