CommentNode extends AbstractStructForwardingNode implements ValueNode, ImmutableXmlNode { public CommentNode(final BigInteger hashCode, final ValueNodeDelegate valDel, final StructNodeDelegate structDel) { mHash = hashCode; assert valDel != null; mValDel = valDel; assert structDel != null; mStructNodeDel = structDel; } CommentNode(final BigInteger hashCode, final ValueNodeDelegate valDel, final StructNodeDelegate structDel);  CommentNode(final ValueNodeDelegate valDel, final StructNodeDelegate structDel); @Override NodeKind getKind(); @Override BigInteger computeHash(); @Override void setHash(final BigInteger hash); @Override BigInteger getHash(); @Override byte[] getRawValue(); @Override void setValue(final byte[] value); @Override long getFirstChildKey(); @Override VisitResult acceptVisitor(final XmlNodeVisitor visitor); @Override void decrementChildCount(); @Override void incrementChildCount(); @Override long getDescendantCount(); @Override void decrementDescendantCount(); @Override void incrementDescendantCount(); @Override void setDescendantCount(final long descendantCount); @Override int hashCode(); @Override boolean equals(final @Nullable Object obj); @Override String toString(); ValueNodeDelegate getValNodeDelegate(); @Override String getValue(); @Override SirixDeweyID getDeweyID(); @Override int getTypeKey();  }
@Test public void testCommentNode() throws IOException { final byte[] value = {(byte) 17, (byte) 18}; final NodeDelegate del = new NodeDelegate(13, 14, Hashing.sha256(), null, 0, SirixDeweyID.newRootID()); final ValueNodeDelegate valDel = new ValueNodeDelegate(del, value, false); final StructNodeDelegate strucDel = new StructNodeDelegate(del, Fixed.NULL_NODE_KEY.getStandardProperty(), 16l, 15l, 0l, 0l); final CommentNode node = new CommentNode(valDel, strucDel); node.setHash(node.computeHash()); check(node); final ByteArrayOutputStream out = new ByteArrayOutputStream(); node.getKind().serialize(new DataOutputStream(out), node, mPageReadTrx); final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); final CommentNode node2 = (CommentNode) NodeKind.COMMENT.deserialize(new DataInputStream(in), node.getNodeKey(), node.getDeweyID(), mPageReadTrx); check(node2); }