MultiPart result = response.readEntity(MultiPart.class);
System.out.println("RESULT = " + result);
checkEntity("This is the only segment", (BodyPartEntity) result.getBodyParts().get(0).getEntity());
server.shutdownNow();
}
private void checkEntity(String expected, BodyPartEntity entity) throws IOException {
// Convert the raw bytes into a String
InputStreamReader sr = new InputStreamReader(entity.getInputStream());