### Question:
LuceneSerializer { protected Query endsWith(Operation<?> operation, QueryMetadata metadata, boolean ignoreCase) { verifyArguments(operation); Path<?> path = getPath(operation.getArg(0)); String field = toField(path); String[] terms = convertEscaped(path, operation.getArg(1), metadata); if (terms.length > 1) { BooleanQuery bq = new BooleanQuery(); for (int i = 0; i < terms.length; ++i) { String s = i == terms.length - 1 ? "*" + terms[i] : "*" + terms[i] + "*"; bq.add(new WildcardQuery(new Term(field, s)), Occur.MUST); } return bq; } return new WildcardQuery(new Term(field, "*" + terms[0])); } LuceneSerializer(boolean lowerCase, boolean splitTerms);  LuceneSerializer(boolean lowerCase, boolean splitTerms,
            Locale sortLocale); Query toQuery(Expression<?> expr, QueryMetadata metadata); Sort toSort(List<? extends OrderSpecifier<?>> orderBys); static final LuceneSerializer DEFAULT; }### Answer:
@Test public void endsWith() throws Exception { testQuery(title.endsWith("ark"), "title:*ark", 1); }
@Test public void ends_with_empty_string() throws Exception { testQuery(title.endsWith(""), "title:*", 1); }