@Test
public void testExtractXdsbDocumentReferenceListAsRetrieveDocumentSetRequest()
		throws Exception, Throwable {

	// Arrange
	AdhocQueryResponse responseMock = mock(AdhocQueryResponse.class);
	String marshalledXmlStringMock = "marshalledXmlStringMock";
	XdsbDocumentReference ref1 = new XdsbDocumentReference(
			"41421263015.98411.41414.91230.401390172014139",
			"1.3.6.1.4.1.21367.2010.1.2.1040");
	XdsbDocumentReference ref2 = new XdsbDocumentReference(
			"1513150391310.11184.4632.11139.05080551281557",
			"1.3.6.1.4.1.21367.2010.1.2.1040");
	when(marshallerMock.marshal(responseMock)).thenReturn(
			marshalledXmlStringMock);
	when(documentXmlConverterMock.loadDocument(marshalledXmlStringMock))
			.thenReturn(
					documentXmlConverter.loadDocument(fileReader
							.readFile("adhocQueryResponseClinicalDocument.xml")));
	// Act
	RetrieveDocumentSetRequest actualResponse = xdsbRegistryAdapterSpy
			.extractXdsbDocumentReferenceListAsRetrieveDocumentSetRequest(responseMock);
	// Assert
	assertTrue(actualResponse.getDocumentRequest().contains(ref1));
	assertTrue(actualResponse.getDocumentRequest().contains(ref2));
}