Since you have all of these in tests, I'd suggest some refactoring to keep the actual method small.

I'd suggest something that moves all this logic into a single method call where you just pass in the node and return the result from there.

```
def extract_shipper_address(node)
  return unless node
  Location.new(country: node.get_text(COUNTRY_CODE).to_s, province: node.get(STATE_CODE).to_s, city: node.get(CITY).to_s)
end
```

I'd say do that for all the other little things you've added. It'll also make fixing them easier if there's a bug.