fix testcase with deprecated api call