@Test @SuppressWarnings("empty-statement") public void testEntity() { try { multiPart.setEntity("foo bar baz"); fail("Should have thrown IllegalStateException"); } catch (IllegalStateException e) { } try { assertEquals("foo bar baz", multiPart.getEntity()); fail("Should have thrown IllegalStateException"); } catch (IllegalStateException e) { } }
@Override public BodyPart entity(Object entity) { setEntity(entity); return this; }
MultiPart extends BodyPart implements Closeable { @Override public BodyPart entity(Object entity) { setEntity(entity); return this; } }
MultiPart extends BodyPart implements Closeable { @Override public BodyPart entity(Object entity) { setEntity(entity); return this; } MultiPart();  MultiPart(MediaType mediaType); }
MultiPart extends BodyPart implements Closeable { @Override public BodyPart entity(Object entity) { setEntity(entity); return this; } MultiPart();  MultiPart(MediaType mediaType); List<BodyPart> getBodyParts(); @Override Object getEntity(); @Override void setEntity(Object entity); @Override void setMediaType(MediaType mediaType); MultiPart bodyPart(BodyPart bodyPart); MultiPart bodyPart(Object entity, MediaType mediaType); @Override BodyPart entity(Object entity); @Override MultiPart type(MediaType type); @Override void cleanup(); void close(); }
MultiPart extends BodyPart implements Closeable { @Override public BodyPart entity(Object entity) { setEntity(entity); return this; } MultiPart();  MultiPart(MediaType mediaType); List<BodyPart> getBodyParts(); @Override Object getEntity(); @Override void setEntity(Object entity); @Override void setMediaType(MediaType mediaType); MultiPart bodyPart(BodyPart bodyPart); MultiPart bodyPart(Object entity, MediaType mediaType); @Override BodyPart entity(Object entity); @Override MultiPart type(MediaType type); @Override void cleanup(); void close();  }