Add tests for replacement callbacks