function test(sRetryAfterValue) {
			oModelMock.expects("_getHeader")
				.withExactArgs("retry-after", sinon.match.object)
				.exactly(sRetryAfterValue === undefined ? 0 : 1)
				.returns(sRetryAfterValue);

			// code under test
			assert.strictEqual(ODataModel.prototype.checkAndProcessRetryAfterError.call(oModel,
				"~oRequest", oErrorResponse, "~fnSuccess", "~fnError"), false);
		}
******************************************************************************************
	QUnit.test("_addSubEntitiesToPayload", function (assert) {
		var oContextBusinessPartner = createContext(),
			oContextContact0 = createContext(),
			oContextContact1 = createContext(),
			oContextLineItem0 = createContext(),
			oContextLineItem1 = createContext(),
			oContextProduct = createContext(),
			oContextSalesOrder = createContext(),
			oHelperMock = this.mock(_Helper),
			oModel = {
				_getObject : function () {},
				// allow recursive calls within _addSubEntitiesToPayload
				_addSubEntitiesToPayload : ODataModel.prototype._addSubEntitiesToPayload
			},
			oModelMock = this.mock(oModel),
			oPayload = {__metadata : "~metadata-SalesOrder", key : "SalesOrder"},
			that = this;

		function createContext() {
			return {getPath : function () {}, getSubContexts : function () {}};
		}

		function expectContextAccess(oContext, sEntityKey) {
			var oEntity = {__metadata : "~metadata-" + sEntityKey, key : sEntityKey},
				sPath = "/~" + sEntityKey;

			that.mock(oContext).expects("getPath").withExactArgs().returns(sPath);
			oModelMock.expects("_getObject").withExactArgs(sPath).returns(oEntity);
			oHelperMock.expects("merge").withExactArgs({}, sinon.match.same(oEntity)).callThrough();
		}

		this.mock(oContextSalesOrder).expects("getSubContexts")
			.withExactArgs()
			.returns({
				toBusinessPartner : oContextBusinessPartner,
				toLineItems : [oContextLineItem0, oContextLineItem1]
			});
		expectContextAccess(oContextBusinessPartner, "BusinessPartner");
		this.mock(oContextBusinessPartner).expects("getSubContexts")
			.withExactArgs()
			.returns({toContacts : [oContextContact0, oContextContact1]});
		expectContextAccess(oContextContact0, "Contact0");
		this.mock(oContextContact0).expects("getSubContexts").withExactArgs().returns();
		expectContextAccess(oContextContact1, "Contact1");
		this.mock(oContextContact1).expects("getSubContexts").withExactArgs().returns();
		expectContextAccess(oContextLineItem0, "LineItem0");
		this.mock(oContextLineItem0).expects("getSubContexts")
			.withExactArgs()
			.returns({toProduct : oContextProduct});
		expectContextAccess(oContextProduct, "Product");
		this.mock(oContextProduct).expects("getSubContexts").withExactArgs().returns();
		expectContextAccess(oContextLineItem1, "LineItem1");
		this.mock(oContextLineItem1).expects("getSubContexts").withExactArgs().returns();

		// code under test
		ODataModel.prototype._addSubEntitiesToPayload.call(oModel, oContextSalesOrder, oPayload);

		assert.deepEqual(oPayload, {
			__metadata : "~metadata-SalesOrder",
			key : "SalesOrder",
			toBusinessPartner : {
				key : "BusinessPartner",
				toContacts : [
					{key : "Contact0"},
					{key : "Contact1"}
				]
			},
			toLineItems : [
				{
					key : "LineItem0",
					toProduct : {key : "Product"}
				},
				{key : "LineItem1"}
			]
		});
	});

	//*********************************************************************************************
	QUnit.test("_isTransitionMessagesOnly", function (assert) {
		var oModel = {oTransitionMessagesOnlyGroups: new Set(["~group"])};

		// code under test
		assert.strictEqual(ODataModel.prototype._isTransitionMessagesOnly.call(oModel, "~group"), true);
		assert.strictEqual(ODataModel.prototype._isTransitionMessagesOnly.call(oModel, "~group2"), false);
	});

	//*********************************************************************************************
	QUnit.test("setTransitionMessagesOnlyForGroup", function (assert) {
		var oModel = {oTransitionMessagesOnlyGroups: new Set()};

		// code under test
		ODataModel.prototype.setTransitionMessagesOnlyForGroup.call(oModel, "~group", true);

		assert.ok(oModel.oTransitionMessagesOnlyGroups.has("~group"));
		assert.strictEqual(oModel.oTransitionMessagesOnlyGroups.size, 1);

		// code under test
		ODataModel.prototype.setTransitionMessagesOnlyForGroup.call(oModel, "~group", false);

		assert.notOk(oModel.oTransitionMessagesOnlyGroups.has("~group"));
		assert.strictEqual(oModel.oTransitionMessagesOnlyGroups.size, 0);
	});

	//*********************************************************************************************
[{
	annotationURI : [],
	cacheKey : "~metadataUrl#annotations",
	ignoreAnnotationsFromMetadata : false
}, {
	annotationURI : ["~annotationURI"],
	cacheKey : "~metadataUrl#annotations_~annotationURI#annotations",
	ignoreAnnotationsFromMetadata : false
}, {
	annotationURI : [],
	cacheKey : undefined,
	ignoreAnnotationsFromMetadata : true
}, {
	annotationURI : ["~annotationURI"],
	cacheKey : "~annotationURI#annotations",
	ignoreAnnotationsFromMetadata : true
}].forEach(function (oFixture, i) {
	QUnit.test("_getAnnotationCacheKey, with ignoreAnnotationsFromMetadata, " + i, function (assert) {
		var oModel = {
				aAnnotationURIs : oFixture.annotationURI,
				bIgnoreAnnotationsFromMetadata : oFixture.ignoreAnnotationsFromMetadata,
				bSkipMetadataAnnotationParsing : false,
				bUseCache : true
			};

		// code under test
		assert.strictEqual(ODataModel.prototype._getAnnotationCacheKey.call(oModel, "~metadataUrl"),
			oFixture.cacheKey);
	});
});

	//*********************************************************************************************
	QUnit.test("getReporter", function (assert) {
		var fnCatchHandler,
			oModel = {
				_handleError : function () {}
			};

		// code under test
		fnCatchHandler = ODataModel.prototype.getReporter.call(oModel, "~reporter");

		this.mock(oModel).expects("_handleError").withExactArgs("~oError", undefined, "~reporter");

		// code under test
		fnCatchHandler("~oError");
	});

	//*********************************************************************************************
[{
	parameters: undefined,
	expectedIsCanonicalRequestNeededParam: undefined,
	expectedPath: "~path"
}, {
	parameters: null,
	expectedIsCanonicalRequestNeededParam: undefined,
	expectedPath: "~path"
}, {
	parameters: {},
	expectedIsCanonicalRequestNeededParam: undefined,
	expectedPath: "~path"
}, {
	parameters: {canonicalRequest: false},
	expectedIsCanonicalRequestNeededParam: false,
	expectedPath: "~path"
}, {
	parameters: {canonicalRequest: true},
	expectedIsCanonicalRequestNeededParam: true,
	resolvedPath: undefined,
	expectedPath: "~path"
}, {
	parameters: {canonicalRequest: true},
	expectedIsCanonicalRequestNeededParam: true,
	resolvedPath: "~canonicalPath",
	expectedPath: "~canonicalPath"
}].forEach(function (oFixture, i) {
	QUnit.test("_isReloadNeeded: canonicalRequest can affect sPath #" + i, function (assert) {
		var oModel = {
				oMetadata: {
					_getEntityTypeByPath: function () {},
					isLoaded: function () {}
				},
				_isCanonicalRequestNeeded: function () {},
				_isCreatedEntity: function () {},
				_getObject: function () {},
				resolve: function () {}
			};

		this.mock(oModel.oMetadata).expects("isLoaded").withExactArgs().returns(true);
		this.mock(oModel).expects("_isCanonicalRequestNeeded")
			.withExactArgs(oFixture.expectedIsCanonicalRequestNeededParam)
			.returns(!!oFixture.resolvedPath);
		this.mock(oModel).expects("resolve")
			.withExactArgs("~path", undefined, true)
			.exactly(oFixture.resolvedPath ? 1 : 0)
			.returns(oFixture.resolvedPath);
		this.mock(oModel).expects("_getObject").withExactArgs(oFixture.expectedPath).returns(/*not relevant