@Test public void testDeletePatientLegalRepresentativeById() { patientLegalRepresentativeAssociationService .deletePatientLegalRepresentativeById(anyLong()); verify(patientRepository).findOne(anyLong()); verify(patientLegalRepresentativeAssociationRepository) .findByPatientLegalRepresentativeAssociationPkLegalRepresentativeId( anyLong()); verify(patientRepository).delete(any(Patient.class)); }
@Override public void deletePatientLegalRepresentativeById(Long legalRepId) { deletePatientLegalRepresentativeAssociationById(legalRepId); Patient legalRep = patientRepository.findOne(legalRepId); patientRepository.delete(legalRep); }
PatientLegalRepresentativeAssociationServiceImpl implements
		PatientLegalRepresentativeAssociationService { @Override public void deletePatientLegalRepresentativeById(Long legalRepId) { deletePatientLegalRepresentativeAssociationById(legalRepId); Patient legalRep = patientRepository.findOne(legalRepId); patientRepository.delete(legalRep); } }
PatientLegalRepresentativeAssociationServiceImpl implements
		PatientLegalRepresentativeAssociationService { @Override public void deletePatientLegalRepresentativeById(Long legalRepId) { deletePatientLegalRepresentativeAssociationById(legalRepId); Patient legalRep = patientRepository.findOne(legalRepId); patientRepository.delete(legalRep); } PatientLegalRepresentativeAssociationServiceImpl(
			PatientLegalRepresentativeAssociationRepository patientLegalRepresentativeAssociationRepository,
			PatientRepository patientRepository,
			LegalRepresentativeTypeCodeRepository legalRepresentativeTypeCodeRepository,
			ModelMapper modelMapper, UserContext userContext); }
PatientLegalRepresentativeAssociationServiceImpl implements
		PatientLegalRepresentativeAssociationService { @Override public void deletePatientLegalRepresentativeById(Long legalRepId) { deletePatientLegalRepresentativeAssociationById(legalRepId); Patient legalRep = patientRepository.findOne(legalRepId); patientRepository.delete(legalRep); } 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 void deletePatientLegalRepresentativeById(Long legalRepId) { deletePatientLegalRepresentativeAssociationById(legalRepId); Patient legalRep = patientRepository.findOne(legalRepId); patientRepository.delete(legalRep); } 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);  }