### Question:
CQL { public static Expression toExpression(String cqlExpression) throws CQLException { return toExpression(cqlExpression, null); } private  CQL(); static Filter toFilter(final String cqlPredicate); static Filter toFilter(final String cqlPredicate, final FilterFactory filterFactory); static Expression toExpression(String cqlExpression); static Expression toExpression(final String cqlExpression,
                                          final FilterFactory filterFactory); static List<Filter> toFilterList(final String cqlFilterList); static String toCQL( Filter filter ); static String toCQL( Expression expression ); static List<Filter> toFilterList(final String cqlSequencePredicate, final FilterFactory filterFactory); static final void main(String[] args);  }### Answer:
@Test public void expression() throws Exception{ Expression expr = CQL.toExpression("QUANTITY + 1"); Assert.assertTrue(expr instanceof Add); }
@Test public void toExpressionUsesProvidedFilterFactory() throws Exception { final boolean[] called = { false }; FilterFactory ff = new FilterFactoryImpl() { public PropertyName property(String propName) { called[0] = true; return super.property(propName); } }; CQL.toExpression("attName", ff); Assert.assertTrue("Provided FilterFactory was not called", called[0]); }