public void testMultipartRequestTooLarge() throws Exception {
PostMethod post = new PostMethod("http://localhost:" + PORT + "/bookstore/books/image");
String ct = "multipart/mixed";
post.setRequestHeader("Content-Type", ct);
Part[] parts = new Part[1];
parts[0] = new FilePart("image",
new ByteArrayPartSource("testfile.png", new byte[1024 * 1024 * 15]),
"image/png", null);
post.setRequestEntity(new MultipartRequestEntity(parts, post.getParams()));
HttpClient httpclient = new HttpClient();