mock api and automatic test api