> 1) Can we test it with a struts integration test? > 2) How can we mock the time span (ie, we obviously don't want to wait 5 > minutes for the test to finish...).
Are you testing what happens when a session is no longer a session? Invalidate the session in your test: http://struts.apache.org/2.2.1/docs/how-do-we-get-invalidate-the-session.html Otherwise, you're testing your servlet container, which is pretty silly IMO. If you are testing the configuration file, then parse it and look for the correct timeout.