### Question:
EventHistoryRequestQueryConverter extends AbstractConverterAware<EventHistoryRequest, SolrQuery> { @Override public SolrQuery convert(EventHistoryRequest eventHistoryRequest) { SolrQuery eventHistoryQuery = new SolrQuery(); eventHistoryQuery.setQuery("*:*"); int startIndex = StringUtils.isNotEmpty(eventHistoryRequest.getStartIndex()) && StringUtils.isNumeric(eventHistoryRequest.getStartIndex()) ? Integer.parseInt(eventHistoryRequest.getStartIndex()) : 0; int maxRows = StringUtils.isNotEmpty(eventHistoryRequest.getPageSize()) && StringUtils.isNumeric(eventHistoryRequest.getPageSize()) ? Integer.parseInt(eventHistoryRequest.getPageSize()) : 10; SolrQuery.ORDER order = eventHistoryRequest.getSortType() != null && SolrQuery.ORDER.desc.equals(SolrQuery.ORDER.valueOf(eventHistoryRequest.getSortType())) ? SolrQuery.ORDER.desc : SolrQuery.ORDER.asc; String sortBy = StringUtils.isNotEmpty(eventHistoryRequest.getSortBy()) ? eventHistoryRequest.getSortBy() : FILTER_NAME; String filterName = StringUtils.isBlank(eventHistoryRequest.getFilterName()) ? "*" : "*" + eventHistoryRequest.getFilterName() + "*"; eventHistoryQuery.addFilterQuery(String.format("%s:%s", ROW_TYPE, eventHistoryRequest.getRowType())); eventHistoryQuery.addFilterQuery(String.format("%s:%s", FILTER_NAME, SolrUtil.makeSearcableString(filterName))); eventHistoryQuery.setStart(startIndex); eventHistoryQuery.setRows(maxRows); SolrQuery.SortClause sortOrder = SolrQuery.SortClause.create(sortBy, order); List<SolrQuery.SortClause> sort = new ArrayList<>(); sort.add(sortOrder); eventHistoryQuery.setSorts(sort); SolrUtil.addListFilterToSolrQuery(eventHistoryQuery, CLUSTER, eventHistoryRequest.getClusters()); return eventHistoryQuery; }  @Override SolrQuery convert(EventHistoryRequest eventHistoryRequest);  }### Answer:
@Test public void testConvert() { EventHistoryRequest request = new EventHistoryQueryRequest(); request.setRowType("myRowType"); request.setFilterName("myFilterName"); request.setClusters("cl1,cl2"); SolrQuery queryResult = underTest.convert(request); assertEquals("?q=*%3A*&fq=rowtype%3AmyRowType&fq=filtername%3A*myFilterName*&fq=cluster%3A%28cl1+OR+cl2%29&start=0&rows=10&sort=filtername+asc", queryResult.toQueryString()); }