### Question:
Query { public static Query compile(final String query) throws AttributeExpressionLanguageParsingException { try { final ExpressionCompiler compiler = new ExpressionCompiler(); final CompiledExpression compiledExpression = compiler.compile(query); return new Query(compiledExpression.getExpression(), compiledExpression.getTree(), compiledExpression.getRootEvaluator()); } catch (final AttributeExpressionLanguageParsingException e) { throw e; } catch (final Exception e) { throw new AttributeExpressionLanguageParsingException(e); } } private  Query(final String query, final Tree tree, final Evaluator<?> evaluator); static boolean isValidExpression(final String value); static ResultType getResultType(final String value); static List<ResultType> extractResultTypes(final String value); static List<String> extractExpressions(final String value); static List<Range> extractExpressionRanges(final String value); static void validateExpression(final String value, final boolean allowSurroundingCharacters); static String unescape(final String value); static Query fromTree(final Tree tree, final String text); static PreparedQuery prepare(final String query); static Query compile(final String query); ResultType getResultType(); @Override String toString();  }### Answer:
@Test(expected = AttributeExpressionLanguageException.class) public void testCannotCombineWithNonReducingFunction() { Query.compile("${allAttributes( 'a.1' ):plus(1)}"); }
@Test public void testProblematic1() { final String queryString = "${xx:append( \"120101\" ):toDate( 'yyMMddHHmmss' ):format( \"yy-MM-dd’T’HH:mm:ss\") }"; Query.compile(queryString); }
@Test public void testAllAttributes() { final Map<String, String> attributes = new HashMap<>(); attributes.put("abc", "1234"); attributes.put("xyz", "4132"); attributes.put("hello", "world!"); verifyEquals("${allAttributes('abc', 'xyz'):matches('\\d+')}", attributes, true); verifyEquals("${allAttributes('abc', 'xyz'):toNumber():lt(99999)}", attributes, true); verifyEquals("${allAttributes('abc', 'hello'):length():gt(3)}", attributes, true); verifyEquals("${allAttributes('abc', 'hello'):length():equals(4)}", attributes, false); verifyEquals("${allAttributes('abc', 'xyz'):length():equals(4)}", attributes, true); verifyEquals("${allAttributes('abc', 'xyz', 'other'):isNull()}", attributes, false); try { Query.compile("${allAttributes('#ah'):equals('hello')"); Assert.fail("Was able to compile with allAttributes and an invalid attribute name"); } catch (final AttributeExpressionLanguageParsingException e) { } }