* @throws IOException
*/
public void runTestBufferdMultiPart(String contentType) throws IOException {
String bounary = "1267h27";
String body = "This is the Body String";
BufferedOutMultiPart bomp = new BufferedOutMultiPart();
bomp.setBoundary(bounary);
assertEquals(bomp.getBoundary(), bounary);
OutPart op = new OutPart();
op.addHeader("nAme", "value");
assertEquals(op.getHeaders().getFirst("NaMe"), "value");
if(contentType!= null)
op.setContentType(contentType);
op.setBody(body);
bomp.addPart(op);
MediaType mt = MediaType.valueOf("multipart/mixed; boundary=" + bounary);
MultivaluedMapImpl<String, Object> headers = new MultivaluedMapImpl<String, Object>();
ByteArrayInputStream bais =
serilizedAndGetInputStrem(bomp, BufferedOutMultiPart.class, mt, headers);