### Question:
MultipartContentParser implements ParserActions { static List<MultipartItem> parse(HttpServletRequest request) throws ServletException { try { final MultipartContentParser parser = new MultipartContentParser(request.getContentType()); new BufferedReader(new InputStreamReader(request.getInputStream())).lines().forEach(parser::process); return parser.getItems(); } catch (IOException e) { throw new ServletException("Unable to parse request", e); } } MultipartContentParser(String contentType); ParserState getState(); @Override boolean isStart(String line); @Override boolean isEnd(String line); @Override ParserState closeItem(ParserState state); @Override ParserState addHeader(String line); @Override ParserState addDataLine(String line);  }### Answer:
@Test(expected = ServletException.class) public void whenMultipartRequestNotParseable_throwException() throws ServletException { HttpServletRequest request = HttpServletRequestStub.createPostRequest(); MultipartContentParser.parse(request); }