### Question:
RPNContext { public void setVariable(String key, @Nullable Object value) { if (mOperators.containsKey(key)) { throw new IllegalArgumentException("Can't set constant, \"" + key + "\" is a function"); } mVariables.put(key, value); didChangeVariable(key); } RPNContext();  RPNContext(RPNContext parent); static boolean isStopSignal(Object x); void didChangeVariable(String key); void addFunctionVariableDependency(RPNFunction function, String variable); void setVariable(String key, @Nullable Object value); @Nullable Object getVariable(String key); void updateRtcVariables(Calendar now); RPNFunction compile(String recipe); static final Object STOP; }### Answer:
@Test void nestedVariables() { mContext.setVariable("foo", 1); mContext = new RPNContext(mContext); mContext.setVariable("foo", 2.5); mContext.setVariable("bar", 3); assertExpression(2.5, "foo"); assertExpression(7.5, "foo bar *"); }