unit test for session creation