function action(sAction) {
			var bIsActive = sAction === "ActivationAction", // The resulting artist's bIsActive
				oEntityContext = oObjectPage.getBindingContext(),
				oAction = that.oModel.bindContext("special.cases." + sAction + "(...)",
					oEntityContext, {$$inheritExpandSelect : true});

			that.expectRequest({
					method : "POST",
					url : "Artists(ArtistID='42',IsActiveEntity=" + !bIsActive
						+ ")/special.cases." + sAction
						+ "?$select=ArtistID,IsActiveEntity,Messages,Name"
						+ "&$expand=BestFriend($select=ArtistID,IsActiveEntity,Name)",
					payload : {}
				}, {
					ArtistID : "42",
					BestFriend : {
						ArtistID : "23",
						IsActiveEntity : true,
						Name : bIsActive ? "Sgt. Pepper (modified)" : "Sgt. Pepper"
					},
					IsActiveEntity : bIsActive,
					Name : "The Beatles"
				});

			return Promise.all([
				// code under test
				oAction.invoke(),
				that.waitForChanges(assert)
			]).then(function (aPromiseResults) {
				oReturnValueContext = aPromiseResults[0];
				that.expectChange("isActive", bIsActive ? "Yes" : "No");

				// code under test
				oObjectPage.setBindingContext(oReturnValueContext);

				return that.waitForChanges(assert);
			});
		}
******************************************************************************************
	// Scenario: Fiori Elements Safeguard - Test 1 (Edit/Activate)
	// Test the following scenario twice with:
	// a) a row context (sap.ui.model.odata.v4.Context) of an OData V4 list binding and
	// b) a base context (sap.ui.model.Context):
	// 1. Show the active version of an entity by using the given context
	// 2. Within the binding hierarchy of the object page use a hidden binding with its own binding
	//   parameters $$patchWithoutSideEffects=true and $select=Messages to request messages.
	//   The hidden binding is a binding that is independent of the object page. Before calling
	//   the edit action, its cache stores the Artist data and the $select query option is
	//   determined for this binding. The first call of the edit action is relative to the hidden
	//   binding's bound context. Hence the operation can request the necessary selection of the
	//   Artist data using $$inheritExpandSelect. This data is then available within the return
	//   value context which serves as a binding context of the object page and as the parent
	//   context for the following activate action.
	// 3. Create an edit action with $$inheritExpandSelect=true to select all properties used in
	//   the object page. Call the action and bind the object page to the return value context.
	// 4a. Patch the inactive entity to see that $$patchWithoutSideEffects works.
	//   4b. Patch a property reachable via a navigation property (BCP: 2070137560)
	//   4c. Try to patch a property via the wrong context (not the return value context)
	//      (BCP: 2070137560)
	// 5. Show the creation row of a creation row binding (a binding that does not request data,
	//   must not be refreshed) which is relative to the return value context of the inactive
	//   version.
	// 6. Request side effects for the return value context of the inactive version to see that the
	//   creation row is untouched.
	// 7. Switch back to the active version.
	// CPOUI5ODATAV4-189
[function () {
	return this.oView.byId("table").getItems()[0].getBindingContext();
}, function () {
	return this.oModel.createBindingContext("/Artists(ArtistID='42',IsActiveEntity=true)");
}].forEach(function (fnGetParentContext, i) {
	var sTitle = "Fiori Elements Safeguard: Test 1 (Edit/Activate) " + (i ? "base" : "row")
		+ " context";

	QUnit.test(sTitle, function (assert) {
		var oCreationRow,
			oCreationRowContext,
			oModel = this.createSpecialCasesModel({autoExpandSelect : true}),
			oObjectPage,
			oReturnValueContext,
			sTable = '\
<Table id="table" items="{/Artists}">\
	<Text id="listId" text="{ArtistID}"/>\
</Table>',
			sView = '\
<FlexBox id="objectPage">\
	<Text id="id" text="{ArtistID}"/>\
	<Text id="isActive" text="{IsActiveEntity}"/>\
	<Input id="name" value="{Name}"/>\
	<Input id="bestFriend" value="{BestFriend/Name}"/>\
	<FlexBox id="creationRow">\
		<Text id="price" text="{Price}"/>\
		<Text id="artistName" text="{_Artist/Name}"/>\
	</FlexBox>\
</FlexBox>',
			that = this;

		/*
Invokes the given action (ActivationAction or EditAction) on Artist ID 42.
Sets the object page to its return value context and waits for the expected changes.

@param {string} sAction - The name of the action
@returns {Promise} - A promise that waits for the expected changes