Remove depreciated api call from test