### Question:
FacetedSearchService { public String buildSolrQuery(String filter) { if (!StringUtils.isBlank(filter)) { try { filter = URLDecoder.decode(filter, SearchConstants.FACETED_SEARCH_ENCODING); String solrFiltersSubQuery = createFacetedFiltersSubString(filter); return solrFiltersSubQuery; } catch (UnsupportedEncodingException e) { log.error("Encoding problem occur while building SOLR query for faceted search with filters: " + filter); } } return filter; }  String buildHiddenDocumentsFilter(); String getFacetKeys(); String buildSolrQuery(String filter); String updateQueryWithExcludedObjects(String query, String rowQueryParameters); String replaceEventTypeName(String solrResult); String escapeQueryChars(String s); String escapeTermsInQuery(String query); SearchConfig getSearchConfig(); void setSearchConfig(SearchConfig searchConfig); AuditEventConfig getAuditEventConfig(); void setAuditEventConfig(AuditEventConfig auditEventConfig); JSONObject getParentDocumentJsonObject(Authentication authentication, String res); ExecuteSolrQuery getExecuteSolrQuery(); void setExecuteSolrQuery(ExecuteSolrQuery executeSolrQuery);  }### Answer:
@Test public void buildSolrQuery_nonFacetFilterShouldBecomeFqFilter() throws Exception { String filter = "object_id_s:1401"; String query = "&fq=" + filter; String found = unit.buildSolrQuery(filter); assertEquals(query, found); }
@Test public void buildSolrQuery_facetFilterShouldHaveFieldNameFromProperties() throws Exception { searchConfig.getFacets().put("my_facet_lcs", "Example Facet"); String filter = "\"Example Facet\":1401"; String query = "&fq=" + URLEncoder.encode("{!field f=my_facet_lcs}1401", SearchConstants.FACETED_SEARCH_ENCODING); String found = unit.buildSolrQuery(filter); assertEquals(query, found); }