@Test void initShouldThrowWhenNoAttributeParameter() { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName("Test") .mailetContext(mailetContext) .build(); assertThatThrownBy(() -> testee.init(mailetConfig)) .isInstanceOf(MailetException.class); }
@Override public void init() throws MessagingException { String attributeRaw = getInitParameter(ATTRIBUTE_PARAMETER_NAME); if (Strings.isNullOrEmpty(attributeRaw)) { throw new MailetException("No value for " + ATTRIBUTE_PARAMETER_NAME + " parameter was provided."); } attributeName = AttributeName.of(attributeRaw); }
MimeDecodingMailet extends GenericMailet { @Override public void init() throws MessagingException { String attributeRaw = getInitParameter(ATTRIBUTE_PARAMETER_NAME); if (Strings.isNullOrEmpty(attributeRaw)) { throw new MailetException("No value for " + ATTRIBUTE_PARAMETER_NAME + " parameter was provided."); } attributeName = AttributeName.of(attributeRaw); } }
MimeDecodingMailet extends GenericMailet { @Override public void init() throws MessagingException { String attributeRaw = getInitParameter(ATTRIBUTE_PARAMETER_NAME); if (Strings.isNullOrEmpty(attributeRaw)) { throw new MailetException("No value for " + ATTRIBUTE_PARAMETER_NAME + " parameter was provided."); } attributeName = AttributeName.of(attributeRaw); }  }
MimeDecodingMailet extends GenericMailet { @Override public void init() throws MessagingException { String attributeRaw = getInitParameter(ATTRIBUTE_PARAMETER_NAME); if (Strings.isNullOrEmpty(attributeRaw)) { throw new MailetException("No value for " + ATTRIBUTE_PARAMETER_NAME + " parameter was provided."); } attributeName = AttributeName.of(attributeRaw); }  @Override void init(); @Override void service(Mail mail); @Override String getMailetInfo(); }
MimeDecodingMailet extends GenericMailet { @Override public void init() throws MessagingException { String attributeRaw = getInitParameter(ATTRIBUTE_PARAMETER_NAME); if (Strings.isNullOrEmpty(attributeRaw)) { throw new MailetException("No value for " + ATTRIBUTE_PARAMETER_NAME + " parameter was provided."); } attributeName = AttributeName.of(attributeRaw); }  @Override void init(); @Override void service(Mail mail); @Override String getMailetInfo(); static final String ATTRIBUTE_PARAMETER_NAME; }