@Test public void convertSourceCcJudgment() { RawSourceCcJudgment rawJudgment = Mockito.mock(RawSourceCcJudgment.class); String textContent = "TEXT CONTENT OF THE JUDGMENT"; String textMetadata = "METADATA AS TEXT"; String sourceUrl = "http: when(rawJudgment.getTextContent()).thenReturn(textContent); when(rawJudgment.getTextMetadata()).thenReturn(textMetadata); when(rawJudgment.getSourceUrl()).thenReturn(sourceUrl); SourceCcJudgment ccJudgment = new SourceCcJudgment(); when(sourceCcJudgmentMarshaller.unmarshal(Mockito.eq(textMetadata))).thenReturn(ccJudgment); SourceCcJudgment ccJudgmentReturned = rawSourceCcJudgmentConverter.convertSourceCcJudgment(rawJudgment); assertTrue(ccJudgment == ccJudgmentReturned); assertEquals(textContent, ccJudgment.getTextContent()); assertEquals(sourceUrl, ccJudgment.getSourceUrl()); verify(rawJudgment).getTextContent(); verify(rawJudgment).getTextMetadata(); verify(rawJudgment).getSourceUrl(); verifyNoMoreInteractions(rawJudgment); }
public SourceCcJudgment convertSourceCcJudgment(final RawSourceCcJudgment rawJudgment) { SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(rawJudgment.getTextMetadata()); sourceCcJudgment.setTextContent(rawJudgment.getTextContent()); sourceCcJudgment.setSourceUrl(rawJudgment.getSourceUrl()); return sourceCcJudgment; }
RawSourceCcJudgmentConverter { public SourceCcJudgment convertSourceCcJudgment(final RawSourceCcJudgment rawJudgment) { SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(rawJudgment.getTextMetadata()); sourceCcJudgment.setTextContent(rawJudgment.getTextContent()); sourceCcJudgment.setSourceUrl(rawJudgment.getSourceUrl()); return sourceCcJudgment; } }
RawSourceCcJudgmentConverter { public SourceCcJudgment convertSourceCcJudgment(final RawSourceCcJudgment rawJudgment) { SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(rawJudgment.getTextMetadata()); sourceCcJudgment.setTextContent(rawJudgment.getTextContent()); sourceCcJudgment.setSourceUrl(rawJudgment.getSourceUrl()); return sourceCcJudgment; }  }
RawSourceCcJudgmentConverter { public SourceCcJudgment convertSourceCcJudgment(final RawSourceCcJudgment rawJudgment) { SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(rawJudgment.getTextMetadata()); sourceCcJudgment.setTextContent(rawJudgment.getTextContent()); sourceCcJudgment.setSourceUrl(rawJudgment.getSourceUrl()); return sourceCcJudgment; }  SourceCcJudgment convertSourceCcJudgment(final RawSourceCcJudgment rawJudgment); @Autowired void setCcJudgmentMarshaller(SourceCcJudgmentMarshaller ccJudgmentMarshaller); }
RawSourceCcJudgmentConverter { public SourceCcJudgment convertSourceCcJudgment(final RawSourceCcJudgment rawJudgment) { SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(rawJudgment.getTextMetadata()); sourceCcJudgment.setTextContent(rawJudgment.getTextContent()); sourceCcJudgment.setSourceUrl(rawJudgment.getSourceUrl()); return sourceCcJudgment; }  SourceCcJudgment convertSourceCcJudgment(final RawSourceCcJudgment rawJudgment); @Autowired void setCcJudgmentMarshaller(SourceCcJudgmentMarshaller ccJudgmentMarshaller);  }