XdsbRepositoryServiceImpl implements XdsbRepositoryService { @Override public RegistryResponse provideAndRegisterDocumentSet( String documentXmlString, String domainId, XdsbDocumentType xdsbDocumentType) { RegistryResponse response = null; try { response = xdsbRepository.provideAndRegisterDocumentSet( documentXmlString, xdsbDocumentType, ParamsBuilder.withParam(HomeCommunityId_Parameter_Name, domainId)); } catch (final Throwable e) { logger.error(e.getMessage(), e); throw new AcsShowCaseException( "XdsbRepositoryService failed! Cannot invoke the provideAndRegisterDocumentSet operation on xdsbRepository!"); } return response; } @Autowired  XdsbRepositoryServiceImpl(
			@Value("${xdsbRepositoryEndpointAddress}") String endpointAddress,
			SimpleMarshaller marshaller,
			RetrieveDocumentSetResponseFilter responseFilter,
			XmlTransformer xmlTransformer); @Override RegistryResponse provideAndRegisterDocumentSet(
			String documentXmlString, String domainId,
			XdsbDocumentType xdsbDocumentType);  }
@Ignore("Deprecated API") @Test public void testProvideAndRegisterDocumentSet() throws Throwable { sut.setXdsbRepository(xdsbRepositoryAdapterMock); String documentXmlStringMock = "documentXmlStringMock"; String domainIdMock = "domainIdMock"; XdsbDocumentType xdsbDocumentTypeMock = XdsbDocumentType.CLINICAL_DOCUMENT; when( xdsbRepositoryAdapterMock.provideAndRegisterDocumentSet( documentXmlStringMock, domainIdMock, xdsbDocumentTypeMock, null, null)).thenReturn( registryResponseMock); RegistryResponse actualResponse = sut.provideAndRegisterDocumentSet( documentXmlStringMock, domainIdMock, xdsbDocumentTypeMock); assertEquals(registryResponseMock, actualResponse); }
@Test @Ignore("Deprecated API") public void testProvideAndRegisterDocumentSet() throws Throwable { sut.setXdsbRepository(xdsbRepositoryAdapterMock); String documentXmlStringMock = "documentXmlStringMock"; String domainIdMock = "domainIdMock"; XdsbDocumentType xdsbDocumentTypeMock = XdsbDocumentType.CLINICAL_DOCUMENT; when( xdsbRepositoryAdapterMock.provideAndRegisterDocumentSet( documentXmlStringMock, domainIdMock, xdsbDocumentTypeMock, null, null)).thenReturn( registryResponseMock); RegistryResponse actualResponse = sut.provideAndRegisterDocumentSet( documentXmlStringMock, domainIdMock, xdsbDocumentTypeMock); assertEquals(registryResponseMock, actualResponse); }