Add get_all_categories method with tests