### Question:
Environment { public List<Declaration> lookupFunctionDeclaration(String name) { List<Declaration> declarations = lookupLocalFunctionDeclaration(name); if (declarations == null) { declarations = new ArrayList<>(); } Environment environment = this.parent; while (environment != null) { List<Declaration> parentDeclarations = environment.lookupLocalFunctionDeclaration(name); if (parentDeclarations != null) { declarations.addAll(parentDeclarations); } environment = environment.parent; } return declarations; } 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 testLookupFunctionDeclaration() { Environment environment = environmentFactory.makeEnvironment(); String functionName = "date"; assertEquals(functionName, environment.lookupFunctionDeclaration(functionName, new PositionalParameterTypes(Arrays.asList(StringType.STRING))).getName()); }