I am trying to write a unit test class which will have to use same query to fetch the results from database two times in same test method. But as Hibernate cache is enabled
Use StatelessSession:
http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/batch.html