@Test
public void testFunction_adaptToQ() throws Exception {

    new OakMachine.Builder().build().adminInitAndInspect(session -> {
        final NodeTypeManager manager = session.getWorkspace().getNodeTypeManager();
        final Function<NodeTypeDefinition, QNodeTypeDefinition> fAdapter = JsonCnd.adaptToQ(session);
        final NodeType folderType = manager.getNodeType("nt:folder");
        final QNodeTypeDefinition folderQType = fAdapter.apply(folderType);
        assertEquals("name is", "folder", folderQType.getName().getLocalName());
        assertEquals("uri is", Name.NS_NT_URI, folderQType.getName().getNamespaceURI());
    });
}