public void testPrefiFilteredQueryBuilder() throws IOException {
IndexQueryParserService queryParser = queryParser();
Query parsedQuery = queryParser.parse(filteredQuery(termQuery("name.first", "shay"), prefixFilter("name.first", "sh"))).query();
assertThat(parsedQuery, instanceOf(FilteredQuery.class));
FilteredQuery filteredQuery = (FilteredQuery) parsedQuery;
PrefixFilter prefixFilter = (PrefixFilter) filteredQuery.getFilter();
assertThat(prefixFilter.getPrefix(), equalTo(new Term("name.first", "sh")));
}