title: How to create session in Spring Junit
body: <p>I have such layers:</p>
  
  <p>Spring Controller -> Services layer  -> Dao Layer (JPA).</p>
  
  <p>I want to write test cases of services and controller. In the other Junit will invoke controller, controller will invoke services, service layer gets database information and etc..</p>
  
  <p>In this case I do not want mocking, I want just to write junit test case (I must invoke service and service must get real data from database).</p>
  
  <p>I have only one problem, service layer get's user id from session. I get session with autowired annotation. How can I create fake session during test cases?</p>
  
  <p>p.s I think mock is not for me... because I do not wont to mock my service, I want to create real invoke of controller with real db data...</p>