some hibernate tests and code