@Test public void testFindConsentEntries() { @SuppressWarnings("unchecked") Page<Consent> consentList = mock(Page.class); when( consentRepository .findAll(any(org.springframework.data.domain.PageRequest.class))) .thenReturn(consentList); Object object = cst.findConsentEntries(0, 5); verify(consentRepository).findAll( any(org.springframework.data.domain.PageRequest.class)); assertEquals("java.util.LinkedList", object.getClass().getName()); }
@Override @Transactional(readOnly = true) public List<Consent> findConsentEntries(int firstResult, int maxResults) { return consentRepository.findAll( new org.springframework.data.domain.PageRequest(firstResult / maxResults, maxResults)).getContent(); }
ConsentServiceImpl implements ConsentService { @Override @Transactional(readOnly = true) public List<Consent> findConsentEntries(int firstResult, int maxResults) { return consentRepository.findAll( new org.springframework.data.domain.PageRequest(firstResult / maxResults, maxResults)).getContent(); } }
ConsentServiceImpl implements ConsentService { @Override @Transactional(readOnly = true) public List<Consent> findConsentEntries(int firstResult, int maxResults) { return consentRepository.findAll( new org.springframework.data.domain.PageRequest(firstResult / maxResults, maxResults)).getContent(); } ConsentServiceImpl(
			String c2sDomainId,
			String c2sDomainType,
			ConsentRepository consentRepository,
			ConsentPdfGenerator consentPdfGenerator,
			PatientRepository patientRepository,
			IndividualProviderRepository individualProviderRepository,
			OrganizationalProviderRepository organizationalProviderRepository,
			ClinicalDocumentTypeCodeRepository clinicalDocumentTypeCodeRepository,
			MedicalSectionRepository medicalSectionRepository,
			ValueSetCategoryRepository valueSetCategoryRepository,
			PurposeOfUseCodeRepository purposeOfUseCodeRepository,
			EchoSignSignatureService echoSignSignatureService,
			UserContext userContext,
			AbstractConsentRevokationPdfGenerator consentRevokationPdfGenerator,
			ConsentExportService consentExportService,
			TryPolicyService tryPolicyService, ConsentBuilder consentBuilder,
			ConsentFactory consentFactory,
			ConsentCheckService consentCheckService,
			Set<ConsentAssertion> consentAssertions,
			PolicyIdService policyIdService, XmlTransformer xmlTransformer,
			DocumentXmlConverter documentXmlConverter,
			DocumentAccessor documentAccessor); }
ConsentServiceImpl implements ConsentService { @Override @Transactional(readOnly = true) public List<Consent> findConsentEntries(int firstResult, int maxResults) { return consentRepository.findAll( new org.springframework.data.domain.PageRequest(firstResult / maxResults, maxResults)).getContent(); } ConsentServiceImpl(
			String c2sDomainId,
			String c2sDomainType,
			ConsentRepository consentRepository,
			ConsentPdfGenerator consentPdfGenerator,
			PatientRepository patientRepository,
			IndividualProviderRepository individualProviderRepository,
			OrganizationalProviderRepository organizationalProviderRepository,
			ClinicalDocumentTypeCodeRepository clinicalDocumentTypeCodeRepository,
			MedicalSectionRepository medicalSectionRepository,
			ValueSetCategoryRepository valueSetCategoryRepository,
			PurposeOfUseCodeRepository purposeOfUseCodeRepository,
			EchoSignSignatureService echoSignSignatureService,
			UserContext userContext,
			AbstractConsentRevokationPdfGenerator consentRevokationPdfGenerator,
			ConsentExportService consentExportService,
			TryPolicyService tryPolicyService, ConsentBuilder consentBuilder,
			ConsentFactory consentFactory,
			ConsentCheckService consentCheckService,
			Set<ConsentAssertion> consentAssertions,
			PolicyIdService policyIdService, XmlTransformer xmlTransformer,
			DocumentXmlConverter documentXmlConverter,
			DocumentAccessor documentAccessor); @Override void addUnsignedConsentRevokationPdf(Long consentId,
			String revokationType); @Override @SuppressWarnings({ "rawtypes", "unchecked" }) boolean areThereDuplicatesInTwoSets(Set set1, Set set2); List<ConsentListDto> consentListToConsentListDtosConverter(
			List<Consent> consents); @Override long countAllConsents(); @Override String createConsentEmbeddedWidget(ConsentPdfDto consentPdfDto); @Override String createRevocationEmbeddedWidget(
			ConsentRevokationPdfDto consentRevokationPdfDto); @Override void deleteConsent(Consent consent); @Override boolean deleteConsent(Long consentId); @Override @Transactional(readOnly = true) List<Consent> findAllConsents(); @Override // @PreAuthorize("ROLE_USER") @Transactional(readOnly = true) List<ConsentListDto> findAllConsentsDtoByPatient(Long patientId); @Override @Transactional(readOnly = true) List<ConsentListDto> findAllConsentsDtoByUserName(String userName); @Override @Transactional(readOnly = true) Consent findConsent(Long id); @Override @Transactional(readOnly = true) ConsentDto findConsentById(Long consentId); @Override @Transactional(readOnly = true) AbstractPdfDto findConsentContentDto(Long consentId); @Override @Transactional(readOnly = true) List<Consent> findConsentEntries(int firstResult, int maxResults); @Override @Transactional(readOnly = true) ConsentPdfDto findConsentPdfDto(Long consentId); @Override @Transactional(readOnly = true) ConsentRevokationPdfDto findConsentRevokationPdfDto(Long consentId); @Override @Transactional(readOnly = true) String getConsentSignedStage(Long consentId); List<String> getIds(NodeList c32List); List<String> getIdsToTag(List<String> originalC32Ids,
			List<String> segmentedC32Ids); @Override String getTaggedC32(String originalC32, Long consentId,
			String purposeOfUse); @Override @Transactional(readOnly = true) byte[] getXacmlCcd(Long consentId); @Override @Transactional(readOnly = true) boolean isConsentBelongToThisUser(Long consentId, Long patientId); @Override Consent makeConsent(); @Override ConsentDto makeConsentDto(); @Override ArrayList<ConsentListDto> makeConsentListDtos(); @Override ConsentPdfDto makeConsentPdfDto(); @Override ConsentRevokationPdfDto makeConsentRevokationPdfDto(); @Override SignedPDFConsent makeSignedPdfConsent(); @Override SignedPDFConsentRevocation makeSignedPDFConsentRevocation(); @Override void saveConsent(Consent consent); @Override Object saveConsent(ConsentDto consentDto, long patientId); @Override boolean signConsent(ConsentPdfDto consentPdfDto); @Override void signConsentRevokation(
			ConsentRevokationPdfDto consentRevokationPdfDto); void tagC32Document(NodeList taggedC32List, List<String> taggedC32Ids); void tagSmartC32Document(NodeList taggedC32List,
			List<String> taggedC32Ids); @Override Consent updateConsent(Consent consent); @Override boolean validateConsentDate(Date startDate, Date endDate); }
ConsentServiceImpl implements ConsentService { @Override @Transactional(readOnly = true) public List<Consent> findConsentEntries(int firstResult, int maxResults) { return consentRepository.findAll( new org.springframework.data.domain.PageRequest(firstResult / maxResults, maxResults)).getContent(); } ConsentServiceImpl(
			String c2sDomainId,
			String c2sDomainType,
			ConsentRepository consentRepository,
			ConsentPdfGenerator consentPdfGenerator,
			PatientRepository patientRepository,
			IndividualProviderRepository individualProviderRepository,
			OrganizationalProviderRepository organizationalProviderRepository,
			ClinicalDocumentTypeCodeRepository clinicalDocumentTypeCodeRepository,
			MedicalSectionRepository medicalSectionRepository,
			ValueSetCategoryRepository valueSetCategoryRepository,
			PurposeOfUseCodeRepository purposeOfUseCodeRepository,
			EchoSignSignatureService echoSignSignatureService,
			UserContext userContext,
			AbstractConsentRevokationPdfGenerator consentRevokationPdfGenerator,
			ConsentExportService consentExportService,
			TryPolicyService tryPolicyService, ConsentBuilder consentBuilder,
			ConsentFactory consentFactory,
			ConsentCheckService consentCheckService,
			Set<ConsentAssertion> consentAssertions,
			PolicyIdService policyIdService, XmlTransformer xmlTransformer,
			DocumentXmlConverter documentXmlConverter,
			DocumentAccessor documentAccessor); @Override void addUnsignedConsentRevokationPdf(Long consentId,
			String revokationType); @Override @SuppressWarnings({ "rawtypes", "unchecked" }) boolean areThereDuplicatesInTwoSets(Set set1, Set set2); List<ConsentListDto> consentListToConsentListDtosConverter(
			List<Consent> consents); @Override long countAllConsents(); @Override String createConsentEmbeddedWidget(ConsentPdfDto consentPdfDto); @Override String createRevocationEmbeddedWidget(
			ConsentRevokationPdfDto consentRevokationPdfDto); @Override void deleteConsent(Consent consent); @Override boolean deleteConsent(Long consentId); @Override @Transactional(readOnly = true) List<Consent> findAllConsents(); @Override // @PreAuthorize("ROLE_USER") @Transactional(readOnly = true) List<ConsentListDto> findAllConsentsDtoByPatient(Long patientId); @Override @Transactional(readOnly = true) List<ConsentListDto> findAllConsentsDtoByUserName(String userName); @Override @Transactional(readOnly = true) Consent findConsent(Long id); @Override @Transactional(readOnly = true) ConsentDto findConsentById(Long consentId); @Override @Transactional(readOnly = true) AbstractPdfDto findConsentContentDto(Long consentId); @Override @Transactional(readOnly = true) List<Consent> findConsentEntries(int firstResult, int maxResults); @Override @Transactional(readOnly = true) ConsentPdfDto findConsentPdfDto(Long consentId); @Override @Transactional(readOnly = true) ConsentRevokationPdfDto findConsentRevokationPdfDto(Long consentId); @Override @Transactional(readOnly = true) String getConsentSignedStage(Long consentId); List<String> getIds(NodeList c32List); List<String> getIdsToTag(List<String> originalC32Ids,
			List<String> segmentedC32Ids); @Override String getTaggedC32(String originalC32, Long consentId,
			String purposeOfUse); @Override @Transactional(readOnly = true) byte[] getXacmlCcd(Long consentId); @Override @Transactional(readOnly = true) boolean isConsentBelongToThisUser(Long consentId, Long patientId); @Override Consent makeConsent(); @Override ConsentDto makeConsentDto(); @Override ArrayList<ConsentListDto> makeConsentListDtos(); @Override ConsentPdfDto makeConsentPdfDto(); @Override ConsentRevokationPdfDto makeConsentRevokationPdfDto(); @Override SignedPDFConsent makeSignedPdfConsent(); @Override SignedPDFConsentRevocation makeSignedPDFConsentRevocation(); @Override void saveConsent(Consent consent); @Override Object saveConsent(ConsentDto consentDto, long patientId); @Override boolean signConsent(ConsentPdfDto consentPdfDto); @Override void signConsentRevokation(
			ConsentRevokationPdfDto consentRevokationPdfDto); void tagC32Document(NodeList taggedC32List, List<String> taggedC32Ids); void tagSmartC32Document(NodeList taggedC32List,
			List<String> taggedC32Ids); @Override Consent updateConsent(Consent consent); @Override boolean validateConsentDate(Date startDate, Date endDate);  }