### Question:
ScraperContext implements DynamicScopeContext { @Override public boolean containsVar(String name) { return getVar(name) != null; } ScraperContext(); @PostConstruct void initContext(); void setLocalVar(String name, Object value); @Override void setLocalVar(String name, Variable variable); @Override @SuppressWarnings({"ConstantConditions"}) Variable replaceExistingVar(String name, Variable variable); @Override Variable getVar(String name); @Override boolean containsVar(String name); @Override @SuppressWarnings({"unchecked"}) Iterator<KeyValuePair<Variable>> iterator(); @Override R executeWithinNewContext(Callable<R> callable); @Override // TODO Add unit test void setLocalVar(final Map<String, Object> map); @Override @Deprecated FunctionDef getFunctionDef(final String name); @Override @Deprecated void addFunctionDef(final FunctionDef funcDef); @Override @Deprecated ScriptingLanguage getScriptingLanguage(); @Override @Deprecated void setScriptingLanguage(final ScriptingLanguage language); @Override String getCharset(); @Override void setCharset(final String charset); @Override Config getConfig(); @Override @Deprecated void setConfig(final Config config);  }### Answer:
@Test public void testContainsVar() throws Exception { context.setLocalVar("x", dummyVar); context.setLocalVar("null", null); assertTrue(context.containsVar("x")); assertFalse(context.containsVar("notExisting")); assertSame(context.getVar("null"), EmptyVariable.INSTANCE); }