### Question:
InterpreterVisitor implements ResultVisitor<Value, Context> { @Override public Value get(AccessNode node, Context context) { Value container = node.root.accept(this, context); return getContainer(node.indices, context, container) .orElseThrow(() -> new TypeException("Unable to get property from non-accessible type", node.start(), node.end())); }  @Override Value visit(AccessNode node, Context context); @Override Value visit(ArrayNode node, Context context); @Override Value visit(AssignNode node, Context context); @Override Value visit(BlockNode node, Context context); @Override Value visit(FunctionNode node, Context context); @Override Value visit(MapNode node, Context context); @Override Value visit(PropertyNode node, Context context); @Override Value visit(UnaryNode node, Context context); @Override Value visit(UnitNode node, Context context); @Override Value visit(ValueNode node, Context context); @Override Value visit(VariableNode node, Context context); @Override Value get(AccessNode node, Context context); @Override Value set(AccessNode node, Value value, Context context); @Override Value get(VariableNode node, Context context); @Override Value set(VariableNode node, Value value, Context context);  }### Answer:
@Test void testMapAccess() { Context context = new Context(); eval("A = {x: 0, y: 22, z: 0, text: 'hello'}\n" + "A.x = 20\n" + "A.z = A.y\n" + "A.newKey = 'newValue'", context); Value value = context.variables().get("A"); assertThat(value, instanceOf(MapValue.class)); Map<String, Value> map = ((MapValue) value).getMap(); assertThat(map, allOf( hasEntry("x", NumberValue.of(20)), hasEntry("y", NumberValue.of(22)), hasEntry("z", NumberValue.of(22)) )); assertThat(map, allOf( hasEntry("text", new StringValue("hello")), hasEntry("newKey", new StringValue("newValue")) )); }
@Test void testUnits() { final var context = new Context(); BundleLoader.loadSingle(context, CompositionBundle.class); context.functions().put("rate", context.functions().get("composition")); Value value; value = eval("rate(30) t = 1 sec", context); assertThat(value.asDouble(), closeTo(30, 0.0001)); value = eval("rate(30) t = 5 sec", context); assertThat(value.asDouble(), closeTo(150, 0.0001)); value = eval("rate(30) t = 0.5 sec", context); assertThat(value.asDouble(), closeTo(15, 0.0001)); value = eval("rate(30) t = 1000 ms", context); assertThat(value.asDouble(), closeTo(30, 0.0001)); value = eval("rate(30) t = 333 ms", context); assertThat(value.asDouble(), closeTo(10, 0.01)); value = eval("rate(25) t = 1 sec", context); assertThat(value.asDouble(), closeTo(25, 0.0001)); value = eval("rate(25) t = 1000 ms", context); assertThat(value.asDouble(), closeTo(25, 0.0001)); }