I assume that you are doing this inside a JSFUnit test?
Write-through for the session map is disabled inside a test. The reason is that during a test you usually don't want to change the state of the system by mucking with the HttpSession. But you can still change the session if you really need to.
See the javadoc for JSFUnitExternalContext.getSessionMap(): http://labs.jboss.com/file-access/default/members/jsfunit/freezone/apidocs/org/jboss/jsfunit/context/JSFUnitExternalContext.html#getSessionMap%28%29
That will tell you how to do it if you really need to.
Hope that helps,