Fix tests

* fake withNewSession for unit test