}
public void testGetSession()
{
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
PortletSession session = (PortletSession) newMock(PortletSession.class);
request.getPortletSession(false);
control.setReturnValue(null);
// Get it, doesn't exist, wreate false
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertNull(wr.getSession(false));
verifyControls();
request.getPortletSession(true);
control.setReturnValue(session);
// #2: Get it, wreate is true, it is wreated.
replayControls();