@Test
public void testHandleError_Notification_Is_Published() {

	Message<MessagingException> errorMessageMock = (Message<MessagingException>) mock(Message.class);
	MessagingException messagingExceptionMock = mock(MessagingException.class);
	when(errorMessageMock.getPayload()).thenReturn(messagingExceptionMock);
	Message<?> failedMessageMock = (Message<?>) mock(Message.class);
	doReturn(failedMessageMock).when(messagingExceptionMock)
			.getFailedMessage();
	String origMessagePayload = "origMessagePayload";
	doReturn(origMessagePayload).when(failedMessageMock).getPayload();
	Throwable exMock = mock(Throwable.class);
	when(messagingExceptionMock.getCause()).thenReturn(exMock);
	String expectedDetails = "bla";
	String expectedSubject = "Consent signed/revoked message hanlding error";
	sut.handleError(errorMessageMock);
	verify(notificationPublisher, times(1)).publish(
			argThat(new IsNotificationAsExpected(expectedSubject,
					expectedDetails)));
}