@Test public void shouldReturnSameContentType() { ContentType contentType = ContentType.CONTENT_TYPE_TEXT_JSON; Part part = new StringPart(name, content, charset, contentType); ContentType returnContentType = part.getContentType(); assertThat(contentType, is(returnContentType)); }
@Override public ContentType getContentType() { return contentType; }
StringPart extends AbstractPart { @Override public ContentType getContentType() { return contentType; } }
StringPart extends AbstractPart { @Override public ContentType getContentType() { return contentType; } StringPart(String name, String content);  StringPart(String name, String content, String charset);  StringPart(String name, String content, String charset, ContentType contentType); }
StringPart extends AbstractPart { @Override public ContentType getContentType() { return contentType; } StringPart(String name, String content);  StringPart(String name, String content, String charset);  StringPart(String name, String content, String charset, ContentType contentType); @Override ContentType getContentType(); @Override InputStream getContent(); }
StringPart extends AbstractPart { @Override public ContentType getContentType() { return contentType; } StringPart(String name, String content);  StringPart(String name, String content, String charset);  StringPart(String name, String content, String charset, ContentType contentType); @Override ContentType getContentType(); @Override InputStream getContent();  }