@Override
    public Optional<DiscreteResource> parent() {
        return id.parent().map(x -> Resources.discrete(x).resource());
    }
@Test
    public void testNoParent() {
        DiscreteResource resource = Resources.discrete(D1).resource();

        assertThat(resource.parent(), is(Optional.of(Resource.ROOT)));
    }