Source:
<code>public void pageFindByCandidateEntityShouldFindThreeApplicationForCandidateWithThreeApplication() throws ParseException { CandidateEntity candidateEntityC = this.candidateRepository.findOne(CANDIDATE_C_ID); ChannelEntity expectedChannelEntity = ChannelEntity.builder() .id(2L) .name("profession hírdetés") .build(); ChannelEntity expectedSecondChannelEntity = ChannelEntity.builder() .id(3L) .name("profession adatbázis") .build(); ChannelEntity expectedThirdChannelEntity = ChannelEntity.builder() .id(4L) .name("facebook") .build(); <START> PositionEntity expectedPositionEntity = PositionEntity.builder() <END> .id(1L) .name("Fejlesztő") .build(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date expectedDate = simpleDateFormat.parse("2016-07-26 11:48:55"); Page<ApplicationEntity> pageResult = this.repository.findByCandidateEntity(candidateEntityC, DEFAULT_PAGE_REQUEST); List<ApplicationEntity> result = pageResult.getContent(); assertThat(pageResult.getTotalPages(), is(1)); assertThat(pageResult.getTotalElements(), is(3L)); assertThat(result, notNullValue()); assertThat(result.size(), is(3)); assertApplicationEntity(result.get(0), candidateEntityC, expectedChannelEntity, expectedPositionEntity, expectedDate); assertApplicationEntity(result.get(1), candidateEntityC, expectedSecondChannelEntity, expectedPositionEntity, expectedDate); assertApplicationEntity(result.get(2), candidateEntityC, expectedThirdChannelEntity, expectedPositionEntity, expectedDate); }</code><technical_language>local variables final</technical_language>

Target:
public void pageFindByCandidateEntityShouldFindThreeApplicationForCandidateWithThreeApplication() throws ParseException { final CandidateEntity candidateEntityC = this.candidateRepository.findOne(CANDIDATE_C_ID); final ChannelEntity expectedChannelEntity = ChannelEntity.builder() .id(2L) .name(CHANNEL_NAME_PROFESSION_ADVERTISEMENT) .deleted(false) .build(); final ChannelEntity expectedSecondChannelEntity = ChannelEntity.builder() .id(3L) .name(CHANNEL_NAME_PROFESSION_DATABASE) .deleted(false) .build(); final ChannelEntity expectedThirdChannelEntity = ChannelEntity.builder() .id(4L) .name(CHANNEL_NAME_FACEBOOK) .deleted(false) .build(); final PositionEntity expectedPositionEntity = PositionEntity.builder() .id(1L) .name(POSITION_NAME_DEVELOPER) .deleted(false) .build(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN); final Date expectedDate = simpleDateFormat.parse(DATE_SAMPLE); final Page<ApplicationEntity> pageResult = this.repository.findByCandidateEntity(candidateEntityC, DEFAULT_PAGE_REQUEST); final List<ApplicationEntity> result = pageResult.getContent(); assertThat(pageResult.getTotalPages(), is(1)); assertThat(pageResult.getTotalElements(), is(3L)); assertThat(result, notNullValue()); assertThat(result.size(), is(3)); assertApplicationEntity(result.get(0), candidateEntityC, expectedChannelEntity, expectedPositionEntity, expectedDate); assertApplicationEntity(result.get(1), candidateEntityC, expectedSecondChannelEntity, expectedPositionEntity, expectedDate); assertApplicationEntity(result.get(2), candidateEntityC, expectedThirdChannelEntity, expectedPositionEntity, expectedDate); }