Your best bet is to use mock objects like jMock and EasyMock. Both are fairly equivalent, though I prefered jMock's API when evaluating them six months ago. Where you mock depends on what you're
testing.
Assuming you are using the DAO
pattern, you can test your business logic by mocking your DAOs and you can test your DAOs by mocking Hibernate. I haven't done the latter, but it should work exactly the same.
Basically, mock objects allow you to replace the real Hibernate Session implementation with a mock one. Mock objects are unlike stubs that simply do nothing. Instead, for each test you tell the mock what method calls it should expect and what to do in response (return something, throw an exception, etc). Then you test the object that's hooked up to the mock, and the mock will record the method calls it receives. At the end of the test, the mock compares the expected calls to the ones received and throws an exception if they don't match.
For example, to test that UserDao.get(Integer id) throws UserNotFoundException when no User matches the ID, you'd tell the mock Session to expect a load(Object id) call and return null in response. Next, you call UserDao.get(id) in a try-catch block. If you catch UserNotFoundException, the test passes. Otherwise, it fails. If the mock receives any other method call, the test will also fail.
The combination of mock objects and test fixtures for creating objects to return from mock calls is very powerful and flexible.