Source:
<code>public void translateSingle() { SolrDocument doc = fetchBasicDocument("ID", "1", "some content"); doc.addField("caseNumber", "AAAB1A"); GregorianCalendar calendar = new GregorianCalendar(2014, 9, 7); doc.addField("judgmentDate", calendar.getTime()); doc.addField("judgmentType", "SENTENCE"); doc.addField("legalBases", "art. 1234 kc"); doc.addField("referencedRegulations", "Ustawa 1"); doc.addField("referencedRegulations", "Ustawa 2"); doc.addField("courtType", "APPEAL"); doc.addField("courtId", "15200000"); doc.addField("courtName", "Sąd Apelacyjny w Krakowie"); doc.addField("courtDivisionId", "0000503"); doc.addField("courtDivisionName", "I Wydział Cywilny"); doc.addField("judge", "Jan Kowalski"); doc.addField("judge", "Adam Nowak"); doc.addField("judgeWithRole_#_PRESIDING_JUDGE", "Jan Kowalski"); JudgmentSearchResult result = resultsTranslator.translateSingle(doc); Assert.assertEquals("1", result.getId()); Assert.assertEquals(1, result.getCaseNumbers().size()); Assert.assertTrue(result.getCaseNumbers().contains("AAAB1A")); Assert.assertEquals(calendar.getTime(), result.getJudgmentDate()); Assert.assertEquals("SENTENCE", result.getJudgmentType()); Assert.assertEquals("Sąd Apelacyjny w Krakowie", result.getCourtName()); Assert.assertEquals("I Wydział Cywilny", result.getCourtDivisionName()); Assert.assertEquals(2, result.getJudges().size()); Assert.assertTrue(result.getJudges().contains("Jan Kowalski")); Assert.assertTrue(result.getJudges().contains("Adam Nowak")); <START> } <END></code><technical_language>fields checked, e.g. courtId</technical_language>

Target:
public void translateSingle() { SolrDocument doc = fetchBasicDocument("ID", "1", "some content"); doc.addField("caseNumber", "AAAB1A"); GregorianCalendar calendar = new GregorianCalendar(2014, 9, 7); doc.addField("judgmentDate", calendar.getTime()); doc.addField("judgmentType", "SENTENCE"); doc.addField("legalBases", "art. 1234 kc"); doc.addField("referencedRegulations", "Ustawa 1"); doc.addField("referencedRegulations", "Ustawa 2"); doc.addField("courtType", "APPEAL"); doc.addField("courtId", "15200000"); doc.addField("courtName", "Sąd Apelacyjny w Krakowie"); doc.addField("courtDivisionId", "0000503"); doc.addField("courtDivisionName", "I Wydział Cywilny"); doc.addField("keyword", "some keyword"); doc.addField("keyword", "some other keyword"); doc.addField("judge", "Jan Kowalski"); doc.addField("judge", "Adam Nowak"); doc.addField("judgeWithRole_#_PRESIDING_JUDGE", "Jan Kowalski"); JudgmentSearchResult result = resultsTranslator.translateSingle(doc); Assert.assertEquals("1", result.getId()); Assert.assertEquals(1, result.getCaseNumbers().size()); Assert.assertTrue(result.getCaseNumbers().contains("AAAB1A")); Assert.assertEquals(calendar.getTime(), result.getJudgmentDate()); Assert.assertEquals("SENTENCE", result.getJudgmentType()); Assert.assertEquals("Sąd Apelacyjny w Krakowie", result.getCourtName()); Assert.assertEquals("I Wydział Cywilny", result.getCourtDivisionName()); Assert.assertEquals(2, result.getKeywords().size()); Assert.assertTrue(result.getKeywords().contains("some keyword")); Assert.assertTrue(result.getKeywords().contains("some other keyword")); Assert.assertEquals(2, result.getJudges().size()); Assert.assertTrue(result.getJudges().contains("Jan Kowalski")); Assert.assertTrue(result.getJudges().contains("Adam Nowak")); }