Add tests for closing sessions

And also revert a part of the first commit on the MockArray storage,
due to a comment that could make more sense (never actually "closing"
the session).

As this is used in unit tests (and functional with its extension)
should this point be discussed ?