@Test void initShouldThrowWhenPrefixEmpty() { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName("Test") .setProperty(RemoveMimeHeaderByPrefix.PREFIX, "") .build(); assertThatThrownBy(() -> mailet.init(mailetConfig)).isInstanceOf(MessagingException.class); }
@Override public void init() throws MessagingException { prefix = getInitParameter(PREFIX); if (Strings.isNullOrEmpty(prefix)) { throw new MessagingException("Expecting prefix not to be empty or null with RemoveMimeHeaderByPrefix"); } }
RemoveMimeHeaderByPrefix extends GenericMailet { @Override public void init() throws MessagingException { prefix = getInitParameter(PREFIX); if (Strings.isNullOrEmpty(prefix)) { throw new MessagingException("Expecting prefix not to be empty or null with RemoveMimeHeaderByPrefix"); } } }
RemoveMimeHeaderByPrefix extends GenericMailet { @Override public void init() throws MessagingException { prefix = getInitParameter(PREFIX); if (Strings.isNullOrEmpty(prefix)) { throw new MessagingException("Expecting prefix not to be empty or null with RemoveMimeHeaderByPrefix"); } }  }
RemoveMimeHeaderByPrefix extends GenericMailet { @Override public void init() throws MessagingException { prefix = getInitParameter(PREFIX); if (Strings.isNullOrEmpty(prefix)) { throw new MessagingException("Expecting prefix not to be empty or null with RemoveMimeHeaderByPrefix"); } }  @Override void init(); @Override String getMailetInfo(); @Override void service(Mail mail); }
RemoveMimeHeaderByPrefix extends GenericMailet { @Override public void init() throws MessagingException { prefix = getInitParameter(PREFIX); if (Strings.isNullOrEmpty(prefix)) { throw new MessagingException("Expecting prefix not to be empty or null with RemoveMimeHeaderByPrefix"); } }  @Override void init(); @Override String getMailetInfo(); @Override void service(Mail mail); static final String PREFIX; }