Add tests for replacing values