I was referring to the scenario where a test has mocked the session. In that case you couldn't really have used these methods before either as the read() or write() method would likely have been mocked.