ONOS-2446: Implement API to declare resource hierarchy
Remove API to define resource boundary
(ResourceAdminService.defineResourceBoundary) to integrate with API for
resource hierarchy
Change-Id: Iffa28dec16320122fe41f4f455000596fa266acb
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 3034048..4a8886a 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
@@ -49,9 +49,11 @@
.testEquals();
}
- @Test(expected = IllegalArgumentException.class)
+ @Test
public void testCreateWithZeroComponent() {
ResourcePath path = new ResourcePath();
+
+ assertThat(path, is(ResourcePath.ROOT));
}
@Test
@@ -66,7 +68,7 @@
public void testNoParent() {
ResourcePath path = new ResourcePath(LinkKey.linkKey(CP1_1, CP2_1));
- assertThat(path.parent(), is(Optional.empty()));
+ assertThat(path.parent(), is(Optional.of(ResourcePath.ROOT)));
}
@Test