function getFetchMetadata(mMetaPath2Type, bAllowAnnotations) {
		return function (sMetaPath) {
			var vResult = mMetaPath2Type[sMetaPath];

			if (sMetaPath.includes("@")) {
				if (!bAllowAnnotations) {
					throw new Error(sMetaPath);
				}
				return SyncPromise.resolve(vResult);
			}

			switch (vResult) {
				case "":
					return SyncPromise.resolve({
						$kind : "Property"
					});

				case "1":
					return SyncPromise.resolve({
						$kind : "NavigationProperty"
						// $isCollection : false
					});

				case "N":
					return SyncPromise.resolve({
						$kind : "NavigationProperty",
						$isCollection : true
					});

				default:
					if (vResult && typeof vResult === "object") {
						return SyncPromise.resolve(vResult);
					}
					throw new Error(sMetaPath);
			}
		};
	}
Returns a mock "fnFetchMetadata" (see _Requestor#getModelInterface) which returns metadata
for a meta path according to the given map.

@param {object} mMetaPath2Type
  A map from meta path to symbolic type, for example
  <code>{"/Me/A" : "", "/Me/to1" : "1", "/Me/toN" : "N"}</code>, where "" means structural
  property, "N" means collection-valued navigation property and "1" means navigation property
@param {boolean} [bAllowAnnotations]
  Whether it is allowed to ask for annotations
@returns {function}
  "fnFetchMetadata"