@Test public void search_CHECK_RESULT() { JudgmentCriteria criteria = JudgmentCriteriaBuilder.create().withCaseNumber("III AUa 271/12").build(); SearchResults<JudgmentSearchResult> results = judgmentSearchService.search(criteria, null); JudgmentSearchResult result = fetchAndAssertSingleSearchResult(results); assertEquals(1961, result.getId()); assertEquals(1, result.getCaseNumbers().size()); assertEquals("III AUa 271/12", result.getCaseNumbers().get(0)); assertEquals(JudgmentType.SENTENCE, result.getJudgmentType()); assertEquals(new BigDecimal("12300.23"), result.getMaxMoneyAmount()); LocalDate expectedDate = new LocalDate(2012, 5, 15); assertEquals(expectedDate, result.getJudgmentDate()); assertThat(result.getJudges(), containsInAnyOrder( new JudgeResult("Jacek Witkowski", JudgeRole.PRESIDING_JUDGE), new JudgeResult("Elżbieta Kunecka"), new JudgeResult("Irena Różańska-Dorosz"))); assertThat(result.getKeywords(), containsInAnyOrder("zwrot nienależnie pobranych świadczeń z ubezpieczenia", "słowo kluczowe")); assertTrue(result.getContent().contains("W IMIENIU RZECZYPOSPOLITEJ POLSKIEJ")); assertTrue(result.getContent().contains("SSA Irena Różańska-Dorosz (spr.)")); assertTrue(result.getContent().contains("o zwrot nienależnie pobranego świadczenia")); assertFalse(result.getContent().contains("<p>")); assertFalse(result.getContent().contains("</p>")); assertFalse(result.getContent().contains("anon-block")); assertTrue(result.getContent().length() <= 800); }
@Override public SearchResults<JudgmentSearchResult> search(JudgmentCriteria criteria, Paging paging) { SolrQuery solrQuery = queryFactory.createQuery(criteria, paging); QueryResponse response = null; try { response = solrServer.query(solrQuery); } catch (SolrServerException e) { e.printStackTrace(); return new SearchResults<JudgmentSearchResult>(); } SearchResults<JudgmentSearchResult> results = resultsTranslator.translate(response); return results; }
JudgmentSearchService implements SearchService<JudgmentSearchResult, JudgmentCriteria> { @Override public SearchResults<JudgmentSearchResult> search(JudgmentCriteria criteria, Paging paging) { SolrQuery solrQuery = queryFactory.createQuery(criteria, paging); QueryResponse response = null; try { response = solrServer.query(solrQuery); } catch (SolrServerException e) { e.printStackTrace(); return new SearchResults<JudgmentSearchResult>(); } SearchResults<JudgmentSearchResult> results = resultsTranslator.translate(response); return results; } }
JudgmentSearchService implements SearchService<JudgmentSearchResult, JudgmentCriteria> { @Override public SearchResults<JudgmentSearchResult> search(JudgmentCriteria criteria, Paging paging) { SolrQuery solrQuery = queryFactory.createQuery(criteria, paging); QueryResponse response = null; try { response = solrServer.query(solrQuery); } catch (SolrServerException e) { e.printStackTrace(); return new SearchResults<JudgmentSearchResult>(); } SearchResults<JudgmentSearchResult> results = resultsTranslator.translate(response); return results; }  }
JudgmentSearchService implements SearchService<JudgmentSearchResult, JudgmentCriteria> { @Override public SearchResults<JudgmentSearchResult> search(JudgmentCriteria criteria, Paging paging) { SolrQuery solrQuery = queryFactory.createQuery(criteria, paging); QueryResponse response = null; try { response = solrServer.query(solrQuery); } catch (SolrServerException e) { e.printStackTrace(); return new SearchResults<JudgmentSearchResult>(); } SearchResults<JudgmentSearchResult> results = resultsTranslator.translate(response); return results; }  @Override SearchResults<JudgmentSearchResult> search(JudgmentCriteria criteria,
            Paging paging); }
JudgmentSearchService implements SearchService<JudgmentSearchResult, JudgmentCriteria> { @Override public SearchResults<JudgmentSearchResult> search(JudgmentCriteria criteria, Paging paging) { SolrQuery solrQuery = queryFactory.createQuery(criteria, paging); QueryResponse response = null; try { response = solrServer.query(solrQuery); } catch (SolrServerException e) { e.printStackTrace(); return new SearchResults<JudgmentSearchResult>(); } SearchResults<JudgmentSearchResult> results = resultsTranslator.translate(response); return results; }  @Override SearchResults<JudgmentSearchResult> search(JudgmentCriteria criteria,
            Paging paging);  }