### Question:
FileDownloadAction implements Action { String sanitizeInputPath( String value ) { if (value != null && value.toUpperCase().contains("WEB-INF")) { return null; } return value; }  String execute(); void setInputPath(String value); InputStream getInputStream();  }### Answer:
@Test public void testSanitizeInputPathShouldAllowSimpleParameter() throws Exception { assertEquals("foo", fileDownloadAction.sanitizeInputPath("foo")); }
@Test public void testSanitizeInputPathShouldReturnNullForNullInput() throws Exception { assertNull(fileDownloadAction.sanitizeInputPath(null)); }
@Test public void testSanitizeInputPathShouldReturnNullForLeadingWebInf() throws Exception { assertNull(fileDownloadAction.sanitizeInputPath("WEB-INF/foo")); }
@Test public void testSanitizeInputPathShouldReturnNullForNonLeadingWebInf() throws Exception { assertNull(fileDownloadAction.sanitizeInputPath("./WEB-INF/foo")); }
@Test public void testSanitizeInputPathShouldReturnNullForNonUppercaseWebInf() throws Exception { assertNull(fileDownloadAction.sanitizeInputPath("./wEB-Inf/foo")); }