Add tests for replace, remove callback