public void testWithSuffix() throws Exception {
   UrlFilenameViewController ctrl = new UrlFilenameViewController();
   ctrl.setSuffix("_mysuf");
   MockHttpServletRequest request = new MockHttpServletRequest("GET", "/index.html");
   MockHttpServletResponse response = new MockHttpServletResponse();
   ModelAndView mv = ctrl.handleRequest(request, response);
   assertEquals("index_mysuf", mv.getViewName());
   assertTrue(mv.getModel().isEmpty());
 }
 public void testSettingSuffixToNullCausesEmptyStringToBeUsed() throws Exception {
   UrlFilenameViewController ctrl = new UrlFilenameViewController();
   ctrl.setSuffix(null);
   assertNotNull(
       "When setSuffix(..) is called with a null argument, the empty string value must be used instead.",
       ctrl.getSuffix());
   assertEquals(
       "When setSuffix(..) is called with a null argument, the empty string value must be used instead.",
       "",
       ctrl.getSuffix());
 }