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

	// Arrange
	String patientIdMock = "patientIdMock";
	String domainIdMock = "domainIdMock";
	String authorIdMock = "authorIdMock";
	String messageIdMock = "messageIdMock";
	XdsbDocumentType xdsbDocumentTypeMock = XdsbDocumentType.CLINICAL_DOCUMENT;
	boolean serviceTimeAwareMock = false;
	AdhocQueryResponse responseMock = new AdhocQueryResponse();
	AdhocQueryResponse filteredResponseMock = new AdhocQueryResponse();
	when(xdsbRegistryMock.registryStoredQuery(isA(AdhocQueryRequest.class)))
			.thenReturn(responseMock);
	when(responseFilterMock.filterByAuthor(responseMock, authorIdMock))
			.thenReturn(filteredResponseMock);
	// Act
	AdhocQueryResponse actualResponse = xdsbRegistryAdapterSpy
			.registryStoredQuery(patientIdMock, domainIdMock, authorIdMock,
					xdsbDocumentTypeMock, serviceTimeAwareMock, messageIdMock);
	// Assert
	assertEquals(filteredResponseMock, actualResponse);
}