### Question:
SourceCcJudgmentMarshaller { public SourceCcJudgment unmarshal(String xmlCcJudgmentMetadata) { return (SourceCcJudgment)ccJudgmentJaxb2Marshaller.unmarshal(new StreamSource(new StringReader(xmlCcJudgmentMetadata))); }  SourceCcJudgment unmarshal(String xmlCcJudgmentMetadata); @Autowired void setCcJudgmentJaxb2Marshaller(Jaxb2Marshaller ccJudgmentJaxb2Marshaller);  }### Answer:
@Test public void unmarshal() throws IOException { SourceCcJudgment sourceCcJudgment = new SourceCcJudgment(); String judgmentXml = "<xxx>sdsdsd</xxx>xcxcxc xcdx cx c"; when(jaxb2Marshaller.unmarshal(Mockito.any(Source.class))).thenReturn(sourceCcJudgment); sourceCcJudgmentMarshaller.setCcJudgmentJaxb2Marshaller(jaxb2Marshaller); SourceCcJudgment uSourceCcJudgment = sourceCcJudgmentMarshaller.unmarshal(judgmentXml); assertNotNull(uSourceCcJudgment); ArgumentCaptor<StreamSource> argument = ArgumentCaptor.forClass(StreamSource.class); verify(jaxb2Marshaller).unmarshal(argument.capture()); char[] buff = new char[judgmentXml.toCharArray().length]; argument.getValue().getReader().read(buff); assertTrue(Arrays.equals(judgmentXml.toCharArray(), buff)); }