[Extensions] Reduce extension tests boilerplate

A few minor changes to make test code using extensions a little bit less repetitive.