Java alternative for Ruby's vcr?
Check out betamax. It's a groovy port of VCR. It should work on the JVM with any language, I believe.
As for using a VCR-like library to record/playback DB interactions: Sven Fuchs tried this approach and didn't see much benefit to it.