@Autowired
SearchRequestParamRepository _paramRepo;
@Test
public void testGetTermTextToRequestCount() {
SearchRequestParam param3 = _paramRepo.save(newRequestParam(_inc));
SearchRequestParam param4 = _paramRepo.save(newRequestParam(_inc));
SearchRequestParam param1 = newRequestParam(_inc);
param1 = _paramRepo.save(param1);
SearchRequestParam param2 = newRequestParam(_inc);
param2.setTermText(param1.getTermText());
_paramRepo.save(param2);
SearchRequestParam param5 = _paramRepo.save(newRequestParam(_inc));
SearchRequestParam param6 = newRequestParam(_inc);
param6.setTermField(SearchRequestParamRepositoryImpl.TERMS_TO_EXCLUDE_FROM_TAG_CLOUD[0]);
SearchRequestParam param7 = newRequestParam(_inc);
param7.setTermText("");
_paramRepo.save(param7);
List<Pair<String, Integer>> tagCloudSummary = _paramRepo.getTermTextToRequestCount(10);
assertEquals(4, tagCloudSummary.size());
assertEquals(2, find(tagCloudSummary, param1.getTermText()));