@Test public void convertScDivisionChambers_Same() { long idOne = 111; long idTwo = 222; SupremeCourtChamberDivision scChamberDivisionOne = new SupremeCourtChamberDivision(); scChamberDivisionOne.setName(scDivisionChamberNames[0]); Whitebox.setInternalState(scChamberDivisionOne, "id", idOne); SupremeCourtChamberDivision scChamberDivisionTwo = new SupremeCourtChamberDivision(); scChamberDivisionTwo.setName(scDivisionChamberNames[1]); Whitebox.setInternalState(scChamberDivisionTwo, "id", idTwo); List<SupremeCourtChamberDivision> scChamberDivisions = Arrays.asList(scChamberDivisionOne, scChamberDivisionTwo); List<SimpleEntity> convertedSimpleEntities = simpleEntityConverter.convertScChamberDivisions(scChamberDivisions); assertEquals(scChamberDivisions.size(), convertedSimpleEntities.size()); assertEquals(idOne, convertedSimpleEntities.get(0).getId()); assertEquals(idTwo, convertedSimpleEntities.get(1).getId()); assertEquals(scDivisionChamberNames[0], convertedSimpleEntities.get(0).getName()); assertEquals(scDivisionChamberNames[1], convertedSimpleEntities.get(1).getName()); }
public List<SimpleEntity> convertScChamberDivisions(List<SupremeCourtChamberDivision> scChamberDivisions) { return scChamberDivisions.stream() .map(scChamberDivision -> convertFromScChamberDivision(scChamberDivision)) .collect(Collectors.toList()); }
SimpleEntityConverter { public List<SimpleEntity> convertScChamberDivisions(List<SupremeCourtChamberDivision> scChamberDivisions) { return scChamberDivisions.stream() .map(scChamberDivision -> convertFromScChamberDivision(scChamberDivision)) .collect(Collectors.toList()); } }
SimpleEntityConverter { public List<SimpleEntity> convertScChamberDivisions(List<SupremeCourtChamberDivision> scChamberDivisions) { return scChamberDivisions.stream() .map(scChamberDivision -> convertFromScChamberDivision(scChamberDivision)) .collect(Collectors.toList()); }  }
SimpleEntityConverter { public List<SimpleEntity> convertScChamberDivisions(List<SupremeCourtChamberDivision> scChamberDivisions) { return scChamberDivisions.stream() .map(scChamberDivision -> convertFromScChamberDivision(scChamberDivision)) .collect(Collectors.toList()); }  List<SimpleEntity> convertCcDivisions(List<CommonCourtDivision> ccDivisions); List<SimpleEntity> convertScChambers(List<SupremeCourtChamber> scChambers); List<SimpleEntity> convertScChamberDivisions(List<SupremeCourtChamberDivision> scChamberDivisions); List<SimpleEntity> convertScJudgmentForms(List<SupremeCourtJudgmentForm> scJudgmentForms); }
SimpleEntityConverter { public List<SimpleEntity> convertScChamberDivisions(List<SupremeCourtChamberDivision> scChamberDivisions) { return scChamberDivisions.stream() .map(scChamberDivision -> convertFromScChamberDivision(scChamberDivision)) .collect(Collectors.toList()); }  List<SimpleEntity> convertCcDivisions(List<CommonCourtDivision> ccDivisions); List<SimpleEntity> convertScChambers(List<SupremeCourtChamber> scChambers); List<SimpleEntity> convertScChamberDivisions(List<SupremeCourtChamberDivision> scChamberDivisions); List<SimpleEntity> convertScJudgmentForms(List<SupremeCourtJudgmentForm> scJudgmentForms);  }