### Question:
ScopeImpl implements Scope { @Override public Symbol createVariable (String name, String value) { return add (new SimpleVariable (name, new ScopeImpl (this), value)); } ScopeImpl(Scope parent); static Scope getGlobalScope(); @Override Scope getParent(); @Override Symbol get(String name); @Override Symbol getSymbol(String name); @Override Symbol createConstant(String name, String value); @Override Symbol createParameter(String name, String value); @Override Symbol createVariable(String name, String value); @Override Symbol createStructure(String name); @Override Symbol createNumberSequence(String name, int value); @Override StringSequence createStringSequence(String name); @Override RepeatingStringSequence createRepeatingStringSequence(String name);  }### Answer:
@Test public void testCreateVariable () { assertNotNull (mScope.createStructure ("x")); assertNotNull (mScope.get ("x")); }
@Test public void testDuplicate () { Scope scope = new ScopeImpl (null); scope.createVariable ("x", ""); try { scope.createVariable ("x", ""); fail ("no exception"); } catch (ExecutionException ee) { } }