function createContext(sType, sPath) {
				if (sType === "base") {
					return oModel.createBindingContext(sPath);
				}
				if (sType === "v4") {
					return Context.create(oModel, oParentBinding, sPath);
				}

				return undefined;
			}
******************************************************************************************
	QUnit.test("destroyPreviousContexts: all", function (assert) {
		var oBinding = this.bindList("relative"),
			oContext1 = {
				isTransient : function () {},
				destroy : function () {}
			},
			oContext2 = {
				isTransient : function () {},
				destroy : function () {}
			},
			oContext3 = {
				isTransient : function () {},
				destroy : function () {}
			};

		oBinding.mPreviousContextsByPath = {p1 : oContext1, p2 : oContext2, p3 : oContext3};
		this.mock(oContext1).expects("isTransient").withExactArgs().returns(false);
		this.mock(oContext1).expects("destroy").withExactArgs();
		this.mock(oContext2).expects("isTransient").withExactArgs().returns(false);
		this.mock(oContext2).expects("destroy").withExactArgs();
		this.mock(oContext3).expects("isTransient").withExactArgs().returns(false);
		this.mock(oContext3).expects("destroy").withExactArgs();

		// code under test
		oBinding.destroyPreviousContexts();

		assert.deepEqual(oBinding.mPreviousContextsByPath, {});
	});

	//*********************************************************************************************
	QUnit.test("destroyPreviousContexts: aPathsToDelete", function (assert) {
		var oBinding = this.bindList("relative"),
			oContext1 = { // no flag
				destroy : function () {},
				isEffectivelyKeptAlive : function () {},
				isOutOfPlace : mustBeMocked,
				isTransient : function () {}
			},
			oContext2 = { // keepAlive
				iIndex : 2,
				isEffectivelyKeptAlive : function () {}
			},
			oContext3 = { // delete pending
				iIndex : 3,
				oDeletePromise : new SyncPromise(function () {}),
				isEffectivelyKeptAlive : function () {},
				isOutOfPlace : mustBeMocked
			},
			oContext4 = { // deleted
				oDeletePromise : SyncPromise.resolve(),
				destroy : function () {},
				isEffectivelyKeptAlive : function () {},
				isOutOfPlace : mustBeMocked,
				isTransient : function () {}
			},
			oContext5 = { // transient
				isEffectivelyKeptAlive : function () {},
				isOutOfPlace : mustBeMocked,
				isTransient : function () {}
			},
			oContext8 = { // out of place
				oDeletePromise : {}, // must be ignored
				iIndex : 8,
				isEffectivelyKeptAlive : function () {},
				isOutOfPlace : mustBeMocked
			};

		oBinding.mPreviousContextsByPath = {
			p1 : oContext1,
			p2 : oContext2,
			p3 : oContext3,
			p4 : oContext4,
			p5 : oContext5,
			p6 : "~oContext6~", // not in selection
			p8 : oContext8
		};
		this.mock(oContext1).expects("isEffectivelyKeptAlive").withExactArgs().returns(false);
		this.mock(oContext1).expects("isOutOfPlace").withExactArgs().returns(false);
		this.mock(oContext1).expects("isTransient").withExactArgs().returns(false);
		this.mock(oContext1).expects("destroy").withExactArgs();
		this.mock(oContext2).expects("isEffectivelyKeptAlive").withExactArgs().returns(true);
		this.mock(oContext3).expects("isEffectivelyKeptAlive").withExactArgs().returns(false);
		this.mock(oContext3).expects("isOutOfPlace").withExactArgs().returns(false);
		this.mock(oContext4).expects("isEffectivelyKeptAlive").withExactArgs().returns(false);
		this.mock(oContext4).expects("isOutOfPlace").withExactArgs().returns(false);
		this.mock(oContext4).expects("isTransient").withExactArgs().returns(false);
		this.mock(oContext4).expects("destroy").withExactArgs();
		this.mock(oContext5).expects("isEffectivelyKeptAlive").withExactArgs().returns(false);
		this.mock(oContext5).expects("isOutOfPlace").withExactArgs().returns(false);
		this.mock(oContext5).expects("isTransient").withExactArgs().returns(true);
		this.mock(oContext8).expects("isEffectivelyKeptAlive").withExactArgs().returns(false);
		this.mock(oContext8).expects("isOutOfPlace").withExactArgs().returns(true);

		// code under test
		oBinding.destroyPreviousContexts(["p1", "p2", "p3", "p4", "p5", "p7", "p8"]);

		assert.deepEqual(oBinding.mPreviousContextsByPath,
			{p2 : oContext2, p3 : oContext3, p6 : "~oContext6~", p8 : oContext8});
		assert.strictEqual(oContext2.iIndex, undefined);
		assert.strictEqual(oContext3.iIndex, undefined);
		assert.strictEqual(oContext8.iIndex, undefined);
	});

	//*********************************************************************************************
	QUnit.test("destroyPreviousContexts: cache & hidden context", function (assert) {
		var oBinding = this.bindList("/EMPLOYEES"),
			oContext1 = {
				iIndex : undefined,
				destroy : function () {},
				isEffectivelyKeptAlive : function () {},
				isOutOfPlace : mustBeMocked,
				isTransient : function () {}
			},
			oContext2 = {
				iIndex : 0,
				destroy : function () {},
				isEffectivelyKeptAlive : function () {},
				isOutOfPlace : mustBeMocked,
				isTransient : function () {}
			};

		oBinding.mPreviousContextsByPath = {
			p1 : oContext1,
			p2 : oContext2,
			p3 : "~oContext3~"
		};
		this.mock(oContext1).expects("isEffectivelyKeptAlive").withExactArgs().returns(false);
		this.mock(oContext1).expects("isOutOfPlace").withExactArgs().returns(false);
		this.mock(oContext1).expects("isTransient").withExactArgs().returns(false);
		this.mock(oContext1).expects("destroy").withExactArgs();
		this.mock(oContext2).expects("isEffectivelyKeptAlive").withExactArgs().returns(false);
		this.mock(oContext2).expects("isOutOfPlace").withExactArgs().returns(false);
		this.mock(oContext2).expects("isTransient").withExactArgs().returns(false);
		this.mock(oContext2).expects("destroy").withExactArgs();
		this.mock(oBinding.oHeaderContext).expects("getPath").withExactArgs().returns("/EMPLOYEES");
		this.mock(_Helper).expects("getRelativePath")
			.withExactArgs("p1", "/EMPLOYEES").returns("relative/path");
		this.mock(oBinding.oCache).expects("removeKeptElement").withExactArgs("relative/path");

		// code under test
		oBinding.destroyPreviousContexts(["p1", "p2"]);

		assert.deepEqual(oBinding.mPreviousContextsByPath, {p3 : "~oContext3~"});
	});

	//*********************************************************************************************
	QUnit.test("destroyPreviousContexts: binding already destroyed", function (assert) {
		var oBinding = this.bindList("relative");

		oBinding.destroy();

		// code under test - simulate a pre-rendering task after the binding was destroyed
		oBinding.destroyPreviousContexts();

		assert.strictEqual(oBinding.mPreviousContextsByPath, undefined);
	});

	//*********************************************************************************************
	QUnit.test("destroyPreviousContextsLater", function () {
		var oBinding = this.bindList("/EMPLOYEES"),
			oBindingMock = this.mock(oBinding),
			oModelMock = this.mock(this.oModel),
			aPaths = ["path"],
			oTaskExpectation;

		// mock early to catch even the function created using bind()
		oBindingMock.expects("destroyPreviousContexts").never();
		oModelMock.expects("addPrerenderingTask").never();

		// code under test
		oBinding.destroyPreviousContextsLater([]);

		oTaskExpectation = oModelMock.expects("addPrerenderingTask")
			.withExactArgs(sinon.match.func);

		// code under test
		oBinding.destroyPreviousContextsLater(aPaths);

		oBindingMock.expects("destroyPreviousContexts")
			.on(oBinding).withExactArgs(sinon.match.same(aPaths));

		// code under test - callback function
		oTaskExpectation.args[0][0]();
	});

	//*********************************************************************************************
	QUnit.test("removeCreated", function (assert) {
		var oBinding = this.bindList("/EMPLOYEES"),
			oContext0 = Context.create(this.oModel, oBinding, "/EMPLOYEES($uid=id-1-23)", -1,
				SyncPromise.resolve(Promise.resolve())),
			oContext1 = Context.create(this.oModel, oBinding, "/EMPLOYEES($uid=id-1-24)", -2,
				SyncPromise.resolve()), // let's assume this is created, persisted, kept alive
			oContext2 = Context.create(this.oModel, oBinding, "/EMPLOYEES($uid=id-1-25)", -3,
				SyncPromise.resolve(Promise.resolve()), /*bInactive