@Test public void createWithoutMimeTypePassed() throws Exception { MimeBodyPart bodyPart = this.mocker.getComponentUnderTest().create("Lorem ipsum", Collections.<String, Object>emptyMap()); assertEquals("Lorem ipsum", bodyPart.getContent()); assertEquals("text/plain; charset=UTF-8", bodyPart.getContentType()); }
@Override public MimeBodyPart create(String content, Map<String, Object> parameters) throws MessagingException { MimeBodyPart bodyPart = new MimeBodyPart(); bodyPart.setContent(content, TEXT_PLAIN_CONTENT_TYPE); bodyPart.setHeader("Content-Type", getMimetype(parameters)); addHeaders(bodyPart, parameters); return bodyPart; }
TextMimeBodyPartFactory extends AbstractMimeBodyPartFactory<String> { @Override public MimeBodyPart create(String content, Map<String, Object> parameters) throws MessagingException { MimeBodyPart bodyPart = new MimeBodyPart(); bodyPart.setContent(content, TEXT_PLAIN_CONTENT_TYPE); bodyPart.setHeader("Content-Type", getMimetype(parameters)); addHeaders(bodyPart, parameters); return bodyPart; } }
TextMimeBodyPartFactory extends AbstractMimeBodyPartFactory<String> { @Override public MimeBodyPart create(String content, Map<String, Object> parameters) throws MessagingException { MimeBodyPart bodyPart = new MimeBodyPart(); bodyPart.setContent(content, TEXT_PLAIN_CONTENT_TYPE); bodyPart.setHeader("Content-Type", getMimetype(parameters)); addHeaders(bodyPart, parameters); return bodyPart; }  }
TextMimeBodyPartFactory extends AbstractMimeBodyPartFactory<String> { @Override public MimeBodyPart create(String content, Map<String, Object> parameters) throws MessagingException { MimeBodyPart bodyPart = new MimeBodyPart(); bodyPart.setContent(content, TEXT_PLAIN_CONTENT_TYPE); bodyPart.setHeader("Content-Type", getMimetype(parameters)); addHeaders(bodyPart, parameters); return bodyPart; }  @Override MimeBodyPart create(String content, Map<String, Object> parameters); }
TextMimeBodyPartFactory extends AbstractMimeBodyPartFactory<String> { @Override public MimeBodyPart create(String content, Map<String, Object> parameters) throws MessagingException { MimeBodyPart bodyPart = new MimeBodyPart(); bodyPart.setContent(content, TEXT_PLAIN_CONTENT_TYPE); bodyPart.setHeader("Content-Type", getMimetype(parameters)); addHeaders(bodyPart, parameters); return bodyPart; }  @Override MimeBodyPart create(String content, Map<String, Object> parameters);  }