function encode(s) {
			return encodeURIComponent(s).replace(/'/g, "%27");
		}
******************************************************************************************
	["", "foo", "{path : 'foo'}", 'path : "{\\f,o,o}"'].forEach(function (sString) {
		QUnit.test("format: 14.4.11 Expression edm:String: " + sString, function (assert) {
			return withGwsampleModel(assert, function (oMetaModel) {
				var sMetaPath = sPath2Product
						+ "/com.sap.vocabularies.UI.v1.FieldGroup#Dimensions/Data/0/Label",
					oCurrentContext = oMetaModel.getContext(sMetaPath),
					oRawValue = oMetaModel.getProperty(sMetaPath);

				// evil, test code only: write into ODataMetaModel
				oRawValue.String = sString;

				assert.strictEqual(formatAndParse(oRawValue, oCurrentContext), sString);
			});
		});
	});

	//*********************************************************************************************
	QUnit.test("format: forward to getExpression: raw value auto-determined", function (assert) {
		var that = this;

		return withGwsampleModel(assert, function (oMetaModel) {
			var sMetaPath = sPath2Product
				+ "/com.sap.vocabularies.UI.v1.FieldGroup#Dimensions/Data/0/Label",
			oCurrentContext = oMetaModel.getContext(sMetaPath),
			sString = "{path : 'foo'}",
			oRawValue = oMetaModel.getProperty(sMetaPath);

			that.mock(Expression).expects("getExpression")
				.withExactArgs(sinon.match.same(oCurrentContext), sinon.match.same(oRawValue), true)
				.returns(sString);

			AnnotationHelper.format(oCurrentContext);
		});
	});

	//*********************************************************************************************
	QUnit.test("format: 14.4.11 Expression edm:String: references", function (assert) {
		return withGwsampleModel(assert, function (oMetaModel) {
			var sMetaPath = sPath2Product
					+ "/com.sap.vocabularies.UI.v1.FieldGroup#Dimensions/Data/0/Label",
				oCurrentContext = oMetaModel.getContext(sMetaPath),
				oEntityTypeBP,
				oRawValue = oMetaModel.getProperty(sMetaPath),
				oSingleBindingInfo;

			function getSetting(sName) {
				assert.strictEqual(sName, "bindTexts");
				return true;
			}

			oCurrentContext.getSetting = getSetting;

			oSingleBindingInfo = formatAndParse(oRawValue, oCurrentContext);

			assert.deepEqual(oSingleBindingInfo, {
				path : "/##/dataServices/schema/[${namespace}==='GWSAMPLE_BASIC']/entityType/"
					// "$\{name}" to avoid that Maven replaces "${name}"
					+ "[$\{name}==='Product']/com.sap.vocabularies.UI.v1.FieldGroup"
					+ "#Dimensions/Data/[${Value/Path}==='Width']/Label/String"
			});

			// ensure that the formatted value does not contain double quotes
			assert.ok(AnnotationHelper.format(oCurrentContext, oRawValue).indexOf('"') < 0);


			// check escaping via fake annotation
			oEntityTypeBP = oMetaModel.getObject(sPath2Product);
			oEntityTypeBP["foo{Dimensions}"]
				= oEntityTypeBP["com.sap.vocabularies.UI.v1.FieldGroup#Dimensions"];
			sMetaPath = sPath2Product + "/foo{Dimensions}/Data/0/Label";
			oCurrentContext = oMetaModel.getContext(sMetaPath);
			oRawValue = oMetaModel.getProperty(sMetaPath);
			oCurrentContext.getSetting = getSetting;

			oSingleBindingInfo = formatAndParse(oRawValue, oCurrentContext);

			assert.deepEqual(oSingleBindingInfo, {
				path : "/##/dataServices/schema/[${namespace}==='GWSAMPLE_BASIC']/entityType/"
					+ "[$\{name}==='Product']/foo{Dimensions}/Data/[${Value/Path}==='Width']"
					+ "/Label/String"
			});
		});
	});

	//*********************************************************************************************
	[
		{typeName : "Bool", result : "true"},
		{typeName : "Date", result : "2015-03-24"},
		{typeName : "DateTimeOffset", result : "2015-03-24T14:03:27Z"},
		{typeName : "Decimal", result : "-123456789012345678901234567890.1234567890"},
		{typeName : "Float", result : "-7.4503e-36"},
		{typeName : "Guid", result : "0050568D-393C-1ED4-9D97-E65F0F3FCC23"},
		{typeName : "Int", result : "9007199254740992"},
		{typeName : "TimeOfDay", result : "13:57:06"}
	].forEach(function (oFixture, index) {
		var sTitle = "format: 14.4.x Constant Expression edm:" + oFixture.typeName;

		QUnit.test(sTitle, function (assert) {
			return withGwsampleModelAndTestAnnotations(assert, function (oMetaModel) {
				var sMetaPath = sPath2BusinessPartner
						+ "/com.sap.vocabularies.UI.v1.Identification/3/Value/Apply/Parameters/"
						+ (2 * index),
					oCurrentContext = oMetaModel.getContext(sMetaPath),
					oRawValue = oMetaModel.getObject(sMetaPath);

				assert.strictEqual(formatAndParse(oRawValue, oCurrentContext), oFixture.result);
			});
		});
	});

	//*********************************************************************************************
	["", "/", ".", "foo", "path : 'foo'", 'path : "{\\f,o,o}"'].forEach(function (sPath) {
		var sTitle = "format: 14.5.12 Expression edm:Path: " + JSON.stringify(sPath);

		QUnit.test(sTitle, function (assert) {
			var oMetaModel = new JSONModel({
					"Value" : {
						"Path" : sPath
					}
				}),
				sMetaPath = "/Value",
				oCurrentContext = oMetaModel.getContext(sMetaPath),
				oRawValue = oMetaModel.getProperty(sMetaPath),
				oSingleBindingInfo;

			this.oLogMock.expects("warning").withExactArgs(
				"Could not find property '" + sPath + "' starting from '/Value/Path'", null,
				"sap.ui.model.odata.AnnotationHelper");

			oSingleBindingInfo = formatAndParse(oRawValue, oCurrentContext);

			assert.strictEqual(typeof oSingleBindingInfo, "object", "got a binding info");
			assert.strictEqual(oSingleBindingInfo.path, sPath);
			assert.strictEqual(oSingleBindingInfo.type, undefined);
		});
	});

	//*********************************************************************************************
	[
		oBoolean,
		oByte,
		oDateTime,
		oDateTimeOffset,
		oDecimal,
		oDouble,
		oFloat,
		oGuid,
		oInt16,
		oInt32,
		oInt64,
		oInt64,
		oSByte,
		oSingle,
		oString10,
		oString80,
		oTime
	].forEach(function (oType, i) {
		var sPath = sPath2Product + "/com.sap.vocabularies.UI.v1.Identification/" + i
				+ "/Value/Eq/0";

		QUnit.test("format: 14.5.12 Expression edm:Path w/ type, path = " + sPath
			+ ", type = " + oType.typeClass.getMetadata().getName(),
			function (assert) {
				return withTestModel(assert, function (oMetaModel) {
					var oCurrentContext = oMetaModel.getContext(sPath),
						oRawValue = oMetaModel.getObject(sPath),
						sBinding,
						oSingleBindingInfo;

					sBinding = format(oRawValue, oCurrentContext);

					assert.ok(!/constraints\s*:\s*{}/.test(sBinding),
						"No empty constraints in binding");

					oSingleBindingInfo = parse(sBinding);

					assert.strictEqual(oSingleBindingInfo.path, oRawValue.Path);
					assert.ok(oSingleBindingInfo.type instanceof oType.typeClass,
						"type is " + oType.typeClass.getMetadata().getName());
					assert.deepEqual(oSingleBindingInfo.type.oConstraints, oType.constraints);

					// ensure that the formatted value does not contain double quotes
					assert.ok(AnnotationHelper.format(oCurrentContext, oRawValue).indexOf('"') < 0);
				});
			}
		);
	});
	// Q: output simple binding expression in case application has not opted-in to complex ones?
	//    /* if (BindingInfo.parse === sap.ui.base.BindingParser.simpleParser) {}