Add unit tests for _session and _builder