BodyPart { public BodyPart entity(final Object entity) { setEntity(entity); return this; } BodyPart();  BodyPart(final MediaType mediaType);  BodyPart(final Object entity, final MediaType mediaType); Object getEntity(); void setEntity(final Object entity); MultivaluedMap<String, String> getHeaders(); MultivaluedMap<String, ParameterizedHeader> getParameterizedHeaders(); ContentDisposition getContentDisposition(); void setContentDisposition(final ContentDisposition contentDisposition); MediaType getMediaType(); void setMediaType(final MediaType mediaType); MultiPart getParent(); void setParent(final MultiPart parent); Providers getProviders(); void setProviders(final Providers providers); void cleanup(); BodyPart entity(final Object entity); T getEntityAs(final Class<T> clazz); BodyPart type(final MediaType type); BodyPart contentDisposition(final ContentDisposition contentDisposition); void setMessageBodyWorkers(final MessageBodyWorkers messageBodyWorkers); public MessageBodyWorkers messageBodyWorkers; }
@Test public void testEntity() { bodyPart.setEntity("foo bar baz"); assertEquals("foo bar baz", bodyPart.getEntity()); }