@Test void initShouldThrowExceptionIfMailetConfigDoesNotContainAttribute() { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName("Test") .build(); assertThatThrownBy(() -> removeMailet.init(mailetConfig)).isInstanceOf(MailetException.class); }
@Override public void init() throws MailetException { String name = getInitParameter(MAILET_NAME_PARAMETER); if (Strings.isNullOrEmpty(name)) { throw new MailetException("Please configure at least one attribute to remove"); } attributesToRemove = getAttributes(name); }
RemoveMailAttribute extends GenericMailet { @Override public void init() throws MailetException { String name = getInitParameter(MAILET_NAME_PARAMETER); if (Strings.isNullOrEmpty(name)) { throw new MailetException("Please configure at least one attribute to remove"); } attributesToRemove = getAttributes(name); } }
RemoveMailAttribute extends GenericMailet { @Override public void init() throws MailetException { String name = getInitParameter(MAILET_NAME_PARAMETER); if (Strings.isNullOrEmpty(name)) { throw new MailetException("Please configure at least one attribute to remove"); } attributesToRemove = getAttributes(name); }  }
RemoveMailAttribute extends GenericMailet { @Override public void init() throws MailetException { String name = getInitParameter(MAILET_NAME_PARAMETER); if (Strings.isNullOrEmpty(name)) { throw new MailetException("Please configure at least one attribute to remove"); } attributesToRemove = getAttributes(name); }  @Override String getMailetInfo(); @Override void init(); @Override void service(Mail mail); }
RemoveMailAttribute extends GenericMailet { @Override public void init() throws MailetException { String name = getInitParameter(MAILET_NAME_PARAMETER); if (Strings.isNullOrEmpty(name)) { throw new MailetException("Please configure at least one attribute to remove"); } attributesToRemove = getAttributes(name); }  @Override String getMailetInfo(); @Override void init(); @Override void service(Mail mail);  }