unit tests for database access functions finished