Added tests for memorySession.