XdsbRepositoryAdapter { public RetrieveDocumentSetResponse retrieveDocumentSet( DocumentRequest docRequest) { final RetrieveDocumentSetRequest request = createRetrieveDocumentSetRequest(docRequest); final RetrieveDocumentSetResponse retrieveDocumentSetResponse = retrieveDocumentSet(request); return retrieveDocumentSetResponse; } XdsbRepositoryAdapter();  XdsbRepositoryAdapter(XDSRepositorybWebServiceClient xdsbRepository,
			SimpleMarshaller marshaller,
			RetrieveDocumentSetResponseFilter responseFilter,
			XmlTransformer xmlTransformer); RegistryResponse provideAndRegisterDocumentSet(
			ProvideAndRegisterDocumentSetRequest provideAndRegisterDocumentSetRequest); @Deprecated RegistryResponse provideAndRegisterDocumentSet(
			String documentXmlString, String homeCommunityId,
			XdsbDocumentType documentTypeForXdsbMetadata,
			String patientUniqueId, String entryUUID); RegistryResponse provideAndRegisterDocumentSet(
			String documentXmlString,
			XdsbDocumentType documentTypeForXdsbMetadata, Params params); RetrieveDocumentSetResponse retrieveDocumentSet(
			DocumentRequest docRequest); RetrieveDocumentSetResponse retrieveDocumentSet(
			List<DocumentRequest> docRequest); RetrieveDocumentSetResponse retrieveDocumentSet(
			RetrieveDocumentSetRequest request); RetrieveDocumentSetResponse retrieveDocumentSet(
			RetrieveDocumentSetRequest request, String patientId,
			String authorNPI); RetrieveDocumentSetResponse retrieveDocumentSet(
			String documentUniqueId, String repositoryId); static final String EMPTY_XML_DOCUMENT; }
@Test public void testretrieveDocumentSet() throws XdsbRepositoryAdapterException { final RetrieveDocumentSetRequest request = mock(RetrieveDocumentSetRequest.class); final RetrieveDocumentSetResponse response = new RetrieveDocumentSetResponse(); when(xdsbRepositoryMock.retrieveDocumentSet(request)).thenReturn( response); when(responseFilterMock.filterByPatientAndAuthor(response, "1", "123")) .thenReturn(response); final RetrieveDocumentSetResponse responseActual = xdsbRepositoryAdapterSpy .retrieveDocumentSet(request, "1", "123"); assertEquals(response, responseActual); }
@Test public void testRetrieveDocumentSet() { final DocumentRequest documentRequest = mock(DocumentRequest.class); final RetrieveDocumentSetRequest requestExpected = new RetrieveDocumentSetRequest(); requestExpected.getDocumentRequest().add(documentRequest); final RetrieveDocumentSetResponse retrieveDocumentSetResponseExpected = xdsbRepositoryMock .retrieveDocumentSet(requestExpected); final RetrieveDocumentSetResponse retrieveDocumentSetResponseActual = xdsbRepositoryAdapterSpy .retrieveDocumentSet(documentRequest); assertEquals(retrieveDocumentSetResponseExpected, retrieveDocumentSetResponseActual); }
@Test public void testRetrieveDocumentSet_set() { final List<DocumentRequest> docRequest = new ArrayList(); final DocumentRequest documentRequest = mock(DocumentRequest.class); final DocumentRequest documentRequest2 = mock(DocumentRequest.class); docRequest.add(documentRequest); docRequest.add(documentRequest2); final RetrieveDocumentSetRequest requestExpected = new RetrieveDocumentSetRequest(); requestExpected.getDocumentRequest().addAll(docRequest); final RetrieveDocumentSetResponse retrieveDocumentSetResponseExpected = xdsbRepositoryMock .retrieveDocumentSet(requestExpected); final RetrieveDocumentSetResponse retrieveDocumentSetResponseActual = xdsbRepositoryAdapterSpy .retrieveDocumentSet(docRequest); assertEquals(retrieveDocumentSetResponseExpected, retrieveDocumentSetResponseActual); }
@Test public void testRetrieveDocumentSetRequest_Given_RetrieveDocumentSetRequest() { final RetrieveDocumentSetRequest retrieveDocumentSetRequest = new RetrieveDocumentSetRequest(); final RetrieveDocumentSetResponse retrieveDocumentSetResponse = new RetrieveDocumentSetResponse(); when(xdsbRepositoryMock.retrieveDocumentSet(retrieveDocumentSetRequest)) .thenReturn(retrieveDocumentSetResponse); final RetrieveDocumentSetResponse actualResponse = xdsbRepositoryAdapterSpy .retrieveDocumentSet(retrieveDocumentSetRequest); assertEquals(retrieveDocumentSetResponse, actualResponse); }