tests for replace.