### Question:
Environment { public Declaration lookupVariableDeclaration(String name) { Declaration declaration = lookupLocalVariableDeclaration(name); if (declaration != null) { return declaration; } else { if (getParent() != null) { return getParent().lookupVariableDeclaration(name); } else { return null; } } } Environment();   Environment(Environment parent);   Environment(Environment parent, Expression inputExpression); Environment getParent(); Expression getInputExpression(); Type getInputExpressionType(); void addDeclaration(Declaration declaration); void addDeclaration(String name, Declaration declaration); Declaration lookupVariableDeclaration(String name); List<Declaration> lookupFunctionDeclaration(String name); Declaration lookupFunctionDeclaration(String name, ParameterTypes parameterTypes); void updateVariableDeclaration(String name, Type type);  }### Answer:
@Test public void testLookupVariableDeclaration() { Environment environment = environmentFactory.makeEnvironment(); String name = "x"; environment.addDeclaration(new VariableDeclaration(name, StringType.STRING)); assertEquals("x", environment.lookupVariableDeclaration(name).getName()); }