Test for session expiration (#12139)

Change-Id: Idc8052503544ee1e740beb448d39dd592b95a19c