@Test
public void testUpload() throws Exception {
File toupload = folder.newFile("Jojo");
PostMethod pm = new PostMethod(serverurl+"/"+resourceUrl);
Part[] parts = {
new StringPart("originalname", toupload.getAbsolutePath(),"UTF-8"),
new StringPart("filename", toupload.getName(),"UTF-8"),
new FilePart("file", toupload)
};
pm.setRequestEntity(new MultipartRequestEntity(parts, pm.getParams()));
HttpClient cl = new HttpClient();