NH-3534

https://nhibernate.jira.com/browse/NH-3534
Added unit test