diff --git a/src/main/java/org/olat/course/assessment/NewCachePersistingAssessmentManager.java b/src/main/java/org/olat/course/assessment/NewCachePersistingAssessmentManager.java
index 63b41bb1ca50a190a2188dda37527188da01d31e..ebf2473260a7c14976b8ca5243a205aea52f03e9 100644
--- a/src/main/java/org/olat/course/assessment/NewCachePersistingAssessmentManager.java
+++ b/src/main/java/org/olat/course/assessment/NewCachePersistingAssessmentManager.java
@@ -52,7 +52,6 @@ import org.olat.core.util.coordinate.CoordinatorManager;
 import org.olat.core.util.coordinate.SyncerCallback;
 import org.olat.core.util.coordinate.SyncerExecutor;
 import org.olat.core.util.event.GenericEventListener;
-import org.olat.core.util.mail.MailerResult;
 import org.olat.core.util.resource.OresHelper;
 import org.olat.course.CourseFactory;
 import org.olat.course.ICourse;
@@ -896,8 +895,7 @@ public class NewCachePersistingAssessmentManager extends BasicManager implements
 							template = certificatesManager.getTemplateById(templateId);
 						}
 						CertificateInfos certificateInfos = new CertificateInfos(assessedIdentity, score, passed);
-						MailerResult result = new MailerResult();
-						certificatesManager.generateCertificate(certificateInfos, courseEntry, template, result);
+						certificatesManager.generateCertificate(certificateInfos, courseEntry, template, true);
 					}
 				}
 				
diff --git a/src/main/java/org/olat/course/certificate/CertificatesManager.java b/src/main/java/org/olat/course/certificate/CertificatesManager.java
index 171cf78cba621eabdfbbfefab9fa706908b0cc05..d9d8377ca0caa5fb83ae85d3d5723b7d1b4f253b 100644
--- a/src/main/java/org/olat/course/certificate/CertificatesManager.java
+++ b/src/main/java/org/olat/course/certificate/CertificatesManager.java
@@ -30,7 +30,6 @@ import org.olat.core.commons.services.notifications.PublisherData;
 import org.olat.core.commons.services.notifications.SubscriptionContext;
 import org.olat.core.id.Identity;
 import org.olat.core.id.OLATResourceable;
-import org.olat.core.util.mail.MailerResult;
 import org.olat.core.util.resource.OresHelper;
 import org.olat.core.util.vfs.VFSLeaf;
 import org.olat.course.ICourse;
@@ -155,9 +154,9 @@ public interface CertificatesManager {
 	
 	public Certificate uploadStandaloneCertificate(Identity identity, Date creationDate, String courseTitle, Long resourceKey, File certificateFile);
 	
-	public void generateCertificates(List<CertificateInfos> identities, RepositoryEntry entry, CertificateTemplate template, MailerResult result);
+	public void generateCertificates(List<CertificateInfos> identities, RepositoryEntry entry, CertificateTemplate template, boolean sendMail);
 
-	public Certificate generateCertificate(CertificateInfos identity, RepositoryEntry entry, CertificateTemplate template, MailerResult result);
+	public Certificate generateCertificate(CertificateInfos identity, RepositoryEntry entry, CertificateTemplate template, boolean sendMail);
 	
 	public void deleteCertificate(Certificate certificate);
 
diff --git a/src/main/java/org/olat/course/certificate/manager/CertificatesManagerImpl.java b/src/main/java/org/olat/course/certificate/manager/CertificatesManagerImpl.java
index 044c9d67c5e1ed1c420a6749fdc309554f318631..7c18e9b4f644b3876a454ba0f59651be64f1d934 100644
--- a/src/main/java/org/olat/course/certificate/manager/CertificatesManagerImpl.java
+++ b/src/main/java/org/olat/course/certificate/manager/CertificatesManagerImpl.java
@@ -657,10 +657,10 @@ public class CertificatesManagerImpl implements CertificatesManager, MessageList
 
 	@Override
 	public void generateCertificates(List<CertificateInfos> certificateInfos, RepositoryEntry entry,
-			CertificateTemplate template, MailerResult result) {
+			CertificateTemplate template, boolean sendMail) {
 		int count = 0;
 		for(CertificateInfos certificateInfo:certificateInfos) {
-			generateCertificate(certificateInfo, entry, template, result);
+			generateCertificate(certificateInfo, entry, template, sendMail);
 			if(++count % 10 == 0) {
 				dbInstance.commitAndCloseSession();
 			}
@@ -706,14 +706,14 @@ public class CertificatesManagerImpl implements CertificatesManager, MessageList
 
 	@Override
 	public Certificate generateCertificate(CertificateInfos certificateInfos, RepositoryEntry entry,
-			CertificateTemplate template, MailerResult result) {
-		Certificate certificate = persistCertificate(certificateInfos, entry, template);
+			CertificateTemplate template, boolean sendMail) {
+		Certificate certificate = persistCertificate(certificateInfos, entry, template, sendMail);
 		markPublisherNews(null, entry.getOlatResource());
 		return certificate;
 	}
 
 	private Certificate persistCertificate(CertificateInfos certificateInfos, RepositoryEntry entry,
-			CertificateTemplate template) {
+			CertificateTemplate template, boolean sendMail) {
 		OLATResource resource = entry.getOlatResource();
 		Identity identity = certificateInfos.getAssessedIdentity();
 		
@@ -736,7 +736,7 @@ public class CertificatesManagerImpl implements CertificatesManager, MessageList
 		dbInstance.commit();
 		
 		//send message
-		sendJmsCertificateFile(certificate, template, certificateInfos.getScore(), certificateInfos.getPassed());
+		sendJmsCertificateFile(certificate, template, certificateInfos.getScore(), certificateInfos.getPassed(), sendMail);
 
 		return certificate;
 	}
@@ -745,7 +745,7 @@ public class CertificatesManagerImpl implements CertificatesManager, MessageList
 		return velocityEngine;
 	}
 	
-	private void sendJmsCertificateFile(Certificate certificate, CertificateTemplate template, Float score, Boolean passed) {
+	private void sendJmsCertificateFile(Certificate certificate, CertificateTemplate template, Float score, Boolean passed, boolean sendMail) {
 		QueueSender sender;
 		QueueSession session = null;
 		try  {
@@ -756,6 +756,7 @@ public class CertificatesManagerImpl implements CertificatesManager, MessageList
 			}
 			workUnit.setPassed(passed);
 			workUnit.setScore(score);
+			workUnit.setSendMail(sendMail);
 			
 			session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE );
 			ObjectMessage message = session.createObjectMessage();
diff --git a/src/main/java/org/olat/course/certificate/model/JmsCertificateWork.java b/src/main/java/org/olat/course/certificate/model/JmsCertificateWork.java
index ab143554034e27c49b3863cdee43ddcc4869f301..68475a9fea7f28603647a7c1bacf7158d2acd95f 100644
--- a/src/main/java/org/olat/course/certificate/model/JmsCertificateWork.java
+++ b/src/main/java/org/olat/course/certificate/model/JmsCertificateWork.java
@@ -35,14 +35,16 @@ public class JmsCertificateWork implements Serializable {
 	private Boolean passed;
 	private Long templateKey;
 	private Long certificateKey;
+	private boolean sendMail;
 	
 	public JmsCertificateWork() {
 		//
 	}
 	
-	public JmsCertificateWork(Long certificateKey, Long templateKey, Float score, Boolean passed) {
+	public JmsCertificateWork(Long certificateKey, Long templateKey, Float score, Boolean passed, boolean sendMail) {
 		this.score = score;
 		this.passed = passed;
+		this.sendMail = sendMail;
 		this.templateKey = templateKey;
 		this.certificateKey = certificateKey;
 	}
@@ -63,6 +65,14 @@ public class JmsCertificateWork implements Serializable {
 		this.passed = passed;
 	}
 
+	public boolean isSendMail() {
+		return sendMail;
+	}
+
+	public void setSendMail(boolean sendMail) {
+		this.sendMail = sendMail;
+	}
+
 	public Long getTemplateKey() {
 		return templateKey;
 	}
diff --git a/src/main/java/org/olat/course/certificate/restapi/CertificationWebService.java b/src/main/java/org/olat/course/certificate/restapi/CertificationWebService.java
index c08290a77756fc562467ac2fe772c46db7c54ded..e81ee18d64bad92c3395868be68398d26ab6c5b2 100644
--- a/src/main/java/org/olat/course/certificate/restapi/CertificationWebService.java
+++ b/src/main/java/org/olat/course/certificate/restapi/CertificationWebService.java
@@ -27,6 +27,7 @@ import java.util.Date;
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
 import javax.ws.rs.POST;
 import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
@@ -42,8 +43,9 @@ import javax.ws.rs.core.Response.Status;
 import org.olat.basesecurity.BaseSecurity;
 import org.olat.core.CoreSpringFactory;
 import org.olat.core.id.Identity;
+import org.olat.core.id.OLATResourceable;
 import org.olat.core.util.StringHelper;
-import org.olat.core.util.mail.MailerResult;
+import org.olat.core.util.resource.OresHelper;
 import org.olat.core.util.vfs.VFSLeaf;
 import org.olat.course.CourseFactory;
 import org.olat.course.ICourse;
@@ -65,6 +67,46 @@ import org.olat.restapi.support.ObjectFactory;
  */
 @Path("repo/courses/{resourceKey}/certificates")
 public class CertificationWebService {
+	
+	
+	@HEAD
+	@Path("{identityKey}")
+	@Produces({"application/pdf"})
+	public Response getCertificateInfo(@PathParam("identityKey") Long identityKey, @PathParam("resourceKey") Long resourceKey,
+			@Context HttpServletRequest request) {
+		if(!isAdmin(request)) {
+			return Response.serverError().status(Status.UNAUTHORIZED).build();
+		}
+
+		CertificatesManager certificatesManager = CoreSpringFactory.getImpl(CertificatesManager.class);
+		BaseSecurity baseSecurity = CoreSpringFactory.getImpl(BaseSecurity.class);
+
+		Identity identity = baseSecurity.loadIdentityByKey(identityKey);
+		if(identity == null) {
+			return Response.serverError().status(Response.Status.NOT_FOUND).build();
+		}
+		
+		OLATResourceable courseOres = OresHelper.createOLATResourceableInstance("CourseModule", resourceKey);
+		OLATResourceManager resourceManager = CoreSpringFactory.getImpl(OLATResourceManager.class);
+		OLATResource resource = resourceManager.findResourceable(courseOres);
+		if(resource == null) {
+			resource = resourceManager.findResourceById(resourceKey);
+		}
+		if(resource == null) {
+			return Response.serverError().status(Response.Status.NOT_FOUND).build();
+		}
+		
+		Certificate certificate = certificatesManager.getLastCertificate(identity, resource.getKey());
+		if(certificate == null) {
+			return Response.serverError().status(Response.Status.NOT_FOUND).build();
+		}
+
+		VFSLeaf certificateFile = certificatesManager.getCertificateLeaf(certificate);
+		if(certificateFile == null || !certificateFile.exists()) {
+			return Response.serverError().status(Response.Status.NOT_FOUND).build();
+		}
+		return Response.ok().build();
+	}
 
 	/**
 	 * Return the certificate as PDF file.
@@ -138,11 +180,15 @@ public class CertificationWebService {
 		OLATResourceManager resourceManager = CoreSpringFactory.getImpl(OLATResourceManager.class);
 		OLATResource resource = resourceManager.findResourceById(resourceKey);
 		if(resource == null) {
+			resource = resourceManager.findResourceable(resourceKey, "CourseModule");
+		}
+		
+		if(resource == null) {	
 			return Response.serverError().status(Response.Status.NOT_FOUND).build();
 		} else {
 			CertificatesManager certificatesManager = CoreSpringFactory.getImpl(CertificatesManager.class);
 			
-			ICourse course = CourseFactory.loadCourse(resource.getResourceableId());
+			ICourse course = CourseFactory.loadCourse(resource);
 			RepositoryEntry entry = course.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
 
 			CertificateTemplate template = null;
@@ -151,13 +197,12 @@ public class CertificationWebService {
 				template = certificatesManager.getTemplateById(templateId);
 			}
 			
-			MailerResult result = new MailerResult();
 			CertificateInfos certificateInfos = new CertificateInfos(assessedIdentity, score, passed);
 			if(StringHelper.containsNonWhitespace(creationDate)) {
 				Date date = ObjectFactory.parseDate(creationDate);
 				certificateInfos.setCreationDate(date);
 			}
-			Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, template, result);
+			Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, template, false);
 			if(certificate != null) {
 				return Response.ok().build();
 			}
diff --git a/src/main/java/org/olat/course/certificate/ui/AssessedIdentityCertificatesController.java b/src/main/java/org/olat/course/certificate/ui/AssessedIdentityCertificatesController.java
index 4cc7b74868fe5159dfb5237b3a466933b2edf98c..fe4608f029a4607fbecee928789de68505c35008 100644
--- a/src/main/java/org/olat/course/certificate/ui/AssessedIdentityCertificatesController.java
+++ b/src/main/java/org/olat/course/certificate/ui/AssessedIdentityCertificatesController.java
@@ -37,7 +37,6 @@ import org.olat.core.id.Identity;
 import org.olat.core.util.Formatter;
 import org.olat.core.util.coordinate.CoordinatorManager;
 import org.olat.core.util.event.GenericEventListener;
-import org.olat.core.util.mail.MailerResult;
 import org.olat.course.CourseFactory;
 import org.olat.course.ICourse;
 import org.olat.course.certificate.Certificate;
@@ -211,8 +210,7 @@ public class AssessedIdentityCertificatesController extends BasicController impl
 		Float score = scoreEval == null ? null : scoreEval.getScore();
 		Boolean passed = scoreEval == null ? null : scoreEval.getPassed();
 		CertificateInfos certificateInfos = new CertificateInfos(assessedIdentity, score, passed);
-		MailerResult result = new MailerResult();
-		certificatesManager.generateCertificate(certificateInfos, courseEntry, template, result);
+		certificatesManager.generateCertificate(certificateInfos, courseEntry, template, true);
 		loadList();
 		showInfo("msg.certificate.pending");
 		fireEvent(ureq, Event.CHANGED_EVENT);
diff --git a/src/main/java/org/olat/course/certificate/ui/CertificatesWizardController.java b/src/main/java/org/olat/course/certificate/ui/CertificatesWizardController.java
index 46ed0f81080988637a48953d2b9407a7f3fa637e..b778b2beb5e048d4a9101f068715ed0bcb2b203e 100644
--- a/src/main/java/org/olat/course/certificate/ui/CertificatesWizardController.java
+++ b/src/main/java/org/olat/course/certificate/ui/CertificatesWizardController.java
@@ -34,7 +34,6 @@ import org.olat.core.gui.control.generic.wizard.StepRunnerCallback;
 import org.olat.core.gui.control.generic.wizard.StepsMainRunController;
 import org.olat.core.gui.control.generic.wizard.StepsRunContext;
 import org.olat.core.id.OLATResourceable;
-import org.olat.core.util.mail.MailerResult;
 import org.olat.course.CourseFactory;
 import org.olat.course.ICourse;
 import org.olat.course.assessment.AssessedIdentitiesTableDataModel;
@@ -135,7 +134,6 @@ public class CertificatesWizardController extends BasicController {
 			template = certificatesManager.getTemplateById(templateKey);
 		}
 		
-		MailerResult result = new MailerResult();
-		certificatesManager.generateCertificates(assessedIdentitiesInfos, resource, template, result);
+		certificatesManager.generateCertificates(assessedIdentitiesInfos, resource, template, true);
 	}
 }
\ No newline at end of file
diff --git a/src/main/java/org/olat/ims/qti/editor/ChoiceItemController.java b/src/main/java/org/olat/ims/qti/editor/ChoiceItemController.java
index e6ea4c0d4c4ed287c37b721cf6503190ea9252f8..d9dd30b7676e5bb9d55a31095012aba7f054b66e 100644
--- a/src/main/java/org/olat/ims/qti/editor/ChoiceItemController.java
+++ b/src/main/java/org/olat/ims/qti/editor/ChoiceItemController.java
@@ -129,7 +129,8 @@ public class ChoiceItemController extends BasicController implements ControllerE
 				displayMaterialFormController(ureq, editQuestion, restrictedEdit,
 						translate("fieldset.legend.question"));
 			} else if (cmd.equals("editr")) {
-				editResponse = item.getQuestion().getResponses().get(posid);
+				List<Response> responses = item.getQuestion().getResponses();
+				editResponse = responses.get(posid);
 				Material responseMat = editResponse.getContent();
 				displayMaterialFormController(ureq, responseMat, restrictedEdit,
 						translate("fieldset.legend.answers"));
diff --git a/src/test/java/org/olat/course/certificate/manager/CertificatesManagerTest.java b/src/test/java/org/olat/course/certificate/manager/CertificatesManagerTest.java
index 474bc0862d2a511cce585b37380e0e9c580ba40f..6a68f1cdbb18730e0eedccd5ab31bc28e145b37c 100644
--- a/src/test/java/org/olat/course/certificate/manager/CertificatesManagerTest.java
+++ b/src/test/java/org/olat/course/certificate/manager/CertificatesManagerTest.java
@@ -97,7 +97,7 @@ public class CertificatesManagerTest extends OlatTestCase {
 		dbInstance.commitAndCloseSession();
 		
 		CertificateInfos certificateInfos = new CertificateInfos(identity, null, null);
-		Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, null, null);
+		Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, null, false);
 		Assert.assertNotNull(certificate);
 		Assert.assertNotNull(certificate.getKey());
 		Assert.assertNotNull(certificate.getUuid());
@@ -121,7 +121,7 @@ public class CertificatesManagerTest extends OlatTestCase {
 		dbInstance.commitAndCloseSession();
 		
 		CertificateInfos certificateInfos = new CertificateInfos(identity, 5.0f, Boolean.TRUE);
-		Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, null, null);
+		Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, null, false);
 		Assert.assertNotNull(certificate);
 		dbInstance.commitAndCloseSession();
 		
@@ -161,7 +161,7 @@ public class CertificatesManagerTest extends OlatTestCase {
 		dbInstance.commitAndCloseSession();
 		
 		CertificateInfos certificateInfos = new CertificateInfos(identity, 5.0f, Boolean.TRUE);
-		Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, null, null);
+		Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, null, false);
 		Assert.assertNotNull(certificate);
 		dbInstance.commitAndCloseSession();
 		
@@ -194,10 +194,10 @@ public class CertificatesManagerTest extends OlatTestCase {
 		dbInstance.commitAndCloseSession();
 		
 		CertificateInfos certificateInfos1 = new CertificateInfos(participant1, null, null);
-		Certificate certificate1 = certificatesManager.generateCertificate(certificateInfos1, entry, null, null);
+		Certificate certificate1 = certificatesManager.generateCertificate(certificateInfos1, entry, null, false);
 		Assert.assertNotNull(certificate1);
 		CertificateInfos certificateInfos2 = new CertificateInfos(participant2, null, null);
-		Certificate certificate2 = certificatesManager.generateCertificate(certificateInfos2, entry, null, null);
+		Certificate certificate2 = certificatesManager.generateCertificate(certificateInfos2, entry, null, false);
 		Assert.assertNotNull(certificate2);
 		dbInstance.commitAndCloseSession();
 		
@@ -236,10 +236,10 @@ public class CertificatesManagerTest extends OlatTestCase {
 		
 		//make a certificate
 		CertificateInfos certificateInfos1 = new CertificateInfos(participant1, null, null);
-		Certificate certificate1 = certificatesManager.generateCertificate(certificateInfos1, entry, null, null);
+		Certificate certificate1 = certificatesManager.generateCertificate(certificateInfos1, entry, null, false);
 		Assert.assertNotNull(certificate1);
 		CertificateInfos certificateInfos2 = new CertificateInfos(participant2, null, null);
-		Certificate certificate2 = certificatesManager.generateCertificate(certificateInfos2, entry, null, null);
+		Certificate certificate2 = certificatesManager.generateCertificate(certificateInfos2, entry, null, false);
 		Assert.assertNotNull(certificate2);
 		dbInstance.commitAndCloseSession();
 		
diff --git a/src/test/java/org/olat/restapi/CertificationTest.java b/src/test/java/org/olat/restapi/CertificationTest.java
index b3a5abc97ab9713cf942c3312a7d10556c3b46b7..fd629f65ac69b78447d478302655a8a5a5e1ec8b 100644
--- a/src/test/java/org/olat/restapi/CertificationTest.java
+++ b/src/test/java/org/olat/restapi/CertificationTest.java
@@ -32,6 +32,7 @@ import javax.ws.rs.core.UriBuilder;
 
 import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpHead;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpPut;
 import org.apache.http.entity.ContentType;
@@ -42,7 +43,6 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.olat.core.commons.persistence.DB;
 import org.olat.core.id.Identity;
-import org.olat.core.util.mail.MailerResult;
 import org.olat.core.util.vfs.VFSLeaf;
 import org.olat.course.certificate.Certificate;
 import org.olat.course.certificate.CertificatesManager;
@@ -68,7 +68,7 @@ public class CertificationTest extends OlatJerseyTestCase {
 
 
 	@Test
-	public void getCertificate() throws IOException, URISyntaxException {
+	public void getCertificate_file() throws IOException, URISyntaxException {
 		RestConnection conn = new RestConnection();
 		Assert.assertTrue(conn.login("administrator", "openolat"));
 
@@ -76,9 +76,8 @@ public class CertificationTest extends OlatJerseyTestCase {
 		Identity author = JunitTestHelper.createAndPersistIdentityAsAuthor("cert-2");
 		RepositoryEntry entry = JunitTestHelper.deployBasicCourse(author);
 
-		MailerResult result = new MailerResult();
 		CertificateInfos certificateInfos = new CertificateInfos(assessedIdentity, 2.0f, true);
-		Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, null, result);
+		Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, null, false);
 		dbInstance.commitAndCloseSession();
 		Assert.assertNotNull(certificate);
 
@@ -94,6 +93,42 @@ public class CertificationTest extends OlatJerseyTestCase {
 		conn.shutdown();
 	}
 	
+	@Test
+	public void getCertificate_head() throws IOException, URISyntaxException {
+		RestConnection conn = new RestConnection();
+		Assert.assertTrue(conn.login("administrator", "openolat"));
+
+		Identity assessedIdentity = JunitTestHelper.createAndPersistIdentityAsRndUser("cert-11");
+		Identity unassessedIdentity = JunitTestHelper.createAndPersistIdentityAsRndUser("cert-12");
+		Identity author = JunitTestHelper.createAndPersistIdentityAsAuthor("cert-2");
+		RepositoryEntry entry = JunitTestHelper.deployBasicCourse(author);
+
+		CertificateInfos certificateInfos = new CertificateInfos(assessedIdentity, 2.0f, true);
+		Certificate certificate = certificatesManager.generateCertificate(certificateInfos, entry, null, false);
+		dbInstance.commitAndCloseSession();
+		Assert.assertNotNull(certificate);
+		sleep(1000);
+
+		URI uri = UriBuilder.fromUri(getContextURI()).path("repo").path("courses")
+				.path(entry.getOlatResource().getKey().toString())
+				.path("certificates").path(assessedIdentity.getKey().toString()).build();
+		HttpHead method = conn.createHead(uri, "application/pdf", true);
+		HttpResponse response = conn.execute(method);
+		Assert.assertEquals(200, response.getStatusLine().getStatusCode());
+		EntityUtils.consume(response.getEntity());
+		
+		//check  with a stupid number
+		URI nonExistentUri = UriBuilder.fromUri(getContextURI()).path("repo").path("courses")
+				.path(entry.getOlatResource().getKey().toString())
+				.path("certificates").path(unassessedIdentity.getKey().toString()).build();
+		HttpHead nonExistentMethod = conn.createHead(nonExistentUri, "application/pdf", true);
+		HttpResponse nonExistentResponse = conn.execute(nonExistentMethod);
+		Assert.assertEquals(404, nonExistentResponse.getStatusLine().getStatusCode());
+		EntityUtils.consume(nonExistentResponse.getEntity());
+
+		conn.shutdown();
+	}
+	
 	@Test
 	public void generateCertificate() throws IOException, URISyntaxException {
 		RestConnection conn = new RestConnection();
diff --git a/src/test/java/org/olat/restapi/RestConnection.java b/src/test/java/org/olat/restapi/RestConnection.java
index f1133e0c420185417d755693e9168129f492a024..0d12e054d20e3267bc546ca3abb2d85288ce1f73 100644
--- a/src/test/java/org/olat/restapi/RestConnection.java
+++ b/src/test/java/org/olat/restapi/RestConnection.java
@@ -47,6 +47,7 @@ import org.apache.http.client.entity.UrlEncodedFormEntity;
 import org.apache.http.client.methods.HttpDelete;
 import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
 import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpHead;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpPut;
 import org.apache.http.client.methods.HttpRequestBase;
@@ -236,6 +237,12 @@ public class RestConnection {
 		return put;
 	}
 	
+	public HttpHead createHead(URI uri, String accept, boolean cookie) {
+		HttpHead head = new HttpHead(uri);
+		decorateHttpMessage(head,accept, "en", cookie);
+		return head;
+	}
+	
 	public HttpGet createGet(URI uri, String accept, boolean cookie) {
 		HttpGet get = new HttpGet(uri);
 		decorateHttpMessage(get,accept, "en", cookie);