Add test case

add the test case code from jira

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