RemoveMimeHeader extends GenericMailet { @Override public void init() throws MailetException { String header = getInitParameter("name"); if (header == null) { throw new MailetException("Invalid config. Please specify atleast one name"); } headers = ImmutableList.copyOf(Splitter.on(",").split(header)); }  @Override void init(); @Override String getMailetInfo(); @Override void service(Mail mail);  }
@Test void initShouldThrowWhenInvalidConfig() { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName("Test") .build(); assertThatThrownBy(() -> mailet.init(mailetConfig)).isInstanceOf(MessagingException.class); }