@Test public void testFindAllPatientLegalRepresentativeDto() { patientLegalRepresentativeAssociationService .findAllPatientLegalRepresentativeDto(); verify(patientRepository).findByUsername(anyString()); verify(patientLegalRepresentativeAssociationRepository).findAll(); }
@Override public List<PatientProfileDto> findAllPatientLegalRepresentativeDto() { List<PatientProfileDto> legalRepDtos = new ArrayList<PatientProfileDto>(); List<PatientLegalRepresentativeAssociationDto> associationDtos = findAllPatientLegalRepresentativeAssociationDtos(); for (PatientLegalRepresentativeAssociationDto associationDto : associationDtos) { Patient patient = patientRepository.findOne(associationDto .getLegalRepresentativeId()); PatientProfileDto legalRepDto = modelMapper.map(patient, PatientProfileDto.class); legalRepDtos.add(legalRepDto); } return legalRepDtos; }
PatientLegalRepresentativeAssociationServiceImpl implements
		PatientLegalRepresentativeAssociationService { @Override public List<PatientProfileDto> findAllPatientLegalRepresentativeDto() { List<PatientProfileDto> legalRepDtos = new ArrayList<PatientProfileDto>(); List<PatientLegalRepresentativeAssociationDto> associationDtos = findAllPatientLegalRepresentativeAssociationDtos(); for (PatientLegalRepresentativeAssociationDto associationDto : associationDtos) { Patient patient = patientRepository.findOne(associationDto .getLegalRepresentativeId()); PatientProfileDto legalRepDto = modelMapper.map(patient, PatientProfileDto.class); legalRepDtos.add(legalRepDto); } return legalRepDtos; } }
PatientLegalRepresentativeAssociationServiceImpl implements
		PatientLegalRepresentativeAssociationService { @Override public List<PatientProfileDto> findAllPatientLegalRepresentativeDto() { List<PatientProfileDto> legalRepDtos = new ArrayList<PatientProfileDto>(); List<PatientLegalRepresentativeAssociationDto> associationDtos = findAllPatientLegalRepresentativeAssociationDtos(); for (PatientLegalRepresentativeAssociationDto associationDto : associationDtos) { Patient patient = patientRepository.findOne(associationDto .getLegalRepresentativeId()); PatientProfileDto legalRepDto = modelMapper.map(patient, PatientProfileDto.class); legalRepDtos.add(legalRepDto); } return legalRepDtos; } PatientLegalRepresentativeAssociationServiceImpl(
			PatientLegalRepresentativeAssociationRepository patientLegalRepresentativeAssociationRepository,
			PatientRepository patientRepository,
			LegalRepresentativeTypeCodeRepository legalRepresentativeTypeCodeRepository,
			ModelMapper modelMapper, UserContext userContext); }
PatientLegalRepresentativeAssociationServiceImpl implements
		PatientLegalRepresentativeAssociationService { @Override public List<PatientProfileDto> findAllPatientLegalRepresentativeDto() { List<PatientProfileDto> legalRepDtos = new ArrayList<PatientProfileDto>(); List<PatientLegalRepresentativeAssociationDto> associationDtos = findAllPatientLegalRepresentativeAssociationDtos(); for (PatientLegalRepresentativeAssociationDto associationDto : associationDtos) { Patient patient = patientRepository.findOne(associationDto .getLegalRepresentativeId()); PatientProfileDto legalRepDto = modelMapper.map(patient, PatientProfileDto.class); legalRepDtos.add(legalRepDto); } return legalRepDtos; } PatientLegalRepresentativeAssociationServiceImpl(
			PatientLegalRepresentativeAssociationRepository patientLegalRepresentativeAssociationRepository,
			PatientRepository patientRepository,
			LegalRepresentativeTypeCodeRepository legalRepresentativeTypeCodeRepository,
			ModelMapper modelMapper, UserContext userContext); @Override long countAllPatientLegalRepresentativeAssociations(); @Override void deletePatientLegalRepresentativeAssociation(
			PatientLegalRepresentativeAssociation patientLegalRepresentativeAssociation); @Override void deletePatientLegalRepresentativeById(Long legalRepId); @Override PatientLegalRepresentativeAssociation findPatientLegalRepresentativeAssociation(
			Long id); @Override List<PatientLegalRepresentativeAssociation> findAllPatientLegalRepresentativeAssociations(); @Override List<PatientLegalRepresentativeAssociationDto> findAllPatientLegalRepresentativeAssociationDtos(); @Override List<PatientProfileDto> findAllPatientLegalRepresentativeDto(); @Override List<PatientLegalRepresentativeAssociation> findPatientLegalRepresentativeAssociationEntries(
			int firstResult, int maxResults); @Override void savePatientLegalRepresentativeAssociation(
			PatientLegalRepresentativeAssociation patientLegalRepresentativeAssociation); @Override void savePatientLegalRepresentativeAssociationDto(
			PatientLegalRepresentativeAssociationDto patientLegalRepresentativeAssociationDto); @Override PatientLegalRepresentativeAssociation updatePatientLegalRepresentativeAssociation(
			PatientLegalRepresentativeAssociation patientLegalRepresentativeAssociation); @Override void updatePatientLegalRepresentativeAssociationDto(
			PatientLegalRepresentativeAssociationDto patientLegalRepresentativeAssociationDto); @Override List<LegalRepresentativeDto> getAllLegalRepresentativeDto(); @Override PatientLegalRepresentativeAssociationDto getAssociationDtoFromLegalRepresentativeDto(
			LegalRepresentativeDto legalRepresentativeDto); @Override PatientProfileDto getPatientDtoFromLegalRepresentativeDto(
			LegalRepresentativeDto legalRepresentativeDto); }
PatientLegalRepresentativeAssociationServiceImpl implements
		PatientLegalRepresentativeAssociationService { @Override public List<PatientProfileDto> findAllPatientLegalRepresentativeDto() { List<PatientProfileDto> legalRepDtos = new ArrayList<PatientProfileDto>(); List<PatientLegalRepresentativeAssociationDto> associationDtos = findAllPatientLegalRepresentativeAssociationDtos(); for (PatientLegalRepresentativeAssociationDto associationDto : associationDtos) { Patient patient = patientRepository.findOne(associationDto .getLegalRepresentativeId()); PatientProfileDto legalRepDto = modelMapper.map(patient, PatientProfileDto.class); legalRepDtos.add(legalRepDto); } return legalRepDtos; } PatientLegalRepresentativeAssociationServiceImpl(
			PatientLegalRepresentativeAssociationRepository patientLegalRepresentativeAssociationRepository,
			PatientRepository patientRepository,
			LegalRepresentativeTypeCodeRepository legalRepresentativeTypeCodeRepository,
			ModelMapper modelMapper, UserContext userContext); @Override long countAllPatientLegalRepresentativeAssociations(); @Override void deletePatientLegalRepresentativeAssociation(
			PatientLegalRepresentativeAssociation patientLegalRepresentativeAssociation); @Override void deletePatientLegalRepresentativeById(Long legalRepId); @Override PatientLegalRepresentativeAssociation findPatientLegalRepresentativeAssociation(
			Long id); @Override List<PatientLegalRepresentativeAssociation> findAllPatientLegalRepresentativeAssociations(); @Override List<PatientLegalRepresentativeAssociationDto> findAllPatientLegalRepresentativeAssociationDtos(); @Override List<PatientProfileDto> findAllPatientLegalRepresentativeDto(); @Override List<PatientLegalRepresentativeAssociation> findPatientLegalRepresentativeAssociationEntries(
			int firstResult, int maxResults); @Override void savePatientLegalRepresentativeAssociation(
			PatientLegalRepresentativeAssociation patientLegalRepresentativeAssociation); @Override void savePatientLegalRepresentativeAssociationDto(
			PatientLegalRepresentativeAssociationDto patientLegalRepresentativeAssociationDto); @Override PatientLegalRepresentativeAssociation updatePatientLegalRepresentativeAssociation(
			PatientLegalRepresentativeAssociation patientLegalRepresentativeAssociation); @Override void updatePatientLegalRepresentativeAssociationDto(
			PatientLegalRepresentativeAssociationDto patientLegalRepresentativeAssociationDto); @Override List<LegalRepresentativeDto> getAllLegalRepresentativeDto(); @Override PatientLegalRepresentativeAssociationDto getAssociationDtoFromLegalRepresentativeDto(
			LegalRepresentativeDto legalRepresentativeDto); @Override PatientProfileDto getPatientDtoFromLegalRepresentativeDto(
			LegalRepresentativeDto legalRepresentativeDto);  }