createTestData(text);
String stmt = getStatement(terms);
QueryResult result = executeQuery(stmt);
RowIterator rows = result.getRows();
assertEquals(1, rows.getSize());
assertEquals(excerpt, getExcerpt(rows.nextRow()));
}
private String getStatement(String terms) {
return testPath + "/*[jcr:contains(., '"+ terms + "')]/rep:excerpt(.)";
}