@Test(expected=IllegalArgumentException.class) public void getOrCreateScChamberDivision_EmptyDivisioName() { scChamberDivisionCreator.getOrCreateScChamberDivision(""); }
public SupremeCourtChamberDivision getOrCreateScChamberDivision(String chamberDivisionFullName) { Preconditions.checkArgument(StringUtils.isNotBlank(chamberDivisionFullName)); SupremeCourtChamberDivision scChamberDivision = scChamberDivisionRepository.findOneByFullName(chamberDivisionFullName); if (scChamberDivision == null) { SupremeCourtChamber scChamber = findScChamber(chamberDivisionFullName); scChamberDivision = createAndSaveScChamberDivision(scChamber, chamberDivisionFullName); } return scChamberDivision; }
ScChamberDivisionCreator { public SupremeCourtChamberDivision getOrCreateScChamberDivision(String chamberDivisionFullName) { Preconditions.checkArgument(StringUtils.isNotBlank(chamberDivisionFullName)); SupremeCourtChamberDivision scChamberDivision = scChamberDivisionRepository.findOneByFullName(chamberDivisionFullName); if (scChamberDivision == null) { SupremeCourtChamber scChamber = findScChamber(chamberDivisionFullName); scChamberDivision = createAndSaveScChamberDivision(scChamber, chamberDivisionFullName); } return scChamberDivision; } }
ScChamberDivisionCreator { public SupremeCourtChamberDivision getOrCreateScChamberDivision(String chamberDivisionFullName) { Preconditions.checkArgument(StringUtils.isNotBlank(chamberDivisionFullName)); SupremeCourtChamberDivision scChamberDivision = scChamberDivisionRepository.findOneByFullName(chamberDivisionFullName); if (scChamberDivision == null) { SupremeCourtChamber scChamber = findScChamber(chamberDivisionFullName); scChamberDivision = createAndSaveScChamberDivision(scChamber, chamberDivisionFullName); } return scChamberDivision; }  }
ScChamberDivisionCreator { public SupremeCourtChamberDivision getOrCreateScChamberDivision(String chamberDivisionFullName) { Preconditions.checkArgument(StringUtils.isNotBlank(chamberDivisionFullName)); SupremeCourtChamberDivision scChamberDivision = scChamberDivisionRepository.findOneByFullName(chamberDivisionFullName); if (scChamberDivision == null) { SupremeCourtChamber scChamber = findScChamber(chamberDivisionFullName); scChamberDivision = createAndSaveScChamberDivision(scChamber, chamberDivisionFullName); } return scChamberDivision; }  SupremeCourtChamberDivision getOrCreateScChamberDivision(String chamberDivisionFullName); @Autowired void setScChamberRepository(ScChamberRepository scChamberRepository); @Autowired void setScChamberDivisionRepository(ScChamberDivisionRepository scChamberDivisionRepository); @Autowired void setScChamberDivisionNameExtractor(ScChamberDivisionNameExtractor scChamberDivisionNameExtractor); }
ScChamberDivisionCreator { public SupremeCourtChamberDivision getOrCreateScChamberDivision(String chamberDivisionFullName) { Preconditions.checkArgument(StringUtils.isNotBlank(chamberDivisionFullName)); SupremeCourtChamberDivision scChamberDivision = scChamberDivisionRepository.findOneByFullName(chamberDivisionFullName); if (scChamberDivision == null) { SupremeCourtChamber scChamber = findScChamber(chamberDivisionFullName); scChamberDivision = createAndSaveScChamberDivision(scChamber, chamberDivisionFullName); } return scChamberDivision; }  SupremeCourtChamberDivision getOrCreateScChamberDivision(String chamberDivisionFullName); @Autowired void setScChamberRepository(ScChamberRepository scChamberRepository); @Autowired void setScChamberDivisionRepository(ScChamberDivisionRepository scChamberDivisionRepository); @Autowired void setScChamberDivisionNameExtractor(ScChamberDivisionNameExtractor scChamberDivisionNameExtractor);  }