Updated the code to test the session

Signed-off-by: Roshan <roshanbhgt@gmail.com>