Improve DatabaseManager tests.
Improve DatabaseManager tests.

Test for recovery missed the case when failure occurs just before the
temporary file is deleted. No bugs found but test is good to have.

blr246/adbs-repcrec,blr246/adbs-repcrec