RemoveMailAttribute extends GenericMailet { @Override public void service(Mail mail) throws MessagingException { Preconditions.checkNotNull(mail); attributesToRemove.forEach(mail::removeAttribute); }  @Override String getMailetInfo(); @Override void init(); @Override void service(Mail mail);  }
@Test void serviceShouldThrowExceptionWithMailNull() { assertThatThrownBy(() -> removeMailet.service(null)).isInstanceOf(NullPointerException.class); }