@Test void shouldThrowWhenNoConfiguration() { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName("Test") .build(); assertThatThrownBy(() -> mailet.init(mailetConfig)).isInstanceOf(MessagingException.class); }
@Override public void init() throws MessagingException { headerName = getInitParameter("name"); headerValue = getInitParameter("value"); if (Strings.isNullOrEmpty(headerName) || Strings.isNullOrEmpty(headerValue)) { throw new MessagingException("Please configure a name and a value"); } }
SetMimeHeader extends GenericMailet { @Override public void init() throws MessagingException { headerName = getInitParameter("name"); headerValue = getInitParameter("value"); if (Strings.isNullOrEmpty(headerName) || Strings.isNullOrEmpty(headerValue)) { throw new MessagingException("Please configure a name and a value"); } } }
SetMimeHeader extends GenericMailet { @Override public void init() throws MessagingException { headerName = getInitParameter("name"); headerValue = getInitParameter("value"); if (Strings.isNullOrEmpty(headerName) || Strings.isNullOrEmpty(headerValue)) { throw new MessagingException("Please configure a name and a value"); } }  }
SetMimeHeader extends GenericMailet { @Override public void init() throws MessagingException { headerName = getInitParameter("name"); headerValue = getInitParameter("value"); if (Strings.isNullOrEmpty(headerName) || Strings.isNullOrEmpty(headerValue)) { throw new MessagingException("Please configure a name and a value"); } }  @Override void init(); @Override void service(Mail mail); @Override String getMailetInfo(); }
SetMimeHeader extends GenericMailet { @Override public void init() throws MessagingException { headerName = getInitParameter("name"); headerValue = getInitParameter("value"); if (Strings.isNullOrEmpty(headerName) || Strings.isNullOrEmpty(headerValue)) { throw new MessagingException("Please configure a name and a value"); } }  @Override void init(); @Override void service(Mail mail); @Override String getMailetInfo();  }