public void testExcerpt() throws RepositoryException {
Node file = addFile(testRootNode, "file1.txt", SAMPLE_CONTENT);
superuser.save();
String stmt = createStatement("quick");
checkResultWithRetries(stmt, "jcr:content", new Node[]{file});
RowIterator rows = GQL.execute(stmt, superuser, "jcr:content");
assertTrue("Expected result", rows.hasNext());
String excerpt = rows.nextRow().getValue("rep:excerpt()").getString();
assertTrue("No excerpt returned", excerpt.startsWith("<div><span>"));
stmt = createStatement("type:resource quick");
rows = GQL.execute(stmt, superuser);
assertTrue("Expected result", rows.hasNext());
excerpt = rows.nextRow().getValue("rep:excerpt()").getString();
assertTrue("No excerpt returned", excerpt.startsWith("<div><span>"));
}