partsList.add(new StringPart("part1", "This is Value 1"));
partsList.add(new StringPart("part2", "This is Value 2"));
partsList.add(new FilePart("data.txt", LocateTestData.getTestData("data.txt")));
Part[] parts = partsList.toArray(new Part[partsList.size()]);
PostMethod method = new PostMethod(TEST_URI);
RequestEntity entity = new MultipartRequestEntity(parts, method.getParams());
method.setRequestEntity(entity);
int status = client.executeMethod(method);
Assert.assertEquals(200, status);
InputStream response = method.getResponseBodyAsStream();