NamespaceNode extends AbstractForwardingNode implements NameNode, ImmutableXmlNode { public NamespaceNode(final NodeDelegate nodeDel, final NameNodeDelegate nameDel, final QNm qNm) { assert nodeDel != null; assert nameDel != null; assert qNm != null; mNodeDel = nodeDel; mNameDel = nameDel; mQNm = qNm; } NamespaceNode(final NodeDelegate nodeDel, final NameNodeDelegate nameDel, final QNm qNm);  NamespaceNode(final BigInteger hashCode, final NodeDelegate nodeDel, final NameNodeDelegate nameDel,
      final QNm qNm); @Override NodeKind getKind(); @Override BigInteger computeHash(); @Override void setHash(final BigInteger hash); @Override BigInteger getHash(); @Override int getPrefixKey(); @Override int getLocalNameKey(); @Override int getURIKey(); @Override void setPrefixKey(final int prefixKey); @Override void setLocalNameKey(final int localNameKey); @Override void setURIKey(final int uriKey); @Override VisitResult acceptVisitor(final XmlNodeVisitor visitor); @Override int hashCode(); @Override boolean equals(final @Nullable Object obj); @Override String toString(); @Override void setPathNodeKey(final @Nonnegative long pathNodeKey); @Override long getPathNodeKey(); NameNodeDelegate getNameNodeDelegate(); @Override QNm getName(); @Override SirixDeweyID getDeweyID(); @Override int getTypeKey();  }
@Test public void testNamespaceNode() throws IOException { final NodeDelegate nodeDel = new NodeDelegate(99, 13, Hashing.sha256(), null, 0, SirixDeweyID.newRootID()); final NameNodeDelegate nameDel = new NameNodeDelegate(nodeDel, 13, 14, 15, 1); final NamespaceNode node = new NamespaceNode(nodeDel, nameDel, new QNm("ns", "a", "p")); node.setHash(node.computeHash()); final ByteArrayOutputStream out = new ByteArrayOutputStream(); node.getKind().serialize(new DataOutputStream(out), node, mPageReadTrx); final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); final NamespaceNode node2 = (NamespaceNode) NodeKind.NAMESPACE.deserialize(new DataInputStream(in), node.getNodeKey(), node.getDeweyID(), mPageReadTrx); check(node2); }