Added getSessionId method.
Tests overhaul.