@Test
public void testDownloadConsentPdfFile() throws Exception {

	AuthenticatedUser user = mock(AuthenticatedUser.class);
	doReturn(user).when(userContext).getCurrentUser();
	doReturn("user1").when(user).getUsername();
	AbstractPdfDto pdfDto = mock(AbstractPdfDto.class);
	byte[] byteArray = new byte[] { 1, 2, 3 };
	when(pdfDto.getContent()).thenReturn(byteArray);
	when(consentService.findConsentContentDto(anyLong()))
			.thenReturn(pdfDto);
	mockMvc.perform(
			get("/Administrator/downloadPdf.html").param("consentId", "1"))
			.andExpect(status().isOk());
	verify(consentService).findConsentContentDto((long) 1);
}