BooleanNode extends Node { @Override public Optional<BooleanNode> asBooleanNode() { return Optional.of(this); } BooleanNode(boolean value, SourceLocation sourceLocation); boolean getValue(); @Override NodeType getType(); @Override R accept(NodeVisitor<R> visitor); @Override BooleanNode expectBooleanNode(String errorMessage); @Override Optional<BooleanNode> asBooleanNode(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void convertsToBoolean() { assertTrue(Node.from(true).asBooleanNode().isPresent()); }