Write unit tests for database.core classes