@Test
public void testMultipartPostWithParametersAndPayload() throws Exception {
HttpPost post = new HttpPost("http://localhost:" + PORT_PATH + "/rest/customerservice/customers/multipart/123?query=abcd");
MultipartEntity multipart = new MultipartEntity(HttpMultipartMode.STRICT);
multipart.addPart("part1", new FileBody(new File(this.getClass().getClassLoader().getResource("java.jpg").toURI()), "java.jpg"));
multipart.addPart("part2", new FileBody(new File(this.getClass().getClassLoader().getResource("java.jpg").toURI()), "java.jpg"));
StringWriter sw = new StringWriter();
jaxb.createMarshaller().marshal(new Customer(123, "Raul"), sw);
multipart.addPart("body", new StringBody(sw.toString(), "text/xml", Charset.forName("UTF-8")));
post.setEntity(multipart);
HttpResponse response = httpclient.execute(post);