### Question:
InterpolatedStringNode extends Node { public List<Node> getItems() { return items; } InterpolatedStringNode(List<Node> items);  InterpolatedStringNode(GyroParser.InterpolatedStringContext context); List<Node> getItems(); @Override R accept(NodeVisitor<C, R, X> visitor, C context);  }### Answer:
@Test void constructorContext() { InterpolatedStringNode node = (InterpolatedStringNode) Node.parse("\"foo\\(bar)qux\"", GyroParser::string); List<Node> items = node.getItems(); assertThat(items).hasSize(3); assertThat(items.get(0)).isInstanceOf(ValueNode.class); assertThat(items.get(1)).isInstanceOf(ReferenceNode.class); assertThat(items.get(2)).isInstanceOf(ValueNode.class); }
@Test void getItems() { Node item0 = mock(Node.class); Node item1 = mock(Node.class); InterpolatedStringNode node = new InterpolatedStringNode(Arrays.asList(item0, item1)); assertThat(node.getItems()).containsExactly(item0, item1); }
@Test void getItemsImmutable() { InterpolatedStringNode node = new InterpolatedStringNode(Collections.emptyList()); assertThatExceptionOfType(UnsupportedOperationException.class) .isThrownBy(() -> node.getItems().add(mock(Node.class))); }