Add JUnit tests for the Database class