@Test(expected = UnsupportedOperationException.class) public void testPotentialCreationOfSessionYieldsException() { testee.getSession(); }
@Override public HttpSession getSession(boolean create) { if (create) { throw new UnsupportedOperationException("Cannot create session: This is a background servlet request."); } return null; }
BackgroundServletRequestWrapper extends HttpServletRequestWrapper { @Override public HttpSession getSession(boolean create) { if (create) { throw new UnsupportedOperationException("Cannot create session: This is a background servlet request."); } return null; } }
BackgroundServletRequestWrapper extends HttpServletRequestWrapper { @Override public HttpSession getSession(boolean create) { if (create) { throw new UnsupportedOperationException("Cannot create session: This is a background servlet request."); } return null; } BackgroundServletRequestWrapper(HttpServletRequest request); }
BackgroundServletRequestWrapper extends HttpServletRequestWrapper { @Override public HttpSession getSession(boolean create) { if (create) { throw new UnsupportedOperationException("Cannot create session: This is a background servlet request."); } return null; } BackgroundServletRequestWrapper(HttpServletRequest request); @Override HttpSession getSession(boolean create); }
BackgroundServletRequestWrapper extends HttpServletRequestWrapper { @Override public HttpSession getSession(boolean create) { if (create) { throw new UnsupportedOperationException("Cannot create session: This is a background servlet request."); } return null; } BackgroundServletRequestWrapper(HttpServletRequest request); @Override HttpSession getSession(boolean create);  }