@Test
public void testExtractDeprecatedDocumentUniqueId() throws Throwable {

	// Arrange
	AdhocQueryResponse responseMock = mock(AdhocQueryResponse.class);
	String responseXmlMock = "responseXmlMock";
	Document documentMock = mock(Document.class);
	Node nodeMock = mock(Node.class);
	String nodeValueMock = "nodeValueMock";
	when(marshallerMock.marshal(responseMock)).thenReturn(responseXmlMock);
	when(documentXmlConverterMock.loadDocument(responseXmlMock))
			.thenReturn(documentMock);
	when(documentAccessorMock.getNode(eq(documentMock), anyString()))
			.thenReturn(nodeMock);
	when(nodeMock.getNodeValue()).thenReturn(nodeValueMock);
	// Act
	String deprecatedDocumentUniqueId = xdsbRegistryAdapterSpy
			.extractDeprecatedDocumentUniqueId(responseMock, "");
	// Assert
	assertEquals(nodeValueMock, deprecatedDocumentUniqueId);
}