@Test
public void testSignConsentRevokation_when_authentication_fails()
		throws Exception {

	ConsentRevokationPdfDto consentRevokationPdfDto = mock(ConsentRevokationPdfDto.class);
	when(consentService.findConsentRevokationPdfDto(anyLong())).thenReturn(
			consentRevokationPdfDto);
	when(consentService.isConsentBelongToThisUser(anyLong(), anyLong()))
			.thenReturn(false);
	mockMvc.perform(
			post("/Administrator/adminPatientViewRevokeConsent.html")
					.param("patientId", "1").param("consentId", "1")
					.param("revokationType", "NO NEVER"))
			.andExpect(
					view().name(
							"redirect:adminPatientView.html?notify=revokepatientconsent&status=fail&id=1"));
	verify(consentService, never()).signConsentRevokation(
			consentRevokationPdfDto);
}