public MockHttpSession getSession(String id) { return sessions.get(id); }
public MockHttpSession getSession(MockHttpServletRequest request, boolean create) {
String id = null;
SessionSource source = null;
Cookie[] cookies = request.getCookies();
for (int c=0; c<cookies.length; c++) {
if (cookies[c].getName().equals(MockHttpSession.SESSIONID_KEY)) {
id = cookies[c].getValue(); source = SessionSource.COOKIE; break;
}