function createError(oErrorResponse, iHttpStatus = 500, dRetryAfter = false) {
		const oError = new Error("Communication error: " + iHttpStatus + " ");
		if (oErrorResponse) {
			oError.error = Object.assign({
					code : "CODE",
					message : "Request intentionally failed"
				}, oErrorResponse);
		}
		// oError.requestUrl = undefined; // @see checkRequest
		// oError.resourcePath = undefined; // @see checkRequest
		oError.retryAfter = dRetryAfter;
		oError.status = iHttpStatus;
		// oError.statusText = ""; // not needed

		return oError;
	}
Creates an error to be used in {@link #expectRequest}. The result is similar to that of
{@link _Helper.createError} and lets a $direct or $batch request fail.

@param {object} [oErrorResponse]
  The <code>error</code> property of a simulated JSON error response; default values for the
  properties "code" and "message" are provided in that case
@param {number} [iHttpStatus=500]
  The HTTP status code for the simulated error response
@param {Date} [dRetryAfter]
  The data corresponding to a "Retry-After" HTTP response header value in case of 503
@returns {Error}
  The error object for {@link #expectRequest}