refactoring test case according to api change