@Test public void convert() { CommonCourt commonCourt = commonCourtConverter.convert(xmlCourt); assertCourt(xmlCourt, commonCourt); }
public CommonCourt convert(XmlCommonCourt xmlCourt) { Preconditions.checkNotNull(xmlCourt); Preconditions.checkArgument(CommonCourtUtils.isValidCommonCourtCode(xmlCourt.getId())); CommonCourt court = new CommonCourt(); court.setCode(xmlCourt.getId()); court.setName(xmlCourt.getName()); court.setType(CommonCourtUtils.extractType(court.getCode())); convertDivisions(xmlCourt, court); return court; }
SourceCommonCourtConverter { public CommonCourt convert(XmlCommonCourt xmlCourt) { Preconditions.checkNotNull(xmlCourt); Preconditions.checkArgument(CommonCourtUtils.isValidCommonCourtCode(xmlCourt.getId())); CommonCourt court = new CommonCourt(); court.setCode(xmlCourt.getId()); court.setName(xmlCourt.getName()); court.setType(CommonCourtUtils.extractType(court.getCode())); convertDivisions(xmlCourt, court); return court; } }
SourceCommonCourtConverter { public CommonCourt convert(XmlCommonCourt xmlCourt) { Preconditions.checkNotNull(xmlCourt); Preconditions.checkArgument(CommonCourtUtils.isValidCommonCourtCode(xmlCourt.getId())); CommonCourt court = new CommonCourt(); court.setCode(xmlCourt.getId()); court.setName(xmlCourt.getName()); court.setType(CommonCourtUtils.extractType(court.getCode())); convertDivisions(xmlCourt, court); return court; }  }
SourceCommonCourtConverter { public CommonCourt convert(XmlCommonCourt xmlCourt) { Preconditions.checkNotNull(xmlCourt); Preconditions.checkArgument(CommonCourtUtils.isValidCommonCourtCode(xmlCourt.getId())); CommonCourt court = new CommonCourt(); court.setCode(xmlCourt.getId()); court.setName(xmlCourt.getName()); court.setType(CommonCourtUtils.extractType(court.getCode())); convertDivisions(xmlCourt, court); return court; }  CommonCourt convert(XmlCommonCourt xmlCourt); @Autowired void setCcDivisionTypeRepository(CcDivisionTypeRepository ccDivisionTypeRepository); }
SourceCommonCourtConverter { public CommonCourt convert(XmlCommonCourt xmlCourt) { Preconditions.checkNotNull(xmlCourt); Preconditions.checkArgument(CommonCourtUtils.isValidCommonCourtCode(xmlCourt.getId())); CommonCourt court = new CommonCourt(); court.setCode(xmlCourt.getId()); court.setName(xmlCourt.getName()); court.setType(CommonCourtUtils.extractType(court.getCode())); convertDivisions(xmlCourt, court); return court; }  CommonCourt convert(XmlCommonCourt xmlCourt); @Autowired void setCcDivisionTypeRepository(CcDivisionTypeRepository ccDivisionTypeRepository);  }