Add test for extension replacement
Use replace-ext module

We don’t have to write it by hand.