### Question:
CompositeMailListener implements MailListener { @Override public void onPrepareEnd(Map<String, Object> parameters) { this.listeners.forEach(l -> l.onPrepareEnd(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();  }### Answer:
@Test void onPrepareEnd() { this.compositeListener.onPrepareEnd(null); verify(this.mainListener).onPrepareEnd(null); verify(this.listener1).onPrepareEnd(null); verify(this.listener2).onPrepareEnd(null); }