### Question:
KeyBlockNode extends BlockNode { public String getKey() { return key; } KeyBlockNode(String key, Node name, List<Node> body);  KeyBlockNode(GyroParser.KeyBlockContext context); String getKey(); Node getName(); @Override R accept(NodeVisitor<C, R, X> visitor, C context);  }### Answer:
@Test void constructorContext() { KeyBlockNode node = (KeyBlockNode) Node.parse("foo\nend", GyroParser::block); assertThat(node.getKey()).isEqualTo("foo"); assertThat(node.getBody()).isEmpty(); }
@Test void getKey() { String key = "foo"; KeyBlockNode node = new KeyBlockNode(key, null, Collections.emptyList()); assertThat(node.getKey()).isEqualTo(key); }