I'm trying to
test a method with this signature:
userinfo is a class which contains informations about the user and set in session scope when the user logged in.but when I try the test :
The problem is the userinfo class attribute is set in another method so when i try to access it in this method i got a NullPointerException , and with Autowiring the httpSession i got a new Session for each method i have to test.
What should i do with the session attribute, my method doesn't accept a session parameter , and for each test it create a WebApplicationContext with a new session.