add unit tests for get_candidates()