FeaturedProductSearchQueryBuilder extends AbstractSearchQueryBuilderImpl implements ProductSearchQueryBuilder<Query> { @Override public List<Query> createQueryChain(final NavigationContext<Query> navigationContext, final String parameter, final Object value) { return Collections.singletonList(createTermQuery(PRODUCT_FEATURED_FIELD, "true")); }  @Override List<Query> createQueryChain(final NavigationContext<Query> navigationContext, final String parameter, final Object value);  }
@Test public void testCreateQueryChain() throws Exception { final List<Query> query = new FeaturedProductSearchQueryBuilder().createQueryChain(null, "any", "any"); assertNotNull(query); assertEquals(1, query.size()); assertEquals("featured:true", query.get(0).toString()); }