Add additional tests for replace