Added test for replace keyword functionality