### Question:
Function { static List<String> evaluate( String statement, Resolver resolver, Evaluator evaluator ) { Function function = new Function( statement ); return function.evaluate( resolver, evaluator ); } Function( String statement );   }### Answer:
@Test public void testEvaluate() throws Exception { TestResolver resolver = new TestResolver(); TestEvaluator evaluator = new TestEvaluator(); List<String> values; values = Function.evaluate( "$test-func(test-variable)", resolver, evaluator ); assertThat( values, contains( "<test-func:resolve(test-variable)>" ) ); values = Function.evaluate( "$test-func[test-literal]", resolver, evaluator ); assertThat( values, contains( "<test-func:test-literal>" ) ); values = Function.evaluate( "test-variable", resolver, evaluator ); assertThat( values, contains( "resolve(test-variable)" ) ); values = Function.evaluate( "(test-variable)", resolver, evaluator ); assertThat( values, contains( "resolve(test-variable)" ) ); values = Function.evaluate( "[test-literal]", resolver, evaluator ); assertThat( values, contains( "test-literal" ) ); }