use of org.xwiki.mail.script.ScriptMailResult in project xwiki-platform by xwiki.
the class MailStorageScriptServiceTest method resend.
@Test
public void resend() throws Exception {
MailResender resender = this.mocker.getInstance(MailResender.class, "database");
MailStatusResult statusResult = mock(MailStatusResult.class);
when(resender.resendAsynchronously("batchId", "messageId")).thenReturn(statusResult);
ScriptMailResult result = this.mocker.getComponentUnderTest().resend("batchId", "messageId");
assertEquals("batchId", result.getBatchId());
assertNotNull(result.getStatusResult());
}
Aggregations