}
@Test
public void testConvertFacetQueryResponseForQueryResultWithSingeFacetField() {
List<FacetField> fieldList = new ArrayList<FacetField>(1);
FacetField ffield = createFacetField("field_1", 1, 2);
fieldList.add(ffield);
Mockito.when(response.getFacetFields()).thenReturn(fieldList);
Map<Field, Page<FacetFieldEntry>> result = ResultHelper.convertFacetQueryResponseToFacetPageMap(
createFacetQuery("field_1"), response);
Assert.assertNotNull(result);
Assert.assertEquals(1, result.size());
Entry<Field, Page<FacetFieldEntry>> resultEntry = result.entrySet().iterator().next();
Assert.assertEquals(ffield.getName(), resultEntry.getKey().getName());
Assert.assertEquals(2, resultEntry.getValue().getContent().size());
}