MimePart { public static Builder builder() { return new Builder(); } private  MimePart(HeaderCollection headerCollection, Optional<String> bodyTextContent, Optional<MediaType> mediaType,
                    Optional<SubType> subType, Optional<String> fileName, Optional<String> fileExtension,
                    Optional<String> contentDisposition, List<MimePart> attachments); static Builder builder(); @JsonIgnore List<MimePart> getAttachments(); @JsonIgnore HeaderCollection getHeaderCollection(); @JsonProperty(JsonMessageConstants.Attachment.FILENAME) Optional<String> getFileName(); @JsonProperty(JsonMessageConstants.Attachment.FILE_EXTENSION) Optional<String> getFileExtension(); @JsonProperty(JsonMessageConstants.Attachment.MEDIA_TYPE) Optional<String> getMediaType(); @JsonProperty(JsonMessageConstants.Attachment.SUBTYPE) Optional<String> getSubType(); @JsonProperty(JsonMessageConstants.Attachment.CONTENT_DISPOSITION) Optional<String> getContentDisposition(); @JsonProperty(JsonMessageConstants.Attachment.TEXT_CONTENT) Optional<String> getTextualBody(); @JsonIgnore Optional<String> locateFirstTextBody(); @JsonIgnore Optional<String> locateFirstHtmlBody(); @JsonIgnore Stream<MimePart> getAttachmentsStream();  }
@Test void buildShouldWorkWhenTextualContentFromParserIsEmpty() { MimePart.builder() .addBodyContent(new ByteArrayInputStream(new byte[] {})) .addMediaType(MediaType.of("text")) .addSubType(SubType.of("plain")) .build(); }