Add test case for removing and adding same handler at once