### Question:
PermissionSensitiveCacheServlet extends SlingSafeMethodsServlet { public boolean isUriValid( String requestUri ){ boolean isValidUri = true; if(!StringUtils.startsWith( requestUri, "/" ) ){ isValidUri = false; } return isValidUri; }  void doHead(SlingHttpServletRequest request, SlingHttpServletResponse response); boolean isUriValid( String requestUri );  }### Answer:
@Test public void testRequestUriNull(){ String requestUri = null; boolean isValidUri = servlet.isUriValid( requestUri ); assertFalse( isValidUri ); }
@Test public void testRequestUriRelative(){ String requestUri = "dam/test.jpg"; boolean isValidUri = servlet.isUriValid( requestUri ); assertFalse( isValidUri ); }
@Test public void testRequestUriAbsolute(){ boolean isValidUri = servlet.isUriValid( TEST_PAGE ); assertTrue( isValidUri ); }