class MimeMessageUtils {

    @VisibleForTesting Optional<String> buildNewSubject(String subjectPrefix, String originalSubject, String subject) throws MessagingException {
        String nullablePrefix = Strings.emptyToNull(subjectPrefix);
        if (nullablePrefix == null && subject == null) {
            return Optional.empty();
        }
        if (nullablePrefix == null) {
            return Optional.of(subject);
        }
        String chosenSubject = chooseSubject(subject, originalSubject);
        return prefixSubject(chosenSubject, nullablePrefix);
    }

    public  MimeMessageUtils(MimeMessage message);

}