There's currently no way for a user to test session expiration in their code.
We don't have any unit/system tests that verify our code handles session expiration properly.
There should be a way to test session expiration.
I did notice that we have the ability to terminate a session using JMX mbean interface, however I'm not sure if this is useful in an automated testing context. Even if it is we should provide a wrapper for testing purposes - and add tests to our codebase which uses it.