Created unit tests for the db module