    @Test
    public void testLoginValidUser() throws Exception {

        LoginCommand loginCom = new LoginCommand();
        loginCom.setUsername("test1");
        loginCom.setPassword("yes");
        loginController = (LoginController) context.getBean("loginController");
        ModelAndView mav = loginController.logIn(request, response, loginCom, new BindException(loginCom, "test"));
        Assert.assertTrue(mav.getView().toString().contains("tasks.htm"));
    }