@Test public void testCreateFromMap() { Map<String, Object> map = new HashMap<String, Object>(); map.put("x", "Abc"); map.put("y", 10); Context context = new Context(map); map.clear(); assertEquals( "Abc", context.getVar("x")); assertEquals( 10, context.getVar("y") ); }
public Object getVar(String name) { return varMap.get(name); }
Context { public Object getVar(String name) { return varMap.get(name); } }
Context { public Object getVar(String name) { return varMap.get(name); } Context();  Context(Map<String, Object> varMap); }
Context { public Object getVar(String name) { return varMap.get(name); } Context();  Context(Map<String, Object> varMap); Map<String, Object> toMap(); Object getVar(String name); void putVar(String name, Object value); void removeVar(String var); Config getConfig(); @Override String toString(); }
Context { public Object getVar(String name) { return varMap.get(name); } Context();  Context(Map<String, Object> varMap); Map<String, Object> toMap(); Object getVar(String name); void putVar(String name, Object value); void removeVar(String var); Config getConfig(); @Override String toString();  }