Code example for ModelAndView

Methods: getModel

0
        propertiesInterceptor.postHandle(null, null, null, null);        
    } 
     
    @Test
    public void testPostHandleRedirectRequest() { 
        ModelAndView mav = new ModelAndView("redirect:/somewhere");
        propertiesInterceptor.postHandle(null, null, null, mav);
         
        assertNull(mav.getModel().get(PARAM_CMP_NAME));
        assertNull(mav.getModel().get(PARAM_CMP_DESCRIPTION));
        assertNull(mav.getModel().get(PARAM_SAPE_SHOW_DUMMY_LINKS));
        assertNull(mav.getModel().get(PARAM_LOGO_TOOLTIP));
        assertNull(mav.getModel().get(PARAM_LAST_INFO_CHAGE));
        assertNull(mav.getModel().get("cmpTitlePrefix"));
        assertNull(mav.getModel().get("userDefinedCopyright"));
    } 
 
    private int getCurrentYear() { 
        return new LocalDateTime().getYear(); 
    }