function checkCreatedContext() {
				var oCreatedContext = aContexts[iCreateNo];

				assert.strictEqual(oCreatedContext.getModel(), that.oModel);
				assert.strictEqual(oCreatedContext.getBinding(), oBinding);
				assert.ok(/^\/EMPLOYEES\(\$uid=.+\)$/, "path with uid");
				assert.strictEqual(oCreatedContext.getModelIndex(), 0);
				assert.strictEqual(oCreatedContext.isInactive(), oFixture.bInactive);
				assert.strictEqual(oCreatedContext.isTransient(), true);
				assert.strictEqual(oBinding.iMaxLength, 42, "transient contexts are not counted");
				assert.strictEqual(oBinding.aContexts[0], oCreatedContext, "Transient context");
				assert.strictEqual(iChangeFired, iCreateNo + 1, "Change event fired");
			}
******************************************************************************************
[undefined, "~aElements~"].forEach(function (aElements) {
	[false, true].forEach(function (bCreatedAtEnd) {
		const sTitle = `createContextsForCachedData: ${aElements}, created at end=${bCreatedAtEnd}`;

	QUnit.test(sTitle, function () {
		const oBinding = this.bindList("/EMPLOYEES");
		const oCache = {
			getElements : mustBeMocked
		};
		oBinding.bFirstCreateAtEnd = bCreatedAtEnd;
		oBinding.iCreatedContexts = 7;
		const iOffset = bCreatedAtEnd ? 7 : 0;
		this.mock(oBinding).expects("withCache")
			.withExactArgs(sinon.match.func, "", true)
			.callsArgWith(0, oCache, "~path~");
		this.mock(oCache).expects("getElements")
			.withExactArgs("~path~", 23 + iOffset, 23 + 42 + iOffset)
			.returns(aElements);
		this.mock(oBinding).expects("createContexts").exactly(aElements ? 1 : 0)
			.withExactArgs(23 + iOffset, aElements, true);

		// code under test
		oBinding.createContextsForCachedData(23, 42);
	});
	});
});

	//*********************************************************************************************
// undefined -> the reinsertion callback is not called because the binding already has another cache
[undefined, false, true].forEach(function (bSuccess) {
	[false, true].forEach(function (bCreated) { // the deleted context is created-persisted
		[undefined, false, true].forEach(function (bExpanded) { // undefined -> no hierarchy
			[false, true].forEach(function (bExpandFailure) {
				const sTitle = "delete: success=" + bSuccess + ", created=" + bCreated
					+ ", expanded=" + bExpanded + ", expandFailure=" + bExpandFailure;
				if (bCreated && bExpanded || bExpandFailure && (bSuccess || !bExpanded)) {
					return;
				}

		QUnit.test(sTitle, function (assert) {
			var oBinding = this.bindList("/EMPLOYEES"),
				oBindingMock = this.mock(oBinding),
				oContext1,
				oContext1Mock,
				sContext1Path,
				aData = createData(5, 0, true, undefined, true),
				aData2 = aData.slice(4, 5),
				oDeleteCall,
				fnResolve,
				fnReject,
				oDeleteFromCachePromise = new Promise(function (resolve, reject) {
					fnResolve = resolve;
					fnReject = reject;
				}),
				oETagEntity = {},
				aPreviousContexts,
				oPromise,
				fnUndelete = sinon.spy(),
				that = this;

			if (bExpanded !== undefined) {
				oBinding.mParameters.$$aggregation = {hierarchyQualifier : "X"};
			}
			oBinding.createContexts(0, aData.slice(0, 3));
			aData2.$count = 5; // non-empty short read adds $count
			oBinding.createContexts(4, aData2);
			// aContexts now is [0, 1, 2, undefined, 4]
			oBinding.iDeletedContexts = 3;
			oContext1 = oBinding.aContexts[1];
			oContext1Mock = this.mock(oContext1);
			sContext1Path = oContext1.getPath();
			if (bCreated) { // fake a created context: it needs a negative index
				oContext1.iIndex = -1;
			}
			oContext1Mock.expects("getModelIndex").withExactArgs().returns(42);
			// also called from sinon.match.same() via toString()
			oContext1Mock.expects("isDeleted").atLeast(1).withExactArgs().returns(false);
			oContext1Mock.expects("isExpanded").withExactArgs().returns(bExpanded);
			oBindingMock.expects("collapse").exactly(bExpanded ? 1 : 0)
				.withExactArgs(sinon.match.same(oContext1), /*bAll