From daa9edec9b3cf899fe62f5ed5b454e88fae3b901 Mon Sep 17 00:00:00 2001 From: nkumar2 Date: Fri, 15 Mar 2024 13:19:13 +0000 Subject: [PATCH] fix test --- .../submission/integration/SubmissionWSIntegrationTest.java | 5 +++++ 1 file changed, 5 insertions(+) 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);