### Question:
BlockNode extends Node { public List<Node> getBody() { return body; } BlockNode(ParserRuleContext context, List<Node> body); List<Node> getBody();  }### Answer:
@Test void getBody() { Node item0 = mock(Node.class); Node item1 = mock(Node.class); BlockNode node = new TestBlockNode(Arrays.asList(item0, item1)); assertThat(node.getBody()).containsExactly(item0, item1); }
@Test void getBodyImmutable() { BlockNode node = new TestBlockNode(Collections.emptyList()); assertThatExceptionOfType(UnsupportedOperationException.class) .isThrownBy(() -> node.getBody().add(mock(Node.class))); }