mock used api method