Add extension method for ISessionFactory
Refactoring tests to use extension method