@Test public void verifyToString() { Session session = Session.getDefaultInstance(new Properties()); String batchId = UUID.randomUUID().toString(); ExecutionContext context = new ExecutionContext(); XWikiContext xContext = new XWikiContext(); xContext.setWikiId("wiki"); context.setProperty(XWikiContext.EXECUTIONCONTEXT_KEY, xContext); SendMailQueueItem item = new SendMailQueueItem("messageId", session, null, batchId, "xwiki"); assertEquals("batchId = [" + batchId + "], messageId = [messageId], wikiId = [xwiki]", item.toString()); }
@Override public String toString() { return prepareToString() .append("messageId", getUniqueMessageId()) .append("wikiId", getWikiId()) .toString(); }
SendMailQueueItem extends AbstractMailQueueItem { @Override public String toString() { return prepareToString() .append("messageId", getUniqueMessageId()) .append("wikiId", getWikiId()) .toString(); } }
SendMailQueueItem extends AbstractMailQueueItem { @Override public String toString() { return prepareToString() .append("messageId", getUniqueMessageId()) .append("wikiId", getWikiId()) .toString(); } SendMailQueueItem(String uniqueMessageId, Session session, MailListener listener, String batchId,
        String wikiId); }
SendMailQueueItem extends AbstractMailQueueItem { @Override public String toString() { return prepareToString() .append("messageId", getUniqueMessageId()) .append("wikiId", getWikiId()) .toString(); } SendMailQueueItem(String uniqueMessageId, Session session, MailListener listener, String batchId,
        String wikiId); String getUniqueMessageId(); String getWikiId(); @Override String toString(); }
SendMailQueueItem extends AbstractMailQueueItem { @Override public String toString() { return prepareToString() .append("messageId", getUniqueMessageId()) .append("wikiId", getWikiId()) .toString(); } SendMailQueueItem(String uniqueMessageId, Session session, MailListener listener, String batchId,
        String wikiId); String getUniqueMessageId(); String getWikiId(); @Override String toString();  }