ResourceCollectionId implements ResourcePath { public ResourceId getResourceId(String resourceName) { return new ResourceId(this, resourceName); } ResourceCollectionId(ResourceType resourceType);  ResourceCollectionId(
      @Nullable ResourceId parent,
      ResourceType resourceType); @Nullable ResourceId getParent(); @Override ResourceType getResourceType(); @Override @JsonValue String getResourceUri(); ResourceId getResourceId(String resourceName); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override String toString();  }
@Test(expected = IllegalArgumentException.class) @SuppressWarnings("unused") public void constructor_withUnexpectedParent_throwsError() { new ResourceCollectionId(ResourceType.PROJECT.getResourceId("foo"), ResourceType.PROJECT); }
@Test(expected = IllegalArgumentException.class) @SuppressWarnings("unused") public void constructor_withIncorrectParent_returnsOk() { ResourceId projectId = ResourceType.PROJECT.getResourceId("foo"); ResourceId networkId = projectId .getChildCollection(ResourceType.NETWORK) .getResourceId("bar"); new ResourceCollectionId(networkId, ResourceType.FIREWALL); }