}
@Test
public void testConstructSolrQueryWithFieldFacetParameters() {
FacetQuery query = new SimpleFacetQuery(new Criteria("field_1").is("value_1"));
FieldWithFacetParameters fieldWithFacetParameters = new FieldWithFacetParameters("facet_2").setPrefix("prefix")
.setSort(FacetSort.INDEX).setLimit(3).setOffset(2).setMethod("method").setMissing(true);
FacetOptions facetOptions = new FacetOptions(new SimpleField("facet_1"), fieldWithFacetParameters);
query.setFacetOptions(facetOptions);
SolrQuery solrQuery = queryParser.constructSolrQuery(query);
Assert.assertNotNull(solrQuery);
assertQueryStringPresent(solrQuery);
assertPaginationNotPresent(solrQuery);
assertProjectionNotPresent(solrQuery);
assertGroupingNotPresent(solrQuery);
assertFactingPresent(solrQuery, "facet_1", "facet_2");
Assert.assertEquals(fieldWithFacetParameters.getPrefix(),
solrQuery.getParams("f." + fieldWithFacetParameters.getName() + ".facet.prefix")[0]);
Assert.assertEquals(FacetParams.FACET_SORT_INDEX,
solrQuery.getParams("f." + fieldWithFacetParameters.getName() + ".facet.sort")[0]);
Assert.assertEquals(Integer.toString(fieldWithFacetParameters.getOffset()),
solrQuery.getParams("f." + fieldWithFacetParameters.getName() + ".facet.offset")[0]);
Assert.assertEquals(Integer.toString(fieldWithFacetParameters.getLimit()),
solrQuery.getParams("f." + fieldWithFacetParameters.getName() + ".facet.limit")[0]);
Assert.assertEquals(fieldWithFacetParameters.getMethod(),
solrQuery.getParams("f." + fieldWithFacetParameters.getName() + ".facet.method")[0]);
Assert.assertEquals(fieldWithFacetParameters.getMissing().toString(),
solrQuery.getParams("f." + fieldWithFacetParameters.getName() + ".facet.missing")[0]);
}