Unit tests for session