Fix test failure due to missing uri.to_s