So I have a session scoped bean and naturally, I'm getting the error you would expect in my unit tests.
java.lang.IllegalStateException: No Scope registered for scope 'Session'
What is the proper Java based way to mock a session for a unit test?
This was the old way:
Spring Test session scope bean using Junit
The thing is though that I don't need to test a controller. I'm testing a component with a session scoped bean in it. I just need a fake session so that it works.