diff --git a/src/test/java/uk/ac/ebi/eva/submission/integration/SubmissionWSIntegrationTest.java b/src/test/java/uk/ac/ebi/eva/submission/integration/SubmissionWSIntegrationTest.java index 9bdf97d..51516ed 100644 --- a/src/test/java/uk/ac/ebi/eva/submission/integration/SubmissionWSIntegrationTest.java +++ b/src/test/java/uk/ac/ebi/eva/submission/integration/SubmissionWSIntegrationTest.java @@ -26,6 +26,7 @@ import uk.ac.ebi.eva.submission.service.LoginMethod; import uk.ac.ebi.eva.submission.service.LsriTokenService; import uk.ac.ebi.eva.submission.service.WebinTokenService; +import uk.ac.ebi.eva.submission.util.MailSender; import java.time.LocalDateTime; import java.util.ArrayList; @@ -76,6 +77,9 @@ public class SubmissionWSIntegrationTest { @MockBean private GlobusDirectoryProvisioner globusDirectoryProvisioner; + @MockBean + private MailSender mailSender; + @Container static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer<>("postgres:9.6") .withInitScript("init.sql"); @@ -230,6 +234,7 @@ public void testMarkSubmissionUploaded() throws Exception { String userToken = "webinUserToken"; SubmissionAccount submissionAccount = getWebinUserAccount(); when(webinTokenService.getWebinUserAccountFromToken(anyString())).thenReturn(submissionAccount); + doNothing().when(mailSender).sendEmail(anyString(), anyString(), anyString()); String submissionId = createNewSubmissionEntry(submissionAccount);