How to Test and Replace