Added method `regenerate()` which will regenerate a new session key. Also added test for this method.