Thank you both for your answers. Recent versions of Spring have their own way of creating a mock servlet context and their own mock sessions and requests (MockHttpServletRequest) and those cannot be combined with wicket (at least I didn't find a way to do it), because if you go that route there is no wicket session.
I.e. annotating a test with @WebApplication and declaring an autowired field as org.springframework.mock.web.MockHttpServletRequest will give you a spring session but no wicket session. If you instead use WicketTester then it all seems to work. On Tue, Sep 2, 2014 at 4:04 PM, lucast <lucastol...@hotmail.com> wrote: > Hi Marios, > Have you had a look at the on-line wicket guide? > https://wicket.apache.org/guide/guide/testingspring.html > > That is a really good chapter for setting up Wicket Spring testing. > > I hope that helps, > Lucas > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Unit-tests-that-use-wicket-s-session-and-spring-session-tp4667270p4667297.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >