MockHttpServletRequest is not creating a new session in a circumstance where Tomcat's implementation is. The standard is a little unclear on the correct behavior, it could be read either way. I'd prefer the Mock objects act like a production implementation.
Specifically, with this sample code:
HttpSession sess = request.getSession();
String str = (String) sess.getAttribute("anAttribute");
sess = request.getSession(true);
The unit test running Mockrunner's implementation fails, throwing java.lang.RuntimeException: session invalid at the setAttribute(...) call.
Running under tomcat (all versions I've tried) the code succeeds, the request creates a new session if it doesn't have a _valid_ one already.
I haven't tried other servlet containers, but this seems like reasonable behavior, to create a new session if you don't have a valid one already.
The specification at http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html#getSession\(boolean) is not quite explicit that getSession(boolean) should return a new session if the request doesn't have a valid one, but it could be read that way easily.