tests for replace working