Improved test coverage for session and server