java/db: Fixed unit tests.