@Test
    public void testTypeIdentity() {
        for (Directory.Type dirType : Directory.Type.values()) {
            Assert.assertEquals("For all defined directory types, "
                    + "Directory.Type.of(theType.getObjectType()) must "
                    + "correctly map back to theType.", dirType,
                    Directory.Type.of(dirType.getObjectType()));
        }
    }
Verifies that each type declared by Directory.Type exposes an
associated class via getObjectType() which then maps back to the same
type via Directory.Type.of().
guacamole-ext/src/test/java/org/apache/guacamole/net/auth/DirectoryTest.java