Small refactor and mocktest pings_status.