### Question:
Util { public static ParsedContentDisposition parseContentDisposition(String contentDisposition) { Matcher m = CONTENT_DISPOSITION_PATTERN.matcher(contentDisposition); if (m.find() && m.groupCount() == 2) { return new ParsedContentDisposition(m.group(1), m.group(2)); } return null; }  static ParsedContentDisposition parseContentDisposition(String contentDisposition);  }### Answer:
@Test public void testContentDispositionParsing() throws Exception { final String contentDisposition = "attachment; filename=\"plans.pdf\""; final Util.ParsedContentDisposition parsed = Util.parseContentDisposition(contentDisposition); assertNotNull(parsed); assertEquals("plans.pdf", parsed.getFileName()); assertEquals("attachment", parsed.getContentDispositionType()); }
@Test public void testContentDispositionParsingBadParse() throws Exception { final String contentDisposition = "bad-header"; assertNull(Util.parseContentDisposition(contentDisposition)); }