Source:
private void checkListMapping(final List<SeasonProfile> seasonProfileList, final List<SeasonProfileDto> seasonProfileDtoList) { assertNotNull(seasonProfileList); assertNotNull(seasonProfileDtoList); assertEquals(seasonProfileList.size(), seasonProfileDtoList.size()); assertFalse(seasonProfileList.isEmpty()); assertFalse(seasonProfileDtoList.isEmpty()); assertEquals(seasonProfileList.isEmpty(), seasonProfileDtoList.isEmpty()); final SeasonProfile seasonProfile = seasonProfileList.get(0); final SeasonProfileDto seasonProfileDto = seasonProfileDtoList.get(0); assertEquals(seasonProfile.getSeasonProfileName(), seasonProfileDto.getSeasonProfileName()); this.checkCosemDateTimeMapping(seasonProfile.getSeasonStart(), seasonProfileDto.getSeasonStart()); final WeekProfile weekProfile = seasonProfile.getWeekProfile(); final WeekProfileDto weekProfileDto = seasonProfileDto.getWeekProfile(); assertEquals(weekProfile.getWeekProfileName(), weekProfileDto.getWeekProfileName()); final DayProfile dayProfile = weekProfile.getMonday(); final DayProfileDto dayProfileDto = weekProfileDto.getMonday(); assertEquals(dayProfile.getDayId(), dayProfileDto.getDayId()); assertEquals(dayProfile.getDayProfileActionList().size(), dayProfile.getDayProfileActionList().size()); final DayProfileAction dayProfileAction = dayProfile.getDayProfileActionList().get(0); final DayProfileActionDto dayProfileActionDto = dayProfileDto.getDayProfileActionList().get(0); assertEquals(dayProfileAction.getScriptSelector(), dayProfileActionDto.getScriptSelector()); final CosemTime cosemTime = dayProfileAction.getStartTime(); final CosemTimeDto cosemTimeDto = dayProfileActionDto.getStartTime(); assertEquals(cosemTime.getHour(), cosemTimeDto.getHour()); assertEquals(cosemTime.getMinute(), cosemTimeDto.getMinute()); assertEquals(cosemTime.getSecond(), cosemTimeDto.getSecond()); assertEquals(cosemTime.getHundredths(), cosemTimeDto.getHundredths()); }

Target:
private void checkListMapping(final List<SeasonProfile> seasonProfileList, final List<SeasonProfileDto> seasonProfileDtoList) { assertNotNull(seasonProfileList); assertNotNull(seasonProfileDtoList); assertEquals(seasonProfileList.size(), seasonProfileDtoList.size()); assertFalse(seasonProfileList.isEmpty()); assertFalse(seasonProfileDtoList.isEmpty()); final SeasonProfile seasonProfile = seasonProfileList.get(0); final SeasonProfileDto seasonProfileDto = seasonProfileDtoList.get(0); assertEquals(seasonProfile.getSeasonProfileName(), seasonProfileDto.getSeasonProfileName()); this.checkCosemDateTimeMapping(seasonProfile.getSeasonStart(), seasonProfileDto.getSeasonStart()); final WeekProfile weekProfile = seasonProfile.getWeekProfile(); final WeekProfileDto weekProfileDto = seasonProfileDto.getWeekProfile(); assertEquals(weekProfile.getWeekProfileName(), weekProfileDto.getWeekProfileName()); final DayProfile dayProfile = weekProfile.getMonday(); final DayProfileDto dayProfileDto = weekProfileDto.getMonday(); assertEquals(dayProfile.getDayId(), dayProfileDto.getDayId()); assertEquals(dayProfile.getDayProfileActionList().size(), dayProfile.getDayProfileActionList().size()); final DayProfileAction dayProfileAction = dayProfile.getDayProfileActionList().get(0); final DayProfileActionDto dayProfileActionDto = dayProfileDto.getDayProfileActionList().get(0); assertEquals(dayProfileAction.getScriptSelector(), dayProfileActionDto.getScriptSelector()); final CosemTime cosemTime = dayProfileAction.getStartTime(); final CosemTimeDto cosemTimeDto = dayProfileActionDto.getStartTime(); assertEquals(cosemTime.getHour(), cosemTimeDto.getHour()); assertEquals(cosemTime.getMinute(), cosemTimeDto.getMinute()); assertEquals(cosemTime.getSecond(), cosemTimeDto.getSecond()); assertEquals(cosemTime.getHundredths(), cosemTimeDto.getHundredths()); }