add test case for replace operation