@Test
public void testRegister() throws Exception {

    final DefaultErrorListener errorListener = new DefaultErrorListener();
    final CNDURLInstaller installer = new CNDURLInstaller(errorListener,
            Arrays.asList(cndFUrl, cndEUrl, cndDUrl, cndCUrl, cndBUrl, cndAUrl),
            Arrays.asList(cndYUrl, cndZUrl));
    new OakMachine.Builder().build().adminInitAndInspect(session -> {
        installer.register(session);
        NodeTypeManager ntManager = session.getWorkspace().getNodeTypeManager();
        assertTrue("has a:primaryType", ntManager.hasNodeType("a:primaryType"));
        assertTrue("has b:primaryType", ntManager.hasNodeType("b:primaryType"));
        assertTrue("has c:primaryType", ntManager.hasNodeType("c:primaryType"));
        assertTrue("has d:primaryType", ntManager.hasNodeType("d:primaryType"));
        assertTrue("has e:primaryType", ntManager.hasNodeType("e:primaryType"));
        assertFalse("does not have f:primaryType", ntManager.hasNodeType("f:primaryType"));
        assertFalse("does not have y:primaryType", ntManager.hasNodeType("y:primaryType"));
        assertTrue("has z:primaryType", ntManager.hasNodeType("z:primaryType"));
    });
    assertEquals("f and y should report errors: " + errorListener.getReportedViolations(), 2,
            errorListener.getReportedViolations().size());
}