StringNode extends AbstractStringNode { @Override public NodeKind getKind() { return NodeKind.STRING_VALUE; } StringNode(final ValueNodeDelegate valueNodeDelegate, final StructNodeDelegate structNodeDelegate); @Override NodeKind getKind(); @Override VisitResult acceptVisitor(JsonNodeVisitor visitor);  }
@Test public void test() 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 StringNode node = new StringNode(valDel, strucDel); node.setHash(node.computeHash()); check(node); final ByteArrayOutputStream out = new ByteArrayOutputStream(); node.getKind().serialize(new DataOutputStream(out), node, pageTrx); final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); final StringNode node2 = (StringNode) NodeKind.STRING_VALUE.deserialize(new DataInputStream(in), node.getNodeKey(), null, pageTrx); check(node2); }