@Test void onSendMessageSuccess() { this.compositeListener.onSendMessageSuccess(null, null); verify(this.mainListener).onSendMessageSuccess(null, null); verify(this.listener1).onSendMessageSuccess(null, null); verify(this.listener2).onSendMessageSuccess(null, null); }
@Override public void onSendMessageSuccess(ExtendedMimeMessage message, Map<String, Object> parameters) { this.listeners.forEach(l -> l.onSendMessageSuccess(message, parameters)); }
CompositeMailListener implements MailListener { @Override public void onSendMessageSuccess(ExtendedMimeMessage message, Map<String, Object> parameters) { this.listeners.forEach(l -> l.onSendMessageSuccess(message, parameters)); } }
CompositeMailListener implements MailListener { @Override public void onSendMessageSuccess(ExtendedMimeMessage message, Map<String, Object> parameters) { this.listeners.forEach(l -> l.onSendMessageSuccess(message, parameters)); } CompositeMailListener(MailListener mainListener, MailListener... listeners); }
CompositeMailListener implements MailListener { @Override public void onSendMessageSuccess(ExtendedMimeMessage message, Map<String, Object> parameters) { this.listeners.forEach(l -> l.onSendMessageSuccess(message, parameters)); } CompositeMailListener(MailListener mainListener, MailListener... listeners); @Override void onPrepareBegin(String batchId, Map<String, Object> parameters); @Override void onPrepareMessageSuccess(ExtendedMimeMessage message, Map<String, Object> parameters); @Override void onPrepareMessageError(ExtendedMimeMessage message, Exception e, Map<String, Object> parameters); @Override void onPrepareFatalError(Exception exception, Map<String, Object> parameters); @Override void onPrepareEnd(Map<String, Object> parameters); @Override void onSendMessageSuccess(ExtendedMimeMessage message, Map<String, Object> parameters); @Override void onSendMessageError(ExtendedMimeMessage message, Exception exception, Map<String, Object> parameters); @Override void onSendMessageFatalError(String uniqueMessageId, Exception exception, Map<String, Object> parameters); @Override MailStatusResult getMailStatusResult(); }
CompositeMailListener implements MailListener { @Override public void onSendMessageSuccess(ExtendedMimeMessage message, Map<String, Object> parameters) { this.listeners.forEach(l -> l.onSendMessageSuccess(message, parameters)); } CompositeMailListener(MailListener mainListener, MailListener... listeners); @Override void onPrepareBegin(String batchId, Map<String, Object> parameters); @Override void onPrepareMessageSuccess(ExtendedMimeMessage message, Map<String, Object> parameters); @Override void onPrepareMessageError(ExtendedMimeMessage message, Exception e, Map<String, Object> parameters); @Override void onPrepareFatalError(Exception exception, Map<String, Object> parameters); @Override void onPrepareEnd(Map<String, Object> parameters); @Override void onSendMessageSuccess(ExtendedMimeMessage message, Map<String, Object> parameters); @Override void onSendMessageError(ExtendedMimeMessage message, Exception exception, Map<String, Object> parameters); @Override void onSendMessageFatalError(String uniqueMessageId, Exception exception, Map<String, Object> parameters); @Override MailStatusResult getMailStatusResult();  }