AdapterComponentDocRepositoryOrchImpl { protected void setDocumentPidObjects(DocumentMetadata doc, List<SlotType1> documentSlots) { String pid3 = docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID3); doc.setPid3(pid3); String pid5 = docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID5); doc.setPid5(pid5); String pid7 = docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID7); doc.setPid7(pid7); String pid8 = docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID8); doc.setPid8(pid8); String pid11 = docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID11); doc.setPid11(pid11); LOG.debug("pid3: {}, pid5: {}, pid7: {}, pid8: {}, pid11: {}.", pid3, pid5, pid7, pid8, pid11); } AdapterComponentDocRepositoryOrchImpl(); DocumentService getDocumentService(); LargeFileUtils getLargeFileUtils(); UTCDateUtil getDateUtil(); RetrieveDocumentSetResponseType documentRepositoryRetrieveDocumentSet(RetrieveDocumentSetRequestType body); RegistryResponseType registerDocumentSet(RegisterDocumentSetRequestType body); RegistryResponseType documentRepositoryProvideAndRegisterDocumentSet(
        ProvideAndRegisterDocumentSetRequestType body); DocumentMetadata saveExtrinsicObject(ExtrinsicObjectType extrinsicObject, RegistryErrorList errorList,
        Map<String, DataHandler> docMap, boolean hasReplacementRequest);  }
@Test public void testSetDocumentPidObjects() { final AdapterComponentDocRepositoryHelper docRepoHelper = mock(AdapterComponentDocRepositoryHelper.class); AdapterComponentDocRepositoryOrchImpl docRepo = new AdapterComponentDocRepositoryOrchImpl() { @Override protected AdapterComponentDocRepositoryHelper getHelper() { return docRepoHelper; } }; final List<SlotType1> documentSlots = mock(ArrayList.class); DocumentMetadata doc = new DocumentMetadata(); final String PID3 = "PID3"; final String PID5 = "PID5"; final String PID7 = "PID7"; final String PID8 = "PID8"; final String PID11 = "PID11"; when(docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID3)) .thenReturn(PID3); when(docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID5)) .thenReturn(PID5); when(docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID7)) .thenReturn(PID7); when(docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID8)) .thenReturn(PID8); when(docRepoHelper.extractPatientInfo(documentSlots, DocRepoConstants.XDS_SOURCE_PATIENT_INFO_PID11)) .thenReturn(PID11); docRepo.setDocumentPidObjects(doc, documentSlots); assertEquals(PID3, doc.getPid3()); assertEquals(PID5, doc.getPid5()); assertEquals(PID7, doc.getPid7()); assertEquals(PID8, doc.getPid8()); assertEquals(PID11, doc.getPid11()); }