history_database unit test