@Test public void subjectWithPrefixShouldReturnPrefixAsSubjectWhenSubjectIsAbsent() throws Exception { MimeMessage message = new MimeMessage(Session.getDefaultInstance(new Properties())); Optional<String> subjectWithPrefix = new MimeMessageUtils(message).subjectWithPrefix("my"); assertThat(subjectWithPrefix).contains("my"); }
public Optional<String> subjectWithPrefix(String subjectPrefix) throws MessagingException { return prefixSubject(message.getSubject(), subjectPrefix); }
MimeMessageUtils { public Optional<String> subjectWithPrefix(String subjectPrefix) throws MessagingException { return prefixSubject(message.getSubject(), subjectPrefix); } }
MimeMessageUtils { public Optional<String> subjectWithPrefix(String subjectPrefix) throws MessagingException { return prefixSubject(message.getSubject(), subjectPrefix); } MimeMessageUtils(MimeMessage message); }
MimeMessageUtils { public Optional<String> subjectWithPrefix(String subjectPrefix) throws MessagingException { return prefixSubject(message.getSubject(), subjectPrefix); } MimeMessageUtils(MimeMessage message); Optional<String> subjectWithPrefix(String subjectPrefix); Optional<String> subjectWithPrefix(String subjectPrefix, Mail originalMail, String subject); String getMessageHeaders(); List<Header> toHeaderList(); }
MimeMessageUtils { public Optional<String> subjectWithPrefix(String subjectPrefix) throws MessagingException { return prefixSubject(message.getSubject(), subjectPrefix); } MimeMessageUtils(MimeMessage message); Optional<String> subjectWithPrefix(String subjectPrefix); Optional<String> subjectWithPrefix(String subjectPrefix, Mail originalMail, String subject); String getMessageHeaders(); List<Header> toHeaderList();  }