NodeTypeManager ntMgr = superuser.getWorkspace().getNodeTypeManager();
NodeTypeIterator it = ntMgr.getPrimaryNodeTypes();
NodeType testNt = ntMgr.getNodeType(testNodeType);
while (it.hasNext()) {
NodeType nt = it.nextNodeType();
if (!testNt.isNodeType(nt.getName())) {
// perform test
Query q = qomFactory.createQuery(qomFactory.selector(nt.getName(), "s"),
qomFactory.descendantNode("s", testRoot), null, null);
checkResult(q.execute(), new Node[]{});