Test coverage for the Database class.

Add coverage for the Database class.

Ignore the message about test failure (cherry-picked without rewriting the commit message...).