@Test
public void testParseQName() {

    final QName ntPrefixName = QName.parseQName(JsonCnd.BUILTIN_MAPPINGS, QName.Type.NODETYPE, "nt:aType");
    assertEquals("type is ", QName.Type.NODETYPE, ntPrefixName.getType());
    assertEquals("prefix is ", "nt", ntPrefixName.getPrefix());
    assertEquals("localName is ", "aType", ntPrefixName.getLocalName());
    assertEquals("uri is ", NamespaceRegistry.NAMESPACE_NT, ntPrefixName.getUri());
    assertEquals("toString is ",
            "nt:aType", ntPrefixName.toString());
    assertEquals("expanded is ",
            "{" + NamespaceRegistry.NAMESPACE_NT + "}aType", ntPrefixName.toExpandedForm());
    final QName ntUriName = QName.parseQName(JsonCnd.BUILTIN_MAPPINGS, QName.Type.NODETYPE,
            "{http://foo.com}anotherType");
    assertEquals("type is ", QName.Type.NODETYPE, ntUriName.getType());
    assertNull("prefix is null", ntUriName.getPrefix());
    assertEquals("localName is ", "anotherType", ntUriName.getLocalName());
    assertEquals("uri is ", "http://foo.com", ntUriName.getUri());
    assertEquals("toString is ",
            "{http://foo.com}anotherType", ntUriName.toString());
    assertEquals("expanded is ",
            "{http://foo.com}anotherType", ntUriName.toExpandedForm());
}