title: unable to put spy on HttpSession / Mockito
body: <p>I want partial mocking on <code>Httpsession</code> but for that i need to spy it instead of mocking it , and it's a interface I can't get without request object which is already mocked.</p>
  
  <p>please help.</p>
  
  <p>In another word , how can I get a object of <code>HttpSession</code> without <code>HttpServletRequest</code> object.</p>
  
  <p>MORE DETAIL::</p>
  
  <p>There is a servlet I want to test , servlet have session and puts  "loginBean" (which contain loged in user related info) inside session, which I have mocked already and working fine , now IN GUI level , there are 2 tab , DetailSet1 , detailsSet2 , when you enter data of DetailSet1 , it get saved in session and also does some business logic , now it comes to DetailsSet2 , you already have DetailSet1 in session , so it got all it needs , data is saved in DB.  No it's obvious I have to mock <code>HttpSession</code> because I am running unit cases from outside the container , but data which gets stored is also in <code>Httpsession</code>  , if I mock those as well , it defeats the purpose of testing. back to what I started with , I need <code>Httpsession</code> object to return mocked data for what I have it mocked for and it is suppose to act like any normal <code>HttpSession</code> object for other cases. Like , if I do session.setAttribute("name","Vivek) , then <code>session.getAttribute("name")</code> should <code>return "Vivek"</code> after that , but in case of mocked object it return <code>null</code> why? because I haven't mocked behaviour for <code>getAttribute("name")</code>. I am really sorry if I am still can't make anyone understand what I am asking for. </p>
  
  <p>In simple word Partial mocking on <code>HttpSession</code>.</p>