@Test public void convertCommonCourts_emptyList() { List<CommonCourt> commonCourts = Lists.newArrayList(); List<SimpleCommonCourt> convertedSimpleEntities = simpleCommonCourtConverter.convertCommonCourts(commonCourts); assertNotNull(convertedSimpleEntities); assertEquals(0, convertedSimpleEntities.size()); }
public List<SimpleCommonCourt> convertCommonCourts(List<CommonCourt> commonCourts) { if (CollectionUtils.isEmpty(commonCourts)) { return Lists.newArrayList(); } return commonCourts.stream() .map(commonCourt -> convertFromCommonCourt(commonCourt)) .collect(Collectors.toList()); }
SimpleCommonCourtConverter { public List<SimpleCommonCourt> convertCommonCourts(List<CommonCourt> commonCourts) { if (CollectionUtils.isEmpty(commonCourts)) { return Lists.newArrayList(); } return commonCourts.stream() .map(commonCourt -> convertFromCommonCourt(commonCourt)) .collect(Collectors.toList()); } }
SimpleCommonCourtConverter { public List<SimpleCommonCourt> convertCommonCourts(List<CommonCourt> commonCourts) { if (CollectionUtils.isEmpty(commonCourts)) { return Lists.newArrayList(); } return commonCourts.stream() .map(commonCourt -> convertFromCommonCourt(commonCourt)) .collect(Collectors.toList()); }  }
SimpleCommonCourtConverter { public List<SimpleCommonCourt> convertCommonCourts(List<CommonCourt> commonCourts) { if (CollectionUtils.isEmpty(commonCourts)) { return Lists.newArrayList(); } return commonCourts.stream() .map(commonCourt -> convertFromCommonCourt(commonCourt)) .collect(Collectors.toList()); }  List<SimpleCommonCourt> convertCommonCourts(List<CommonCourt> commonCourts); }
SimpleCommonCourtConverter { public List<SimpleCommonCourt> convertCommonCourts(List<CommonCourt> commonCourts) { if (CollectionUtils.isEmpty(commonCourts)) { return Lists.newArrayList(); } return commonCourts.stream() .map(commonCourt -> convertFromCommonCourt(commonCourt)) .collect(Collectors.toList()); }  List<SimpleCommonCourt> convertCommonCourts(List<CommonCourt> commonCourts);  }