function deleteSalesOrder() {
			if (i === 0) {
				that.oView.byId("table").getBinding("items").resetChanges();
			} else if (i === 1) {
				that.oModel.resetChanges();
			} else if (i === 2) {
				const oHeaderContext = oCreatedContext.getBinding().getHeaderContext();

				assert.throws(function () {
					// code under test (JIRA: CPOUI5ODATAV4-2014)
					oHeaderContext.resetChanges();
				}, new Error("Cannot reset: " + oHeaderContext));

				assert.throws(function () {
					// code under test (JIRA: CPOUI5ODATAV4-1880)
					oCreatedContext.resetChanges();
				}, new Error("Cannot reset: " + oCreatedContext));

				return oCreatedContext.delete();
			}
		}
******************************************************************************************
	// Scenario: A creation POST fails and the "createCompleted" event handler is used to
	// immediately delete the transient row.
	// BCP: 2280183921
	QUnit.test("BCP: 2280183921: use createCompleted to delete after failure", function (assert) {
		var oPromise,
			that = this;

		return this.createView(assert).then(function () {
			var oBinding = that.oModel.bindList("/EMPLOYEES"),
				oContext;

			oBinding.attachCreateCompleted(function (oEvent) {
				assert.strictEqual(oEvent.getParameter("success"), false);

				// code under test
				oPromise = oEvent.getParameter("context").delete();
			});

			that.expectRequest({
					method : "POST",
					url : "EMPLOYEES",
					payload : {Name : "Anonymous"}
				}, createErrorInsideBatch())
				.expectMessages([{
					code : "CODE",
					message : "Request intentionally failed",
					persistent : true,
					technical : true,
					type : "Error"
				}]);
			that.oLogMock.expects("error")
				.withExactArgs("POST on 'EMPLOYEES' failed; will be repeated automatically",
					sinon.match("Request intentionally failed"), sODLB);

			oContext = oBinding.create({Name : "Anonymous"});

			return Promise.all([
				checkCanceled(assert, oContext.created()),
				that.waitForChanges(assert)
			]);
		}).then(function () {
			return oPromise;
		});
	});

	//*********************************************************************************************
	// Scenario: Table creating new entities and rejected requestSideEffects for the complete table
	// within the same $batch.
	// Steps:
	// 1. Successfully create 2 new entities.
	// 2. Create 3 further entities. one of them inactive, request side effects afterwards for the
	//    complete list; one POST request fails hence the GET request for side effects also fails
	//    and the binding is restored.
	// 3. Check that the list binding has properly restored the created contexts (already saved +
	//    still transient ones).
	// 4. A deletion of a still transient context afterwards must NOT result in a DELETE request,
	//    -> BCP 2070287827.
	QUnit.test("BCP: 2070287827: restore created entities after failed refresh", function (assert) {
		var oBinding,
			aCreatedContexts = [],
			oModel = this.createSalesOrdersModel({autoExpandSelect : true}),
			sView = '\
<Table id="table" items="{/SalesOrderList}">\
	<Text id="note" text="{Note}"/>\
</Table>',
			that = this;

		this.expectRequest("SalesOrderList?$select=Note,SalesOrderID&$skip=0&$top=100", {
				value : [{
					Note : "#42",
					SalesOrderID : "42"
				}]
			})
			.expectChange("note", ["#42"]);

		return this.createView(assert, sView, oModel).then(function () {
			oBinding = that.oView.byId("table").getBinding("items");

			that.expectChange("note", ["new2", "new1", "#42"])
				.expectRequest({
					method : "POST",
					url : "SalesOrderList",
					payload : {Note : "new1"}
				}, {
					Note : "new1",
					SalesOrderID : "43"
				})
				.expectRequest({
					method : "POST",
					url : "SalesOrderList",
					payload : {Note : "new2"}
				}, {
					Note : "new2",
					SalesOrderID : "44"
				});

			aCreatedContexts.push(oBinding.create({Note : "new1"}, /*bSkipRefresh