NH-3659 and unit tests

https://nhibernate.jira.com/browse/NH-3659