boolean isEncodable(DiscreteResource resource) {
        return resource.valueAs(Object.class)
                .map(Object::getClass)
                .map(codecs::containsKey)
                .orElse(Boolean.FALSE);
    }
@Test
    public void isRootNonEncodable() {
        DiscreteResource resource = Resource.ROOT;

        assertThat(sut.isEncodable(resource), is(false));
    }