@Test
    public void testTypeCoverage() {

        Collection<Class<? extends Identifiable>> types = getDirectoryTypes();

        Assert.assertEquals("Directory.Type must provide exactly one value "
                + "for each type of directory provideed by the UserContext "
                + "interface.", types.size(), Directory.Type.values().length);

        for (Class<? extends Identifiable> type : types) {

            Directory.Type dirType = Directory.Type.of(type);
            Assert.assertNotNull("of() must provide mappings for all directory "
                    + "types defined on the UserContext interface.", dirType);

            Assert.assertEquals("getObjectType() must return the same base "
                    + "superclass used by UserContext for all directory "
                    + "types defined on the UserContext interface.", type,
                    dirType.getObjectType());

        }

    }
Verifies that Directory.Type covers the types of all directories exposed
by the UserContext interface.
guacamole-ext/src/test/java/org/apache/guacamole/net/auth/DirectoryTest.java