### Question:
MailStorageScriptService extends AbstractMailScriptService { public ScriptMailResult resend(String batchId, String uniqueMessageId) { ScriptMailResult result = resendAsynchronously(batchId, uniqueMessageId); if (result != null) { result.getStatusResult().waitTillProcessed(Long.MAX_VALUE); } return result; }  ScriptMailResult resend(String batchId, String uniqueMessageId); ScriptMailResult resendAsynchronously(String batchId, String uniqueMessageId); List<ScriptMailResult> resendAsynchronously(Map<String, Object> filterMap, int offset, int count); MailStatus load(String uniqueMessageId); List<MailStatus> load(Map<String, Object> filterMap, int offset, int count, String sortField,
        boolean sortAscending); long count(Map<String, Object> filterMap); void delete(String batchId); void deleteAll(); void delete(String batchId, String uniqueMessageId); MailStorageConfiguration getConfiguration();  }### Answer:
@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()); }