@SuppressWarnings("unchecked")
@Test(expected = Throwable.class)
public void testHandleMessage_Throws_Exception_Given_XDS_Returns_Fail_Response()
		throws Throwable {

	String consentIdMock = "1";
	byte[] revokedConsentPdf = new byte[1];
	RevokedConsentDto policyIdDto = mock(RevokedConsentDto.class);
	when(policyIdDto.getPatientEid()).thenReturn("FAM.123");
	when(policyIdDto.getXacmlCcdId()).thenReturn("PolicyId");
	when(policyIdDto.getRevokedPdfConsent()).thenReturn(revokedConsentPdf);
	when(consentGetterMock.getRevokedConsentDto(1)).thenReturn(policyIdDto);
	when(spiritAdapter.login()).thenReturn("stateid123");
	when(
			spiritAdapter.deprecatePolicy("PolicyId", "FAM.123",
					revokedConsentPdf)).thenThrow(Throwable.class);
	// Assert
	sut.handleMessage(consentIdMock);
}