Substitute deprecated method call in HibernateContextDAO
TRUNK-4140: Substitute deprecated method call in HibernateContextDAO
removed old commented code
mock