testing: added PrepareFailure which force a failure for some api calls