NH-3534

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