### Question:
MailStorageScriptService extends AbstractMailScriptService { public MailStatus load(String uniqueMessageId) { try { return this.mailStatusStore.load(uniqueMessageId); } catch (MailStoreException e) { setError(e); return null; } }  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 loadWhenNotAuthorized() throws Exception { ContextualAuthorizationManager authorizationManager = this.mocker.getInstance(ContextualAuthorizationManager.class); when(authorizationManager.hasAccess(Right.ADMIN)).thenReturn(false); List<MailStatus> result = this.mocker.getComponentUnderTest().load( Collections.<String, Object>emptyMap(), 0, 0, null, false); assertNull(result); assertEquals("You need Admin rights to load mail statuses", this.mocker.getComponentUnderTest().getLastError().getMessage()); }