--[[----------------------------------------------------------------------------

ADOBE CONFIDENTIAL
------------------
Copyright 2016 Adobe Systems Incorporated
All Rights Reserved.

NOTICE: All information contained herein is, and remains the property of
Adobe Systems Incorporated and its suppliers, if any. The intellectual and
technical concepts contained herein are proprietary to Adobe Systems
Incorporated and its suppliers and are protected by all applicable
intellectual property laws, including trade secret and copyright laws.
Dissemination of this information or reproduction of this material is
strictly forbidden unless prior written permission is obtained from
Adobe Systems Incorporated.

----------------------------------------------------------------------------]]--

--[[

This file contains manually generated test cases for the migration of the LrM WF DocStore from v1 to v2.

It is mostly of historical interest, but is retained for now to have a working example how to generate
test documents.

]]--
	-- WF.core.rxlua
local WFRxTestCase = require 'WFRxTestCase'

local WFFileUtils = require "WFFileUtils"

local WFRxDocStoreImp = require "WFRxDocStoreImp"

local WFOldOzDocStoreWriter = require "WFOldOzDocStoreWriter"

local OzDocStoreMigratorUtils = require "OzDocStoreMigratorUtils"

local getTestDataDocStorePath = assert( OzDocStoreMigratorUtils.getTestDataDocStorePath)
local writeFullV2Document = assert( OzDocStoreMigratorUtils.writeFullV2Document)

local OzDocStoreExamplesTest = {}

local destination
-- destination = '/Users/jrechtie/Thio/Thio/dev-eng/Thio/support/THFoundation/support/wf/testdata/old-oz-docstore-migrator/'
-- destination = '/Users/immisch/Thio/dev-eng/Thio/support/THFoundation/support/wf/testdata/old-oz-docstore-migrator/'

--------------------------------------------------------------------------------

OzDocStoreExamplesTest.inputSynced = function()
	return {
		serverBaseValue =
		{
			type = "inAppCamera",
			originalCaptureDate = "2014-07-14T11:13:55.390-07:00",
			_serverProvidedMetadata = {
				created = "2014-07-14T21:31:37.984915Z",
				type = "asset",
				subtype = "jpeg",
				updated = "2014-07-14T21:31:47.827561Z",
				links = {
					self = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80"
					},
					[ "/rels/proxy_type/2560" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/proxies/7248ccb43a10ebc23f4a8df8ca58e7a3"
					},
					[ "/rels/latest_revision" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616",
						created_by = "urn:carousel:account:cfe08ee52e793ebd8c2d02a72abe66b0"
					},
					[ "/rels/master" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/master",
						content_type = "image/jpeg"
					},
					[ "/rels/rendition_type/2048" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/renditions/255acae6f0f14c7ebcf4b46581b6557a"
					},
					[ "/rels/first_revision" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616"
					},
					[ "/rels/rendition_type/thumbnail2x" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/renditions/0fa11b1b987a428db526b6d26c1b7469"
					}
				},
				revision_ids = {
					[1] = "a7049c095c5e4801afb627a3f3672f89",
					[2] = "a88b0adc7ef44b8a9da42de956f91616"
				}
			},
			width = 2592,
			changedAtTime = "2014-07-14T14:27:22.656",
			develop = {
				processingModel = "lightroom",
				croppedHeight = 2592,
				croppedWidth = 1936,
				_merge = "atomic",
				userOrientation = 6,
				xmpCameraRaw = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW synced</x:xmpmeta>" ]],
			},
			version = 1,
			captureDate = "2014-07-14T11:13:55.390-07:00",
			height = 1936,
			changedOnDevice = "Eric's iPad Air",
			importSource = {
				fileSize = 1397791,
				importedOnDevice = "Eric's iPad Air {122ff470bb09b1b01a99d6f1f74388ccc18a72fb2a5e10a56cfbe7ea1015bbd9}",
				importTimestamp = "2014-07-14T14:27:22.587",
				importedBy = "cfe08ee52e793ebd8c2d02a72abe66b0",
				contentType = "image/jpeg",
				sha256 = "ca968975c63d7284dab4bf856008c8f7cc29d9565043a5a021a3c58f2493c1df",
				fileName = "IMG_0875.JPG"
			},
			xmp = {
				aux = {
					Lens = "iPad Air back camera 3.3mm f/2.4",
					IsMergedHDR = 1,
					IsMergedPanorama = 1
				},
				tiff = {
					Make = "Apple",
					Model = "iPad Air"
				},
				exif = {
					ApertureValue = {
						[1] = 2526069,
						[2] = 1000000
					},
					FNumber = {
						[1] = 24,
						[2] = 10
					},
					ExposureTime = {
						[1] = 1,
						[2] = 400
					},
					FocalLength = {
						[1] = 33,
						[2] = 10
					},
					ISOSpeedRatings = {
						[1] = 32
					}
				}
			}
		},
		localOverlay = 
		{
			_ozCentralRevisionId = "a88b0adc7ef44b8a9da42de956f91616",
			_localOnly = {
				lrm_customData = {
					importSettings = {
						currentRevision = "a88b0adc7ef44b8a9da42de956f91616",
						data = "eJztWEtz4jgQzjmnPe/J5T3u4Bd2AhROlTHM5ACzVMhmdo/CVkAbI3kkOZD99SvZjvFDnrlx2IqqoFB/n7pb7Va3zK+/XF1NT5PTIT1ADrTTIcFscvJ1EJMtnIjfUmzqWk7hL74eSED7a7XWQkKh5hneILIsR7MN2x1ZjvNJcyzbMa1b0/YG9mhi3UxcTyuHfnetTWn8PHmYfy5tiZmv7zlPJ6Z5PB6N49AgdGfa4/HYtBzTcQaCMWBvmIPTALPfpIpCxxyyiKKUI4I1OQdbknFf16+lpUJ5RFmlHDMj35QRkYMZgQOkYEDBccAg5wjvmGkblpkvFqsmT5AyodjXx4ZVCdeURJCxCrsxbivs2x5xOAMJwBEUUWLaZk94hQYZJzmjWmsP3aE7Glln7RvAMwp4jtake0BTLKzWhcvsgLC0tDkQwvfC/ToakoTQrwQx+ADjLGprfEI7LPYMgwPJMG/ZisnxETWlQsl9BlsStbNfKIS4Rc5lavosyWCLLUVq8hPa0iK4Z5lYHMT/ZIwfIObCq17sD7F017/0b5gk5NgL51voRYPvGegF5X56wXVG06QfXoGd+G7oPoemd98qSnf7KlY3CipWJxgqUjsmKk47NCpON0IqliJQ1QnpjZOC0Q2TgtSNkoLUCZKC046RgtIOkYLSjZCCpMqkNEH8kWBRO4pj3zqIHbynPJ1p92i3T8SH92uqKD9VVlXSWvUFVFRtTlFUOMTU4BzQlx5oKU33YJVrPXgZBOmhrzuegrFCMScYlhTvh0ZK0u1ZT17nIX4AMcqEC7/btb5TYnPRilHSsF4ii3gHV4C9tBrBmjAeUpL2V/wvFCDcFS8hZqLZPaMELjDYtvJLgCuAM5DMEeOE5mexo2ItGl0KRfN5lT2PowgkPfA9oehfItKzj/BAOODSBUMJb4RqgdqWEg3yHz2a/0ypfBp1VHbqpTBHQRIGdWBxSgnLKJTXm9yXesPFnALGS+hczaucaiNlBrfF+RWhI50lIHrpSMMEUMTf2uI5fKYiDWBRF7rPpYmLo7okvj78AX6PRJ528bzC9at/vwlI7W4/LJXfNAL5KpLlkYi8fGPFc/0MEgYrhqgOMMzoK/wqjpSvLxGGgKrRIjItRphf/Mrc9vXFYQvjGMZqfI52kMmz7N54VjB07Zk388IwWIxc15lbM3cYjJ1ZuFCdmw3kWSrMC4nYNMgSzs55AdimvHX6+iPNYB2RB/Z91/Kuq00bO8tFxQV4A78Xs2KaoDvrk2ZNzXLShBzPE1dzz2vCxexd0dTsmmpaFz30gg68W2v6kOfOBb0422v6IZvzBd2ozDW9WD/JPL+gHzWDKk8umyFNmyp/Lp0tbasqny6cOU2jBbX28izfyc3ypfzuempW/wbcXV99jI/xMf7H4z+w8f6t",
						isValidForCurrentRevision = false
					}
				},
				freemiumUploadEmbargoUntil = {
					_delete = true
				},
				devSettingsLastSetAtRev = "a88b0adc7ef44b8a9da42de956f91616",
				thumbnail2x = {
					md5 = "d299c2664f47cb8e75d54615c77a943e",
					renditionId = "0fa11b1b987a428db526b6d26c1b7469",
					epoch = 1,
					revId = "a88b0adc7ef44b8a9da42de956f91616",
					size = 23463
				},
				localUrl = "assets-library://asset/asset.JPG?id=232C64C6-BE0A-41B0-B791-6D2529282A52&ext=JPG",
				originalFilePath = "/var/mobile/Applications/DC8FF7FE-9697-4A58-AD65-865F7A255273/Documents/ea52f124f3d1414281724f015d16fd78/Originals/2014/2014-07/2014-07-14/IMG_0875.JPG",
				original = {
					isInCacheFolder = false,
					ozUrl = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/master",
					doNotBackUpFlagSet = true,
					epoch = 1,
					needGenerateProxy = 2560,
					size = 1397791
				},
				preview = {
					md5 = "5388a9a3c4f5398318c1965d3d552872",
					renditionId = "255acae6f0f14c7ebcf4b46581b6557a",
					epoch = 1,
					revId = "a88b0adc7ef44b8a9da42de956f91616",
					size = 574482
				}
			},
			_ozMetadataUploadStatus = "uploaded"
		},
		docId = "02b8eb3231e044f58d7e99d7b2a65a80",
		docType = "asset"
	}
end

--------------------------------------------------------------------------------

OzDocStoreExamplesTest.outputSynced = function()
	return {
		revs = { 
			{
				revId = "a88b0adc7ef44b8a9da42de956f91616",
				sequence = 10001,
				localDocId = 1,
				content = {
					type = "asset",
					subtype = "image",
					develop = {
						processingModel = "lightroom",
						croppedHeight = 2592,
						croppedWidth = 1936,
						userOrientation = 6,
						xmpCameraRaw = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW synced</x:xmpmeta>" ]],
					},
					captureDate = "2014-07-14T11:13:55.390-07:00",
					changedOnDevice = "Eric's iPad Air",
					changedAtTime = "2014-07-14T12:27:22.656Z",			
					importSource = {
						originalWidth = 2592,
						originalHeight = 1936,
						fileSize = 1397791,
						importedOnDevice = "Eric's iPad Air {122ff470bb09b1b01a99d6f1f74388ccc18a72fb2a5e10a56cfbe7ea1015bbd9}",
						importTimestamp = "2014-07-14T14:27:22.587",
						importedBy = "cfe08ee52e793ebd8c2d02a72abe66b0",
						contentType = "image/jpeg",
						sha256 = "ca968975c63d7284dab4bf856008c8f7cc29d9565043a5a021a3c58f2493c1df",
						fileName = "IMG_0875.JPG"
					},
					xmp = {
						aux = {
							Lens = "iPad Air back camera 3.3mm f/2.4",
							IsMergedHDR = true,
							IsMergedPanorama = true
						},
						tiff = {
							Make = "Apple",
							Model = "iPad Air"
						},
						exif = {
							ApertureValue = {
								[1] = 2526069,
								[2] = 1000000
							},
							FNumber = {
								[1] = 24,
								[2] = 10
							},
							ExposureTime = {
								[1] = 1,
								[2] = 400
							},
							FocalLength = {
								[1] = 33,
								[2] = 10
							},
							ISOSpeedRatings = 32
						}
					}
				}
			},
		},
		doc = {
			localDocId = 1,
			fullDocId = "02b8eb3231e044f58d7e99d7b2a65a80",
			winningRevSequence = 10001,
			mostRecentRevSequence = 10001,
			deleted = false,
			hasConflicts = false,
			annotation = {
				_localOnly = {
					lrm_customData = {
						importSettings = {
							currentRevision = "a88b0adc7ef44b8a9da42de956f91616",
							data = "eJztWEtz4jgQzjmnPe/J5T3u4Bd2AhROlTHM5ACzVMhmdo/CVkAbI3kkOZD99SvZjvFDnrlx2IqqoFB/n7pb7Va3zK+/XF1NT5PTIT1ADrTTIcFscvJ1EJMtnIjfUmzqWk7hL74eSED7a7XWQkKh5hneILIsR7MN2x1ZjvNJcyzbMa1b0/YG9mhi3UxcTyuHfnetTWn8PHmYfy5tiZmv7zlPJ6Z5PB6N49AgdGfa4/HYtBzTcQaCMWBvmIPTALPfpIpCxxyyiKKUI4I1OQdbknFf16+lpUJ5RFmlHDMj35QRkYMZgQOkYEDBccAg5wjvmGkblpkvFqsmT5AyodjXx4ZVCdeURJCxCrsxbivs2x5xOAMJwBEUUWLaZk94hQYZJzmjWmsP3aE7Glln7RvAMwp4jtake0BTLKzWhcvsgLC0tDkQwvfC/ToakoTQrwQx+ADjLGprfEI7LPYMgwPJMG/ZisnxETWlQsl9BlsStbNfKIS4Rc5lavosyWCLLUVq8hPa0iK4Z5lYHMT/ZIwfIObCq17sD7F017/0b5gk5NgL51voRYPvGegF5X56wXVG06QfXoGd+G7oPoemd98qSnf7KlY3CipWJxgqUjsmKk47NCpON0IqliJQ1QnpjZOC0Q2TgtSNkoLUCZKC046RgtIOkYLSjZCCpMqkNEH8kWBRO4pj3zqIHbynPJ1p92i3T8SH92uqKD9VVlXSWvUFVFRtTlFUOMTU4BzQlx5oKU33YJVrPXgZBOmhrzuegrFCMScYlhTvh0ZK0u1ZT17nIX4AMcqEC7/btb5TYnPRilHSsF4ii3gHV4C9tBrBmjAeUpL2V/wvFCDcFS8hZqLZPaMELjDYtvJLgCuAM5DMEeOE5mexo2ItGl0KRfN5lT2PowgkPfA9oehfItKzj/BAOODSBUMJb4RqgdqWEg3yHz2a/0ypfBp1VHbqpTBHQRIGdWBxSgnLKJTXm9yXesPFnALGS+hczaucaiNlBrfF+RWhI50lIHrpSMMEUMTf2uI5fKYiDWBRF7rPpYmLo7okvj78AX6PRJ528bzC9at/vwlI7W4/LJXfNAL5KpLlkYi8fGPFc/0MEgYrhqgOMMzoK/wqjpSvLxGGgKrRIjItRphf/Mrc9vXFYQvjGMZqfI52kMmz7N54VjB07Zk388IwWIxc15lbM3cYjJ1ZuFCdmw3kWSrMC4nYNMgSzs55AdimvHX6+iPNYB2RB/Z91/Kuq00bO8tFxQV4A78Xs2KaoDvrk2ZNzXLShBzPE1dzz2vCxexd0dTsmmpaFz30gg68W2v6kOfOBb0422v6IZvzBd2ozDW9WD/JPL+gHzWDKk8umyFNmyp/Lp0tbasqny6cOU2jBbX28izfyc3ypfzuempW/wbcXV99jI/xMf7H4z+w8f6t",
							isValidForCurrentRevision = false
						}
					},
					devSettingsLastSetAtRev = "a88b0adc7ef44b8a9da42de956f91616",
					thumbnail2x = {
						md5 = "d299c2664f47cb8e75d54615c77a943e",
						renditionId = "0fa11b1b987a428db526b6d26c1b7469",
						epoch = 1,
						revId = "a88b0adc7ef44b8a9da42de956f91616",
						size = 23463
					},
					localUrl = "assets-library://asset/asset.JPG?id=232C64C6-BE0A-41B0-B791-6D2529282A52&ext=JPG",
					originalFilePath = "/var/mobile/Applications/DC8FF7FE-9697-4A58-AD65-865F7A255273/Documents/ea52f124f3d1414281724f015d16fd78/Originals/2014/2014-07/2014-07-14/IMG_0875.JPG",
					original = {
						isInCacheFolder = false,
						ozUrl = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/master",
						doNotBackUpFlagSet = true,
						epoch = 1,
						needGenerateProxy = 2560,
						size = 1397791
					},
					preview = {
						md5 = "5388a9a3c4f5398318c1965d3d552872",
						renditionId = "255acae6f0f14c7ebcf4b46581b6557a",
						epoch = 1,
						revId = "a88b0adc7ef44b8a9da42de956f91616",
						size = 574482
					}
				},

				_serverProvidedMetadata = {
					created = "2014-07-14T21:31:37.984915Z",
					updated = "2014-07-14T21:31:47.827561Z",
					links = {
						self = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80"
						},
						[ "/rels/proxy_type/2560" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/proxies/7248ccb43a10ebc23f4a8df8ca58e7a3"
						},
						[ "/rels/latest_revision" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616",
							created_by = "urn:carousel:account:cfe08ee52e793ebd8c2d02a72abe66b0"
						},
						[ "/rels/master" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/master",
							content_type = "image/jpeg"
						},
						[ "/rels/master_create" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/{revision_id}/master",
							templated = true
						},
						[ "/rels/rendition_type/2048" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/renditions/255acae6f0f14c7ebcf4b46581b6557a"
						},
						[ "/rels/first_revision" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616"
						},
						[ "/rels/rendition_type/thumbnail2x" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/renditions/0fa11b1b987a428db526b6d26c1b7469"
						}
					},
					revision_ids = {
						[1] = "a7049c095c5e4801afb627a3f3672f89",
						[2] = "a88b0adc7ef44b8a9da42de956f91616"
					}
				}
			},
		},
		label = { 
			localDocId = 1,
			revSeq = 10001,
			name = "oz",
		}
	}
end

-- this is based on asset 4 from 04-dev-change-not-synced.ozdocstore (edited for clarity/uniqueness)

OzDocStoreExamplesTest.inputSyncedLocalChanges = function() 
	return {
		docType = "asset",
		docId = "477ce91734d343a8a13cbd20992ab402",
		localOverlay = {
			changedAtTime = "2014-07-14T14:43:23.882",
			_ozCentralRevisionId = "a88b0adc7ef44b8a9da42de956f91616",
			_localOnly = {
				proxy = {
					ozUrl = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/proxies/7248ccb43a10ebc23f4a8df8ca58e7a3",
					epoch = 1,
					filePath = "/var/mobile/Applications/DC8FF7FE-9697-4A58-AD65-865F7A255273/Documents/ea52f124f3d1414281724f015d16fd78/Originals/2014/2014-07/IMG_0875_proxy.dng",
					size = 679886
				},
				localUrl = "assets-library://asset/asset.JPG?id=232C64C6-BE0A-41B0-B791-6D2529282A52&ext=JPG",
				originalFilePath = {
					_delete = true
				},
				thumbnail2x = {
					referenceHeight = 2592,
					md5 = "88052e261558e1c61b4fef72cafd6ae7",
					renditionId = "0fa11b1b987a428db526b6d26c1b7469",
					referenceWidth = 1936,
					epoch = 1,
					revId = "pending",
					size = 28143
				},
				freemiumUploadEmbargoUntil = {
					_delete = true
				},
				lrm_customData = {
					autoToneParams = {
						currentRevision = "a88b0adc7ef44b8a9da42de956f91616",
						data = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">LrM cusrom</x:xmpmeta>" ]],
						isValidForCurrentRevision = true
					},
					importSettings = {
						currentRevision = "a88b0adc7ef44b8a9da42de956f91616",
						data = "eJztWEtz4jgQzjmnPe/J5T3u4Bd2AhROlTHM5ACzVMhmdo/CVkAbI3kkOZD99SvZjvFDnrlx2IqqoFB/n7pb7Va3zK+/XF1NT5PTIT1ADrTTIcFscvJ1EJMtnIjfUmzqWk7hL74eSED7a7XWQkKh5hneILIsR7MN2x1ZjvNJcyzbMa1b0/YG9mhi3UxcTyuHfnetTWn8PHmYfy5tiZmv7zlPJ6Z5PB6N49AgdGfa4/HYtBzTcQaCMWBvmIPTALPfpIpCxxyyiKKUI4I1OQdbknFf16+lpUJ5RFmlHDMj35QRkYMZgQOkYEDBccAg5wjvmGkblpkvFqsmT5AyodjXx4ZVCdeURJCxCrsxbivs2x5xOAMJwBEUUWLaZk94hQYZJzmjWmsP3aE7Glln7RvAMwp4jtake0BTLKzWhcvsgLC0tDkQwvfC/ToakoTQrwQx+ADjLGprfEI7LPYMgwPJMG/ZisnxETWlQsl9BlsStbNfKIS4Rc5lavosyWCLLUVq8hPa0iK4Z5lYHMT/ZIwfIObCq17sD7F017/0b5gk5NgL51voRYPvGegF5X56wXVG06QfXoGd+G7oPoemd98qSnf7KlY3CipWJxgqUjsmKk47NCpON0IqliJQ1QnpjZOC0Q2TgtSNkoLUCZKC046RgtIOkYLSjZCCpMqkNEH8kWBRO4pj3zqIHbynPJ1p92i3T8SH92uqKD9VVlXSWvUFVFRtTlFUOMTU4BzQlx5oKU33YJVrPXgZBOmhrzuegrFCMScYlhTvh0ZK0u1ZT17nIX4AMcqEC7/btb5TYnPRilHSsF4ii3gHV4C9tBrBmjAeUpL2V/wvFCDcFS8hZqLZPaMELjDYtvJLgCuAM5DMEeOE5mexo2ItGl0KRfN5lT2PowgkPfA9oehfItKzj/BAOODSBUMJb4RqgdqWEg3yHz2a/0ypfBp1VHbqpTBHQRIGdWBxSgnLKJTXm9yXesPFnALGS+hczaucaiNlBrfF+RWhI50lIHrpSMMEUMTf2uI5fKYiDWBRF7rPpYmLo7okvj78AX6PRJ528bzC9at/vwlI7W4/LJXfNAL5KpLlkYi8fGPFc/0MEgYrhqgOMMzoK/wqjpSvLxGGgKrRIjItRphf/Mrc9vXFYQvjGMZqfI52kMmz7N54VjB07Zk388IwWIxc15lbM3cYjJ1ZuFCdmw3kWSrMC4nYNMgSzs55AdimvHX6+iPNYB2RB/Z91/Kuq00bO8tFxQV4A78Xs2KaoDvrk2ZNzXLShBzPE1dzz2vCxexd0dTsmmpaFz30gg68W2v6kOfOBb0422v6IZvzBd2ozDW9WD/JPL+gHzWDKk8umyFNmyp/Lp0tbasqny6cOU2jBbX28izfyc3ypfzuempW/wbcXV99jI/xMf7H4z+w8f6t",
						isValidForCurrentRevision = false
					}
				},
				original = {
					_delete = true
				},
				devSettingsLastSetAtRev = "pending",
				preview = {
					referenceHeight = 2592,
					md5 = "24f07fcbeeabf38f3c65f351ceb1dd6f",
					renditionId = "255acae6f0f14c7ebcf4b46581b6557a",
					referenceWidth = 1936,
					epoch = 1,
					revId = "pending",
					size = 729892
				}
			},
			changedOnDevice = "Eric's iPad Air",
			develop = {
				processingModel = "lightroom",
				croppedHeight = 2592,
				croppedWidth = 1936,
				_merge = "atomic",
				userOrientation = 6,
				xmpCameraRaw = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW modified</x:xmpmeta>" ]]
			}
		},
		serverBaseValue = {
			type = "inAppCamera",
			originalCaptureDate = "2014-07-14T11:13:55.390-07:00",
			_serverProvidedMetadata = {
				created = "2014-07-14T21:31:37.984915Z",
				type = "asset",
				subtype = "jpeg",
				updated = "2014-07-14T21:31:47.827561Z",
				links = {
					self = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80"
					},
					[ "/rels/proxy_type/2560" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/proxies/7248ccb43a10ebc23f4a8df8ca58e7a3"
					},
					[ "/rels/latest_revision" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616",
						created_by = "urn:carousel:account:cfe08ee52e793ebd8c2d02a72abe66b0"
					},
					[ "/rels/master" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/master",
						content_type = "image/jpeg"
					},
					[ "/rels/rendition_type/2048" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/renditions/255acae6f0f14c7ebcf4b46581b6557a"
					},
					[ "/rels/first_revision" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616"
					},
					[ "/rels/rendition_type/thumbnail2x" ] = {
						href = "/v1.0/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/renditions/0fa11b1b987a428db526b6d26c1b7469"
					}
				}
			},
			width = 2592,
			changedAtTime = "2014-07-14T14:27:22.656",
			develop = {
				processingModel = "lightroom",
				croppedHeight = 2592,
				croppedWidth = 1936,
				_merge = "atomic",
				userOrientation = 6,
				xmpCameraRaw = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW</x:xmpmeta>" ]]
			},
			version = 1,
			captureDate = "2014-07-14T11:13:55.390-07:00",
			height = 1936,
			changedOnDevice = "Eric's iPad Air",
			importSource = {
				fileSize = 1397791,
				importedOnDevice = "Eric's iPad Air {122ff470bb09b1b01a99d6f1f74388ccc18a72fb2a5e10a56cfbe7ea1015bbd9}",
				importTimestamp = "2014-07-14T14:27:22.587",
				importedBy = "cfe08ee52e793ebd8c2d02a72abe66b0",
				contentType = "image/jpeg",
				sha256 = "ca968975c63d7284dab4bf856008c8f7cc29d9565043a5a021a3c58f2493c1df",
				fileName = "IMG_0875.JPG"
			},
			xmp = {
				aux = {
					Lens = "iPad Air back camera 3.3mm f/2.4"
				},
				tiff = {
					Make = "Apple",
					Model = "iPad Air"
				},
				exif = {
					ApertureValue = {
						[1] = 2526069,
						[2] = 1000000
					},
					FNumber = {
						[1] = 24,
						[2] = 10
					},
					ExposureTime = {
						[1] = 1,
						[2] = 400
					},
					FocalLength = {
						[1] = 33,
						[2] = 10
					},
					ISOSpeedRatings = {
						[1] = 32
					}
				}
			}
		}
	}
end

OzDocStoreExamplesTest.outputSyncedLocalChanges = function()
	return {
		label = {
			localDocId = 2,
			revSeq = 10002,
			name = "oz"
		},
		doc = {
			deleted = false,
			hasConflicts = false,
			localDocId = 2,
			fullDocId = "477ce91734d343a8a13cbd20992ab402",
			mostRecentRevSequence = 10002,
			winningRevSequence = 10002,
			annotation = {
				_serverProvidedMetadata = {
					created = "2014-07-14T21:31:37.984915Z",
					updated = "2014-07-14T21:31:47.827561Z",
					links = {
						self = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80"
						},
						[ "/rels/proxy_type/2560" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/proxies/7248ccb43a10ebc23f4a8df8ca58e7a3"
						},
						[ "/rels/latest_revision" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616",
							created_by = "urn:carousel:account:cfe08ee52e793ebd8c2d02a72abe66b0"
						},
						[ "/rels/master" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/master",
							content_type = "image/jpeg"
						},
						[ "/rels/master_create" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/{revision_id}/master",
							templated = true
						},
						[ "/rels/rendition_type/2048" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/renditions/255acae6f0f14c7ebcf4b46581b6557a"
						},
						[ "/rels/first_revision" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616"
						},
						[ "/rels/rendition_type/thumbnail2x" ] = {
							href = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/renditions/0fa11b1b987a428db526b6d26c1b7469"
						}
					}
				},
				_localOnly = {
					proxy = {
						ozUrl = "/v2/catalogs/ea52f124f3d1414281724f015d16fd78/assets/02b8eb3231e044f58d7e99d7b2a65a80/revisions/a88b0adc7ef44b8a9da42de956f91616/proxies/7248ccb43a10ebc23f4a8df8ca58e7a3",
						epoch = 1,
						filePath = "/var/mobile/Applications/DC8FF7FE-9697-4A58-AD65-865F7A255273/Documents/ea52f124f3d1414281724f015d16fd78/Originals/2014/2014-07/IMG_0875_proxy.dng",
						size = 679886
					},
					localUrl = "assets-library://asset/asset.JPG?id=232C64C6-BE0A-41B0-B791-6D2529282A52&ext=JPG",
					thumbnail2x = {
						referenceHeight = 2592,
						md5 = "88052e261558e1c61b4fef72cafd6ae7",
						renditionId = "0fa11b1b987a428db526b6d26c1b7469",
						referenceWidth = 1936,
						epoch = 1,
						revId = "pending",
						size = 28143
					},
					lrm_customData = {
						autoToneParams = {
							currentRevision = "a88b0adc7ef44b8a9da42de956f91616",
							data = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">LrM cusrom</x:xmpmeta>" ]],
							isValidForCurrentRevision = true
						},
						importSettings = {
							currentRevision = "a88b0adc7ef44b8a9da42de956f91616",
							data = "eJztWEtz4jgQzjmnPe/J5T3u4Bd2AhROlTHM5ACzVMhmdo/CVkAbI3kkOZD99SvZjvFDnrlx2IqqoFB/n7pb7Va3zK+/XF1NT5PTIT1ADrTTIcFscvJ1EJMtnIjfUmzqWk7hL74eSED7a7XWQkKh5hneILIsR7MN2x1ZjvNJcyzbMa1b0/YG9mhi3UxcTyuHfnetTWn8PHmYfy5tiZmv7zlPJ6Z5PB6N49AgdGfa4/HYtBzTcQaCMWBvmIPTALPfpIpCxxyyiKKUI4I1OQdbknFf16+lpUJ5RFmlHDMj35QRkYMZgQOkYEDBccAg5wjvmGkblpkvFqsmT5AyodjXx4ZVCdeURJCxCrsxbivs2x5xOAMJwBEUUWLaZk94hQYZJzmjWmsP3aE7Glln7RvAMwp4jtake0BTLKzWhcvsgLC0tDkQwvfC/ToakoTQrwQx+ADjLGprfEI7LPYMgwPJMG/ZisnxETWlQsl9BlsStbNfKIS4Rc5lavosyWCLLUVq8hPa0iK4Z5lYHMT/ZIwfIObCq17sD7F017/0b5gk5NgL51voRYPvGegF5X56wXVG06QfXoGd+G7oPoemd98qSnf7KlY3CipWJxgqUjsmKk47NCpON0IqliJQ1QnpjZOC0Q2TgtSNkoLUCZKC046RgtIOkYLSjZCCpMqkNEH8kWBRO4pj3zqIHbynPJ1p92i3T8SH92uqKD9VVlXSWvUFVFRtTlFUOMTU4BzQlx5oKU33YJVrPXgZBOmhrzuegrFCMScYlhTvh0ZK0u1ZT17nIX4AMcqEC7/btb5TYnPRilHSsF4ii3gHV4C9tBrBmjAeUpL2V/wvFCDcFS8hZqLZPaMELjDYtvJLgCuAM5DMEeOE5mexo2ItGl0KRfN5lT2PowgkPfA9oehfItKzj/BAOODSBUMJb4RqgdqWEg3yHz2a/0ypfBp1VHbqpTBHQRIGdWBxSgnLKJTXm9yXesPFnALGS+hczaucaiNlBrfF+RWhI50lIHrpSMMEUMTf2uI5fKYiDWBRF7rPpYmLo7okvj78AX6PRJ528bzC9at/vwlI7W4/LJXfNAL5KpLlkYi8fGPFc/0MEgYrhqgOMMzoK/wqjpSvLxGGgKrRIjItRphf/Mrc9vXFYQvjGMZqfI52kMmz7N54VjB07Zk388IwWIxc15lbM3cYjJ1ZuFCdmw3kWSrMC4nYNMgSzs55AdimvHX6+iPNYB2RB/Z91/Kuq00bO8tFxQV4A78Xs2KaoDvrk2ZNzXLShBzPE1dzz2vCxexd0dTsmmpaFz30gg68W2v6kOfOBb0422v6IZvzBd2ozDW9WD/JPL+gHzWDKk8umyFNmyp/Lp0tbasqny6cOU2jBbX28izfyc3ypfzuempW/wbcXV99jI/xMf7H4z+w8f6t",
							isValidForCurrentRevision = false
						}
					},
					devSettingsLastSetAtRev = "pending",
					preview = {
						referenceHeight = 2592,
						md5 = "24f07fcbeeabf38f3c65f351ceb1dd6f",
						renditionId = "255acae6f0f14c7ebcf4b46581b6557a",
						referenceWidth = 1936,
						epoch = 1,
						revId = "pending",
						size = 729892
					}
				},
			},
		},
		revs = {
			{
				localDocId = 2,
				sequence = 10002,
				revId = "a88b0adc7ef44b8a9da42de956f91616",
				content = {
				},
			},
			{
				localDocId = 2,
				sequence = 10003,
				revId = "b4fa873af96648a2ac3487030abb9414",
				content = {
					develop = {
						processingModel = "lightroom",
						croppedHeight = 2592,
						croppedWidth = 1936,
						userOrientation = 6,
						xmpCameraRaw = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW modified</x:xmpmeta>" ]]
					},
					type = "asset",
					subtype = "image",
					captureDate = "2014-07-14T11:13:55.390-07:00",
					changedOnDevice = "Eric's iPad Air",
					changedAtTime = "2014-07-14T12:43:23.882Z",
					importSource = {
						originalHeight = 1936,
						originalWidth = 2592,
						fileSize = 1397791,
						importedOnDevice = "Eric's iPad Air {122ff470bb09b1b01a99d6f1f74388ccc18a72fb2a5e10a56cfbe7ea1015bbd9}",
						importTimestamp = "2014-07-14T14:27:22.587",
						importedBy = "cfe08ee52e793ebd8c2d02a72abe66b0",
						contentType = "image/jpeg",
						sha256 = "ca968975c63d7284dab4bf856008c8f7cc29d9565043a5a021a3c58f2493c1df",
						fileName = "IMG_0875.JPG"
					},
					xmp = {
						aux = {
							Lens = "iPad Air back camera 3.3mm f/2.4"
						},
						tiff = {
							Make = "Apple",
							Model = "iPad Air"
						},
						exif = {
							ApertureValue = {
								[1] = 2526069,
								[2] = 1000000
							},
							FNumber = {
								[1] = 24,
								[2] = 10
							},
							ExposureTime = {
								[1] = 1,
								[2] = 400
							},
							FocalLength = {
								[1] = 33,
								[2] = 10
							},
							ISOSpeedRatings = 32
						}
					}
				},
			},
		}
	}
end

-- this is asset 21 from 3798702-uploaded-values.ozdocstore

OzDocStoreExamplesTest.inputUnsyncedConfirmationPending = function()
	return {
		docType = "asset",
		docId = "76bcef5e56f747608b81c5531e2912a5",
		localOverlay = {
			type = "asset",
			develop = {
				processingModel = "lightroom",
				_merge = "atomic",
				userOrientation = 1
			},
			changedOnDevice = "Spaddi2",
			originalCaptureDate = "2014-08-02T13:49:29.298+02:00",
			importSource = {
				fileSize = 2655170,
				type = "inAppCamera",
				importedOnDevice = "Spaddi2 {3db70ac3abc2cb76a18e3badc820eef98b2e71b577268a738e41b287801e2154}",
				importTimestamp = "2014-08-06T10:16:54.293",
				importedBy = "5a43213cee8217d8b6b07be2d0fa6e84",
				contentType = "image/jpeg",
				fileName = "IMG_8231.JPG",
				sha256 = "42b2330ad3908f72bc4989fb982d89d5189f242123b8b85da2171867cc23ae35"
			},
			_localOnly = {
				devSettingsLastSetAtRev = "6464dc1fc289402594c854b262d38747",
				_uploadedValues = {
					type = "asset",
					originalCaptureDate = "2014-08-02T13:49:29.298+02:00",
					develop = {
						processingModel = "lightroom",
						_merge = "atomic",
						userOrientation = 1
					},
					xmp = {
						aux = {
							Lens = "iPhone 5 back camera 4.12mm f/2.4"
						},
						tiff = {
							Model = "iPhone 5",
							Make = "Apple"
						},
						exif = {
							ApertureValue = {
								[1] = 2526069,
								[2] = 1000000
							},
							ISOSpeedRatings = {
								[1] = 50
							},
							ExposureTime = {
								[1] = 1,
								[2] = 3600
							},
							FocalLength = {
								[1] = 103,
								[2] = 25
							},
							FNumber = {
								[1] = 24,
								[2] = 10
							}
						}
					},
					width = 3264,
					changedAtTime = "2014-08-06T10:16:54.403",
					version = 1,
					captureDate = "2014-08-02T13:49:29.298+02:00",
					height = 2448,
					location = {
						altitude = 8,
						latitude = 6.94579e-310,
						longitude = 6.94579e-310
					},
					importSource = {
						fileSize = 2655170,
						type = "inAppCamera",
						importedOnDevice = "Spaddi2 {3db70ac3abc2cb76a18e3badc820eef98b2e71b577268a738e41b287801e2154}",
						importTimestamp = "2014-08-06T10:16:54.293",
						importedBy = "5a43213cee8217d8b6b07be2d0fa6e84",
						contentType = "image/jpeg",
						fileName = "IMG_8231.JPG",
						sha256 = "42b2330ad3908f72bc4989fb982d89d5189f242123b8b85da2171867cc23ae35"
					},
					changedOnDevice = "Spaddi2"
				},
				thumbnail2x = {
					md5 = "624d356d9262a8a5693ee5f5e4e0a221",
					epoch = 1,
					revId = "6464dc1fc289402594c854b262d38747",
					size = 27412
				},
				freemiumUploadEmbargoUntil = {
					_delete = true
				},
				localUrl = "assets-library://asset/asset.JPG?id=101AC7D7-F4AB-4BE4-A059-8A4E2A1C2AC5&ext=JPG",
				original = {
					isInCacheFolder = false,
					epoch = 1,
					needGenerateProxy = 2560,
					size = 2655170
				},
				originalFilePath = "/var/mobile/Applications/CCBD610A-F97C-4906-B6C3-A492C8FAC3AC/Documents/e91d1b491c7f480b9f60b1093f84353c/Originals/2014/2014-08/2014-08-02/IMG_8231.JPG",
				preview = {
					md5 = "39237bd617a3d16fa43ce599dc27f924",
					epoch = 1,
					revId = "6464dc1fc289402594c854b262d38747",
					size = 709653
				}
			},
			width = 3264,
			changedAtTime = "2014-08-06T10:16:54.403",
			version = 1,
			captureDate = "2014-08-02T13:49:29.298+02:00",
			height = 2448,
			location = {
				altitude = 8,
				latitude = 6.94579e-310,
				longitude = 6.94579e-310
			},
			xmp = {
				aux = {
					Lens = "iPhone 5 back camera 4.12mm f/2.4"
				},
				tiff = {
					Make = "Apple",
					Model = "iPhone 5"
				},
				exif = {
					ApertureValue = {
						[1] = 2526069,
						[2] = 1000000
					},
					ISOSpeedRatings = {
						[1] = 50
					},
					ExposureTime = {
						[1] = 1,
						[2] = 3600
					},
					FocalLength = {
						[1] = 103,
						[2] = 25
					},
					FNumber = {
						[1] = 24,
						[2] = 10
					}
				}
			},
			_ozCentralRevisionId = "6464dc1fc289402594c854b262d38747"
		}
	}
end

OzDocStoreExamplesTest.outputUnsyncedConfirmationPending = function()
	return {
		revs = { 
			{
				revId = "6464dc1fc289402594c854b262d38747",
				sequence = 10004,
				localDocId = 3,
				content = {
					type = "asset",
					subtype = "image",
					develop = {
						processingModel = "lightroom",
						userOrientation = 1
					},
					xmp = {
						aux = {
							Lens = "iPhone 5 back camera 4.12mm f/2.4"
						},
						tiff = {
							Model = "iPhone 5",
							Make = "Apple"
						},
						exif = {
							ApertureValue = {
								[1] = 2526069,
								[2] = 1000000
							},
							ISOSpeedRatings = 50,
							ExposureTime = {
								[1] = 1,
								[2] = 3600
							},
							FocalLength = {
								[1] = 103,
								[2] = 25
							},
							FNumber = {
								[1] = 24,
								[2] = 10
							}
						}
					},
					changedAtTime = "2014-08-06T08:16:54.403Z",
					captureDate = "2014-08-02T13:49:29.298+02:00",
					location = {
						altitude = 8,
						latitude = 6.94579e-310,
						longitude = 6.94579e-310
					},
					importSource = {
						originalWidth = 3264,
						originalHeight = 2448,
						fileSize = 2655170,
						importedOnDevice = "Spaddi2 {3db70ac3abc2cb76a18e3badc820eef98b2e71b577268a738e41b287801e2154}",
						importTimestamp = "2014-08-06T10:16:54.293",
						importedBy = "5a43213cee8217d8b6b07be2d0fa6e84",
						contentType = "image/jpeg",
						fileName = "IMG_8231.JPG",
						sha256 = "42b2330ad3908f72bc4989fb982d89d5189f242123b8b85da2171867cc23ae35"
					},
					changedOnDevice = "Spaddi2"
				},
			},
		},
		doc = {
			localDocId = 3,
			fullDocId = "76bcef5e56f747608b81c5531e2912a5",
			winningRevSequence = 10003,
			mostRecentRevSequence = 10003,
			deleted = false,
			hasConflicts = false,
			annotation = {
				_localOnly = {
					devSettingsLastSetAtRev = "6464dc1fc289402594c854b262d38747",
					thumbnail2x = {
						md5 = "624d356d9262a8a5693ee5f5e4e0a221",
						epoch = 1,
						revId = "6464dc1fc289402594c854b262d38747",
						size = 27412
					},
					localUrl = "assets-library://asset/asset.JPG?id=101AC7D7-F4AB-4BE4-A059-8A4E2A1C2AC5&ext=JPG",
					original = {
						isInCacheFolder = false,
						epoch = 1,
						needGenerateProxy = 2560,
						size = 2655170
					},
					originalFilePath = "/var/mobile/Applications/CCBD610A-F97C-4906-B6C3-A492C8FAC3AC/Documents/e91d1b491c7f480b9f60b1093f84353c/Originals/2014/2014-08/2014-08-02/IMG_8231.JPG",
					preview = {
						md5 = "39237bd617a3d16fa43ce599dc27f924",
						epoch = 1,
						revId = "6464dc1fc289402594c854b262d38747",
						size = 709653
					}
				},
			},
		},
		label = { 
			localDocId = 3,
			revSeq = 10004,
			name = "oz",
		}
	}
end

OzDocStoreExamplesTest.inputConflict = function()
	return {
		docType = "asset",
		docId = "d08e85cf980c4168bc6bfeec3e248fd4",
		serverBaseValue = {
			type = "asset",
			copyright = "2015, Sean Teegarden",
			_serverProvidedMetadata = {
				created = "2016-02-26T22:20:53.882987Z",
				type = "asset",
				storage = {
					updated = "2016-02-26T22:20:53.940453Z",
					billed = true,
					sha256 = "e2ec01df106d1b33f093236a571c88c830575b5e30a063e3a2fa5c0b4d4b205d",
					account_id = "4bc284af75fe23615d70de44bf88d9fb",
					size = 12361043
				},
				subtype = "jpeg",
				links = {
					self = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4"
					},
					[ "/rels/first_revision" ] = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89"
					},
					[ "/rels/rendition_type/2048" ] = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/bb610c6fd2ac4dbe9061a832c9d13b96/renditions/ad2a063a2a8909605a861cfcb19d31ae"
					},
					[ "/rels/latest_revision" ] = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/38b3a753c155dba443b4abaf011f7bcf",
						created_by = "urn:carousel:account:4bc284af75fe23615d70de44bf88d9fb"
					},
					[ "/rels/proxy_type/2560" ] = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89/proxies/02113b0793906d3f56400bd539c93c84"
					},
					[ "/rels/rendition_type/640" ] = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/bb610c6fd2ac4dbe9061a832c9d13b96/renditions/9ef2ca94a6107e6908823e848b30eec5"
					},
					[ "/rels/master" ] = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89/master",
						content_type = "image/jpeg"
					},
					[ "/rels/rendition_type/thumbnail2x" ] = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/bb610c6fd2ac4dbe9061a832c9d13b96/renditions/355a632991045297c2ab6597fa10e92d"
					},
					[ "/rels/rendition_type/1280" ] = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/bb610c6fd2ac4dbe9061a832c9d13b96/renditions/a743bbdfeff9424fc411bbd5c91c9b3f"
					},
					[ "/rels/xmp" ] = {
						href = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89/xmp"
					}
				},
				updated = "2016-02-26T22:22:25.050364Z",
				revision_ids = {
					[1] = "a7049c095c5e4801afb627a3f3672f89",
					[2] = "3fe6c98cac074df8149ef0123be1a71f",
					[3] = "bb610c6fd2ac4dbe9061a832c9d13b96",
					[4] = "38b3a753c155dba443b4abaf011f7bcf"
				}
			},
			develop = {
				croppedWidth = 3534,
				croppedHeight = 4417,
				userUpdated = "2016-02-26T22:22:24.554Z",
				_merge = "atomic",
				processingModel = "lightroom",
				userOrientation = 1,
				xmpCameraRaw = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW 1</x:xmpmeta>" ]]
			},
			width = 3534,
			xmp = {
				dc = {
					rights = "2015, Sean Teegarden"
				}
			},
			autoTags = {
				created = "2016-02-26T14:22:25-08:00",
				application = "tag-worker",
				version = 0,
				tags = {
					fun = 60,
					women = 60,
					group = 67,
					people = 71,
					person = 59,
					young = 68,
					vintage = 58,
					background = 56,
					boy = 63,
					beauty = 57,
					hat = 59,
					man = 71,
					girl = 60,
					child = 62,
					love = 61,
					friendship = 57,
					beautiful = 64,
					couple = 68,
					father = 59,
					male = 58,
					caucasian = 67,
					family = 69,
					woman = 67,
					happy = 62,
					cowboy = 57
				}
			},
			captureDate = "2016-02-16T09:57:50.000-08:00",
			height = 4417,
			version = 1,
			importSource = {
				type = "inAppCamera",
				importedOnDevice = "iPhone Simulator {7cc32a785b8af585dcf63cc5b161398744475a14a0563c6c563a7260bb23fccf}",
				importTimestamp = "2016-02-26T14:20:53.707",
				contentType = "image/jpeg",
				sha256 = "e2ec01df106d1b33f093236a571c88c830575b5e30a063e3a2fa5c0b4d4b205d",
				fileSize = 12361043,
				importedBy = "4bc284af75fe23615d70de44bf88d9fb",
				fileName = "IMG_0157.JPG",
				localAssetId = "assets-library://asset/asset.jpg?id=936EF036-C411-47A1-8E2C-5114A4220747&ext=jpg",
				uniqueDeviceId = "7cc32a785b8af585dcf63cc5b161398744475a14a0563c6c563a7260bb23fccf"
			},
			originalCaptureDate = "2016-02-16T09:57:50.000-08:00"
		},
		localOverlay = {
			changedAtTime = "2016-02-26T14:23:30.747",
			_conflict = {
				develop = {
					userUpdated = "2016-02-26T22:22:24.554Z",
					croppedHeight = 4417,
					croppedWidth = 3534,
					userOrientation = 1,
					processingModel = "lightroom",
					_merge = "atomic",
					xmpCameraRaw = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW conflict</x:xmpmeta>" ]]
				}
			},
			_ozCentralRevisionId = "a7049c095c5e4801afb627a3f3672f89",
			_localOnly = {
				chunkedUpload = {
					_delete = true
				},
				localUrl = "assets-library://asset/asset.jpg?id=936EF036-C411-47A1-8E2C-5114A4220747&ext=jpg",
				originalFilePath = "/Users/pkamin/Library/Developer/CoreSimulator/Devices/920CA6B6-107A-43C3-B369-D8C33F6FD3E6/data/Containers/Data/Application/75C94345-D5C9-486F-AC5F-B01B00568B76/Documents/5c49d9cd7379443ab58d66ccf753c516/Originals/2016/2016-02/2016-02-16/IMG_0157.JPG",
				devSettingsLastSetAtRev = "pending",
				preview = {
					md5 = "c60599c8ed65751be2d201a744e6b032",
					referenceHeight = 4417,
					referenceWidth = 3534,
					epoch = 1,
					revId = "pending",
					size = 680931
				},
				freemiumUploadEmbargoUntil = {
					_delete = true
				},
				original = {
					ozUrl = "/v1.0/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89/master",
					isInCacheFolder = false,
					epoch = 1,
					doNotBackUpFlagSet = true,
					size = 12361043
				},
				thumbnail2x = {
					md5 = "57780aac35c6d26934649433d0dc35ef",
					referenceHeight = 4417,
					referenceWidth = 3534,
					epoch = 1,
					revId = "pending",
					size = 22142
				},
				lrm_customData = {
					autoToneParams = {
						currentRevision = "a7049c095c5e4801afb627a3f3672f89",
						data = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW lrm custom</x:xmpmeta>"> ]],
						isValidForCurrentRevision = true
					},
					importSettings = {
						currentRevision = "a7049c095c5e4801afb627a3f3672f89",
						data = "eJxjYBgFo2AUjFQAAAQAAAE=",
						isValidForCurrentRevision = false
					}
				}
			},
			changedOnDevice = "iPhone Simulator",
			develop = {
				processingModel = "lightroom",
				croppedHeight = 4417,
				croppedWidth = 3534,
				_merge = "atomic",
				userUpdated = "2016-02-26T22:23:30.735Z",
				userOrientation = 1,
				xmpCameraRaw = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW 2</x:xmpmeta>" ]]
			}
		}
	}
end

OzDocStoreExamplesTest.outputConflict = function()
	return {
		label = {
			localDocId = 4,
			revSeq = 10005,
			name = "oz"
		},
		doc = {
			deleted = false,
			hasConflicts = false,
			localDocId = 4,
			fullDocId = "d08e85cf980c4168bc6bfeec3e248fd4",
			mostRecentRevSequence = 10005,
			winningRevSequence = 10005,
			annotation = {
				_localOnly = {
					localUrl = "assets-library://asset/asset.jpg?id=936EF036-C411-47A1-8E2C-5114A4220747&ext=jpg",
					originalFilePath = "/Users/pkamin/Library/Developer/CoreSimulator/Devices/920CA6B6-107A-43C3-B369-D8C33F6FD3E6/data/Containers/Data/Application/75C94345-D5C9-486F-AC5F-B01B00568B76/Documents/5c49d9cd7379443ab58d66ccf753c516/Originals/2016/2016-02/2016-02-16/IMG_0157.JPG",
					devSettingsLastSetAtRev = "pending",
					preview = {
						md5 = "c60599c8ed65751be2d201a744e6b032",
						referenceHeight = 4417,
						referenceWidth = 3534,
						epoch = 1,
						revId = "pending",
						size = 680931
					},
					original = {
						ozUrl = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89/master",
						isInCacheFolder = false,
						epoch = 1,
						doNotBackUpFlagSet = true,
						size = 12361043
					},
					thumbnail2x = {
						md5 = "57780aac35c6d26934649433d0dc35ef",
						referenceHeight = 4417,
						referenceWidth = 3534,
						epoch = 1,
						revId = "pending",
						size = 22142
					},
					lrm_customData = {
						autoToneParams = {
							currentRevision = "a7049c095c5e4801afb627a3f3672f89",
							data = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW lrm custom</x:xmpmeta>"> ]],
							isValidForCurrentRevision = true
						},
						importSettings = {
							currentRevision = "a7049c095c5e4801afb627a3f3672f89",
							data = "eJxjYBgFo2AUjFQAAAQAAAE=",
							isValidForCurrentRevision = false
						}
					}
				},
				_serverProvidedMetadata = {
					created = "2016-02-26T22:20:53.882987Z",
					updated = "2016-02-26T22:22:25.050364Z",
					storage = {
						updated = "2016-02-26T22:20:53.940453Z",
						billed = true,
						sha256 = "e2ec01df106d1b33f093236a571c88c830575b5e30a063e3a2fa5c0b4d4b205d",
						account_id = "4bc284af75fe23615d70de44bf88d9fb",
						size = 12361043
					},
					links = {
						self = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4"
						},
						[ "/rels/first_revision" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89"
						},
						[ "/rels/rendition_type/2048" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/bb610c6fd2ac4dbe9061a832c9d13b96/renditions/ad2a063a2a8909605a861cfcb19d31ae"
						},
						[ "/rels/latest_revision" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/38b3a753c155dba443b4abaf011f7bcf",
							created_by = "urn:carousel:account:4bc284af75fe23615d70de44bf88d9fb"
						},
						[ "/rels/proxy_type/2560" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89/proxies/02113b0793906d3f56400bd539c93c84"
						},
						[ "/rels/rendition_type/640" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/bb610c6fd2ac4dbe9061a832c9d13b96/renditions/9ef2ca94a6107e6908823e848b30eec5"
						},
						[ "/rels/master" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89/master",
							content_type = "image/jpeg"
						},
						[ "/rels/master_create" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/{revision_id}/master",
							templated = true
						},
						[ "/rels/rendition_type/thumbnail2x" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/bb610c6fd2ac4dbe9061a832c9d13b96/renditions/355a632991045297c2ab6597fa10e92d"
						},
						[ "/rels/rendition_type/1280" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/bb610c6fd2ac4dbe9061a832c9d13b96/renditions/a743bbdfeff9424fc411bbd5c91c9b3f"
						},
						[ "/rels/xmp" ] = {
							href = "/v2/catalogs/5c49d9cd7379443ab58d66ccf753c516/assets/d08e85cf980c4168bc6bfeec3e248fd4/revisions/a7049c095c5e4801afb627a3f3672f89/xmp"
						}
					},
					revision_ids = {
						[1] = "a7049c095c5e4801afb627a3f3672f89",
						[2] = "3fe6c98cac074df8149ef0123be1a71f",
						[3] = "bb610c6fd2ac4dbe9061a832c9d13b96",
						[4] = "38b3a753c155dba443b4abaf011f7bcf"
					},
				},
			},
		},
		revs = {
			{
				revId = "a7049c095c5e4801afb627a3f3672f89",
				sequence = 10005,
				localDocId = 4,
				content = {
				},
			},
			{
				revId = "b4fa873af96648a2ac3487030abb9414", -- this a fake revision id
				localDocId = 4,
				sequence = 10006,
				content = {
					type = "asset",
					subtype = "image",
					changedOnDevice = "iPhone Simulator",
					changedAtTime = "2016-02-26T13:23:30.747Z",
					develop = {
						croppedWidth = 3534,
						croppedHeight = 4417,
						userUpdated = "2016-02-26T22:22:24.554Z",
						processingModel = "lightroom",
						userOrientation = 1,
						xmpCameraRaw = [[ "<x:xmpmeta xmlns:x="adobe:ns:meta/">Camera RAW 1</x:xmpmeta>" ]]
					},
					xmp = {
						dc = {
							rights = "2015, Sean Teegarden"
						}
					},
					autoTags = {
						created = "2016-02-26T14:22:25-08:00",
						application = "tag-worker",
						version = 0,
						tags = {
							fun = 60,
							women = 60,
							group = 67,
							people = 71,
							person = 59,
							young = 68,
							vintage = 58,
							background = 56,
							boy = 63,
							beauty = 57,
							hat = 59,
							man = 71,
							girl = 60,
							child = 62,
							love = 61,
							friendship = 57,
							beautiful = 64,
							couple = 68,
							father = 59,
							male = 58,
							caucasian = 67,
							family = 69,
							woman = 67,
							happy = 62,
							cowboy = 57
						}
					},
					captureDate = "2016-02-16T09:57:50.000-08:00",
					importSource = {
						originalHeight = 4417,
						originalWidth = 3534,
						importedOnDevice = "iPhone Simulator {7cc32a785b8af585dcf63cc5b161398744475a14a0563c6c563a7260bb23fccf}",
						importTimestamp = "2016-02-26T14:20:53.707",
						contentType = "image/jpeg",
						sha256 = "e2ec01df106d1b33f093236a571c88c830575b5e30a063e3a2fa5c0b4d4b205d",
						fileSize = 12361043,
						importedBy = "4bc284af75fe23615d70de44bf88d9fb",
						fileName = "IMG_0157.JPG",
						localAssetId = "assets-library://asset/asset.jpg?id=936EF036-C411-47A1-8E2C-5114A4220747&ext=jpg",
						uniqueDeviceId = "7cc32a785b8af585dcf63cc5b161398744475a14a0563c6c563a7260bb23fccf"
					},
				},
			},
		},
	}
end

OzDocStoreExamplesTest.inputSpaceFavorite = function()

	return {
		docId = "8ef9d2092e994b64a283ab43db395887",
		docType = "spacefavorite",
		localOverlay = {
    		_ozMetadataUploadStatus = "uploaded"
		},
		serverBaseValue = {
			created = "2016-05-17T05:23:58.565906Z",
			type = "spacefavorite",
			space = {
				_id = "ed39f3603bce4b3d9e03e193cf87f0a3"
			},
			updated = "2016-05-17T05:23:58.565906Z",
			id = "urn:revel:space:ed39f3603bce4b3d9e03e193cf87f0a3:asset:43e0e8831e09c941cebb5db62a7ee10b:favorite:8ef9d2092e994b64a283ab43db395887",
			author = {
				last_name = "P",
				_id = "bdb82ebd922240fdb4e66f5a487383f8",
				first_name = "Elmira",
				avatar = {
					placeholder = true
				},
				full_name = "Elmira P",
				links = {
					[ "/rels/avatars/large" ] = {
						href = "/v1.0/avatars/bdb82ebd922240fdb4e66f5a487383f8/20160519225549/large",
						size = 138
					},
					[ "/rels/avatars/small" ] = {
						href = "/v1.0/avatars/bdb82ebd922240fdb4e66f5a487383f8/20160519225549/small",
						size = 50
					},
					[ "/rels/avatars/medium" ] = {
						href = "/v1.0/avatars/bdb82ebd922240fdb4e66f5a487383f8/20160519225549/medium",
						size = 115
					}
				}
			},
			asset = {
				_id = "43e0e8831e09c941cebb5db62a7ee10b"
			},
			links = {
				self = {
					href = "/v1.0/spaces/ed39f3603bce4b3d9e03e193cf87f0a3/assets/43e0e8831e09c941cebb5db62a7ee10b/favorites/8ef9d2092e994b64a283ab43db395887"
				}
			}
		}
	}

end

OzDocStoreExamplesTest.outputSpaceFavorite = function()

	return {
		label = {
			localDocId = 5,
			revSeq = 10007,
			name = "oz"
		},
		doc = {
			deleted = false,
			hasConflicts = false,
			localDocId = 5,
			fullDocId = "8ef9d2092e994b64a283ab43db395887",
			mostRecentRevSequence = 10007,
			winningRevSequence = 10007,
			annotation = {
				_serverProvidedMetadata = {
					author = {
						id = "bdb82ebd922240fdb4e66f5a487383f8",
						avatar = {
							placeholder = true,
						},
						first_name = "Elmira",
						full_name = "Elmira P",
						last_name = "P",
						links = {
							["/rels/avatars/large"] = {
								href = "/v2/avatars/bdb82ebd922240fdb4e66f5a487383f8/20160519225549/large",
								size = 138,
							},
							["/rels/avatars/medium"] = {
								href = "/v2/avatars/bdb82ebd922240fdb4e66f5a487383f8/20160519225549/medium",
								size = 115,
							},
							["/rels/avatars/small"] = {
								href = "/v2/avatars/bdb82ebd922240fdb4e66f5a487383f8/20160519225549/small",
								size = 50,
							},
						},
					},
					created = "2016-05-17T05:23:58.565906Z",
					links = {
						["self"] = {
							href = "/v2/spaces/ed39f3603bce4b3d9e03e193cf87f0a3/assets/43e0e8831e09c941cebb5db62a7ee10b/favorites/8ef9d2092e994b64a283ab43db395887",
						},
					},
					updated = "2016-05-17T05:23:58.565906Z",
				}
			}
		},
		revs = {
			{
				revId = "43e0e8831e09c941cebb5db62a7ee10b",
				localDocId = 5,
				sequence = 10007,
				content = {
					asset = {
						id = "43e0e8831e09c941cebb5db62a7ee10b",
					},
					space = {
						id = "ed39f3603bce4b3d9e03e193cf87f0a3",
					},
					type = "favorite",
					subtype = "user",
				}
			}
		}
	}
end

OzDocStoreExamplesTest.inputSpace = function()

	return {
		docId = "18d4cea6357448768d8d92e992dd93ed",
		docType = "space",
		localOverlay = {
    		_ozMetadataUploadStatus = "uploaded"
		},
		serverBaseValue = {
			created = "2016-05-11T20:23:22.018642Z",
			type = "space",
			created_by = "urn:carousel:account:038d53448c61dc56a4631558101edef6",
			private = false,
			id = "urn:revel:catalog:57950c495f9541f78990aa9b419b1c63:space:ed39f3603bce4b3d9e03e193cf87f0a3",
			download = false,
			updated = "2016-05-11T20:23:22.462822Z",
			links = {
				self = {
					href = "/v1.0/catalogs/57950c495f9541f78990aa9b419b1c63/spaces/ed39f3603bce4b3d9e03e193cf87f0a3"
				},
				[ "/rels/web_space" ] = {
					href = "http://adobe.ly/24MzT02"
				},
				[ "/rels/space" ] = {
					href = "/v1.0/spaces/ed39f3603bce4b3d9e03e193cf87f0a3"
				}
			}
		}
	}
	
end

function OzDocStoreExamplesTest.outputSpace()

	return {
		label = {
			localDocId = 7,
			revSeq = 10009,
			name = "oz"
		},
		doc = {
			deleted = false,
			hasConflicts = false,
			localDocId = 7,
			fullDocId = "18d4cea6357448768d8d92e992dd93ed",
			mostRecentRevSequence = 10009,
			winningRevSequence = 10009,
			annotation = {
				_serverProvidedMetadata = {
					created = "2016-05-11T20:23:22.018642Z",
					created_by = "urn:carousel:account:038d53448c61dc56a4631558101edef6",
					updated = "2016-05-11T20:23:22.462822Z",
					links = {
						["/rels/space"] = {
							href = "/v2/spaces/ed39f3603bce4b3d9e03e193cf87f0a3",
						},
						["/rels/web_space"] = {
							href = "http://adobe.ly/24MzT02",
						},
						["self"] = {
							href = "/v2/catalogs/57950c495f9541f78990aa9b419b1c63/spaces/ed39f3603bce4b3d9e03e193cf87f0a3",
						},
					},
				}
			}
		},
		revs = {
			{
				revId = "43e0e8831e09c941cebb5db62a7ee10b",
				localDocId = 7,
				sequence = 10009,
				content = {
					download = false,
					private = false,
					location = false,
					metadata = false,
					type = "space",
					subtype = "shared",
				}
			}
		}
	}
	
end

OzDocStoreExamplesTest.inputComment = function()

	return {
		docId = "70dcf52e607b443bbfd56580b292ba35",
		docType = "comment",
		localOverlay = {
    		_ozMetadataUploadStatus = "uploaded"
		},
		serverBaseValue = {
			created = "2016-05-13T22:56:16.943235Z",
			type = "comment",
			id = "urn:revel:catalog:57950c495f9541f78990aa9b419b1c63:asset:a5ecb484c33296682387cb04247bc4fb:comment:70dcf52e607b443bbfd56580b292ba35",
			author = {
				last_name = "Reuer - Work",
				_id = "30ac56f1460b4de6920dd7efe944a066",
				id = "urn:carousel:account:30ac56f1460b4de6920dd7efe944a066",
				first_name = "Jason",
				full_name = "Jason Reuer - Work",
				links = {
					[ "/rels/avatars/medium" ] = {
						href = "/v1.0/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/medium",
						size = 115
					},
					[ "/rels/avatars/large" ] = {
						href = "/v1.0/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/large",
						size = 138
					},
					[ "/rels/avatars/medium2x" ] = {
						href = "/v1.0/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/medium2x",
						size = 230
					},
					[ "/rels/avatars/large2x" ] = {
						href = "/v1.0/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/large2x",
						size = 276
					},
					[ "/rels/avatars/small" ] = {
						href = "/v1.0/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/small",
						size = 50
					},
					[ "/rels/avatars/small2x" ] = {
						href = "/v1.0/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/small2x",
						size = 100
					}
				}
			},
			asset = {
				id = "urn:carousel:catalog:57950c495f9541f78990aa9b419b1c63:asset:a5ecb484c33296682387cb04247bc4fb",
				_id = "a5ecb484c33296682387cb04247bc4fb",
				links = {
					self = {
						href = "/v1.0/catalogs/57950c495f9541f78990aa9b419b1c63/assets/a5ecb484c33296682387cb04247bc4fb"
					}
				}
			},
			body = "Love this shot",
			updated = "2016-05-13T22:56:16.943235Z",
			space = {
				id = "urn:revel:catalog:57950c495f9541f78990aa9b419b1c63:space:ed39f3603bce4b3d9e03e193cf87f0a3",
				_id = "ed39f3603bce4b3d9e03e193cf87f0a3",
				links = {
					self = {
						href = "/v1.0/catalogs/57950c495f9541f78990aa9b419b1c63/spaces/ed39f3603bce4b3d9e03e193cf87f0a3"
					}
				}
			},
			links = {
				self = {
					href = "/v1.0/catalogs/57950c495f9541f78990aa9b419b1c63/assets/a5ecb484c33296682387cb04247bc4fb/comments/70dcf52e607b443bbfd56580b292ba35"
				}
			}
		}
	}
	
end

function OzDocStoreExamplesTest.outputComment()

	return {
		label = {
			localDocId = 6,
			revSeq = 10008,
			name = "oz"
		},
		doc = {
			deleted = false,
			hasConflicts = false,
			localDocId = 6,
			fullDocId = "70dcf52e607b443bbfd56580b292ba35",
			mostRecentRevSequence = 10008,
			winningRevSequence = 10008,
			annotation = {
				_serverProvidedMetadata = {
					author = {
						id = "30ac56f1460b4de6920dd7efe944a066",
						first_name = "Jason",
						full_name = "Jason Reuer - Work",
						last_name = "Reuer - Work",
						links = {
							["/rels/avatars/large"] = {
								href = "/v2/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/large",
								size = 138,
							},
							["/rels/avatars/large2x"] = {
								href = "/v2/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/large2x",
								size = 276,
							},
							["/rels/avatars/medium"] = {
								href = "/v2/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/medium",
								size = 115,
							},
							["/rels/avatars/medium2x"] = {
								href = "/v2/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/medium2x",
								size = 230,
							},
							["/rels/avatars/small"] = {
								href = "/v2/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/small",
								size = 50,
							},
							["/rels/avatars/small2x"] = {
								href = "/v2/avatars/30ac56f1460b4de6920dd7efe944a066/20160513224915/small2x",
								size = 100,
							},
						},
					},
					created = "2016-05-13T22:56:16.943235Z",
					links = {
						self = {
							href = "/v2/catalogs/57950c495f9541f78990aa9b419b1c63/assets/a5ecb484c33296682387cb04247bc4fb/comments/70dcf52e607b443bbfd56580b292ba35",
						},
					},
					updated = "2016-05-13T22:56:16.943235Z",
				}
			}
		},
		revs = {
			{
				revId = "43e0e8831e09c941cebb5db62a7ee10b",
				localDocId = 6,
				sequence = 10008,
				content = {
					asset = {
						id = "a5ecb484c33296682387cb04247bc4fb",
					},
					space = {
						id = "ed39f3603bce4b3d9e03e193cf87f0a3",
					},
					type = "comment",
					subtype = "user",
					body = "Love this shot",
				}
			}
		}
	}

end

OzDocStoreExamplesTest.inputSyncedLocallyDeleted = function()

	return {
		serverBaseValue = {
			type = "asset",
			originalCaptureDate = "2016-07-19T11:31:07.000+02:00",
			_serverProvidedMetadata = {
				created = "2016-07-19T12:27:47.255105Z",
				type = "asset",
				subtype = "jpeg",
				links = {
					self = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a"
					},
					[ "/rels/first_revision" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f"
					},
					[ "/rels/rendition_type/2048" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/renditions/166a6f2bda1ef2c2518f244237236944"
					},
					[ "/rels/latest_revision" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/c87d1268f628ed79955328b5f9e6e88b",
						created_by = "urn:carousel:account:97b6cae5c7d60f1d72f6bedda2a64aca"
					},
					[ "/rels/proxy_type/2560" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/proxies/fcd6ac5a51d81b9115bf892f45c6d1af"
					},
					[ "/rels/rendition_type/640" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/renditions/e2ce47c2133cb16a51fd38820fac4447"
					},
					[ "/rels/master" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/master",
						content_type = "image/jpeg"
					},
					[ "/rels/rendition_type/thumbnail2x" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/renditions/db904829786761ffafd20d95498703e7"
					},
					[ "/rels/rendition_type/1280" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/renditions/d36355474691f98576a3a8dfe837b25c"
					},
					[ "/rels/xmp" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/xmp"
					}
				},
				link_templates = {
					[ "/rels/proxy_generate" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/proxies/{proxy_id}"
					},
					[ "/rels/rendition_generate" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/c87d1268f628ed79955328b5f9e6e88b/renditions/{rendition_id}"
					},
					[ "/rels/child_revision" ] = {
						href = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/c87d1268f628ed79955328b5f9e6e88b/children/{revision_id}"
					}
				},
				updated = "2016-07-19T12:27:50.019602Z",
				revision_ids = {
					[1] = "ad9473c723f9406a9979ae3151c7f94f",
					[2] = "c87d1268f628ed79955328b5f9e6e88b"
				}
			},
			width = 1536,
			version = 1,
			captureDate = "2016-07-19T11:31:07.000+02:00",
			height = 2048,
			importSource = {
				type = "inAppCamera",
				importedOnDevice = "iPhone Simulator {dcc5a425c3b334876bde0b9e0e319158e3ffaed5a3283714d4762abb29a13c43}",
				importTimestamp = "2016-07-19T12:27:46.438Z",
				contentType = "image/jpeg",
				sha256 = "539f2f0fbdd5524e05c481961288f8d1640b31c8c4c03152bf8ad2ec72d07b90",
				fileSize = 351259,
				importedBy = "97b6cae5c7d60f1d72f6bedda2a64aca",
				fileName = "IMG_0006.JPG",
				localAssetId = "E6BF924B-E9D3-436D-8D6F-11FA2C75A20A/L0/001",
				uniqueDeviceId = "dcc5a425c3b334876bde0b9e0e319158e3ffaed5a3283714d4762abb29a13c43"
			},
			develop = {
				processingModel = "lightroom",
				croppedHeight = 2048,
				croppedWidth = 1536,
				_merge = "atomic",
				userOrientation = 1
			}
		},
		localOverlay = {
			_deleted = true,
			_localOnly = {
				proxy = {
					filePath = {
						_delete = true
					}
				},
				localUrl = "E6BF924B-E9D3-436D-8D6F-11FA2C75A20A/L0/001",
				originalFilePath = {
					_delete = true
				},
				latestOriginal = {
					filePath = {
						_delete = true
					}
				},
				thumbnail2x = {
					md5 = "f033647dcbfbcc2917abcb0c3fdae4aa",
					epoch = 1,
					revId = "ad9473c723f9406a9979ae3151c7f94f",
					size = 13751
				},
				original = {
					ozUrl = "/v1.0/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/master",
					size = 351259,
					epoch = 1,
					doNotBackUpFlagSet = true,
					isInCacheFolder = false
				},
				freemiumUploadEmbargoUntil = {
					_delete = true
				},
				preview = {
					md5 = "8716d4d3db0d505b4c45c1f060bb7057",
					epoch = 1,
					revId = "ad9473c723f9406a9979ae3151c7f94f",
					size = 329154
				},
				devSettingsLastSetAtRev = "c87d1268f628ed79955328b5f9e6e88b",
				lrm_customData = {
					importSettings = {
						currentRevision = "ad9473c723f9406a9979ae3151c7f94f",
						data = "eJxjYBgFo2AUjFQAAAQAAAE=",
						isValidForCurrentRevision = false
					}
				}
			}
		},
		docId = 'e3f1ee83967b4008b9057a42a77a031a',
		docType = 'asset'
	}
	
end

OzDocStoreExamplesTest.outputSyncedLocallyDeleted = function()

	return {
		label = {
			localDocId = 7,
			revSeq = 10009,
			name = "oz"
		},
		doc = {
			localDocId = 202,
			fullDocId = 'e3f1ee83967b4008b9057a42a77a031a',
			winningRevSequence = 243,
			lastRecentRevSequence = 243,
			deleted = 1,
			hasConflicts = 0,
			annotation = {	
				_localOnly = {
					proxy = {
					},
					localUrl = "E6BF924B-E9D3-436D-8D6F-11FA2C75A20A/L0/001",
					latestOriginal = {
					},
					thumbnail2x = {
						md5 = "f033647dcbfbcc2917abcb0c3fdae4aa",
						epoch = 1,
						revId = "ad9473c723f9406a9979ae3151c7f94f",
						size = 13751
					},
					original = {
						ozUrl = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/master",
						size = 351259,
						epoch = 1,
						doNotBackUpFlagSet = true,
						isInCacheFolder = false
					},
					preview = {
						md5 = "8716d4d3db0d505b4c45c1f060bb7057",
						epoch = 1,
						revId = "ad9473c723f9406a9979ae3151c7f94f",
						size = 329154
					},
					devSettingsLastSetAtRev = "c87d1268f628ed79955328b5f9e6e88b",
					lrm_customData = {
						importSettings = {
							currentRevision = "ad9473c723f9406a9979ae3151c7f94f",
							data = "eJxjYBgFo2AUjFQAAAQAAAE=",
							isValidForCurrentRevision = false
						}
					}
				},
				_serverProvidedMetadata = {
					created = "2016-07-19T12:27:47.255105Z",
					links = {
						self = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a"
						},
						[ "/rels/first_revision" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f"
						},
						[ "/rels/rendition_type/2048" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/renditions/166a6f2bda1ef2c2518f244237236944"
						},
						[ "/rels/latest_revision" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/c87d1268f628ed79955328b5f9e6e88b",
							created_by = "urn:carousel:account:97b6cae5c7d60f1d72f6bedda2a64aca"
						},
						[ "/rels/proxy_type/2560" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/proxies/fcd6ac5a51d81b9115bf892f45c6d1af"
						},
						[ "/rels/rendition_type/640" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/renditions/e2ce47c2133cb16a51fd38820fac4447"
						},
						[ "/rels/master" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/master",
							content_type = "image/jpeg"
						},
						[ "/rels/master_create" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/{revision_id}/master",
							templated = true,
						},
						[ "/rels/rendition_type/thumbnail2x" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/renditions/db904829786761ffafd20d95498703e7"
						},
						[ "/rels/rendition_type/1280" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/renditions/d36355474691f98576a3a8dfe837b25c"
						},
						[ "/rels/xmp" ] = {
							href = "/v2/catalogs/49079293e58a4e52bba1f4c068730eda/assets/e3f1ee83967b4008b9057a42a77a031a/revisions/ad9473c723f9406a9979ae3151c7f94f/xmp"
						}
					},
					revision_ids = {
						[1] = "ad9473c723f9406a9979ae3151c7f94f",
						[2] = "c87d1268f628ed79955328b5f9e6e88b"
					},
					updated = "2016-07-19T12:27:50.019602Z",
				},
			},
		},
		revs = {
			{
				revId = 'ccbc68f288c14591a33ba7ecff36a420',
				localDocId = 202,
				sequence = 242,
				content = {},
			},
			{
				_deleted = true,
				revId = '54d377f815e049ca9c616b658ab59457',
				localDocId = 202,
				sequence = 243,
				content = {
					captureDate = "2016-07-19T11:31:07.000+02:00",
					develop = {
						croppedHeight = 2048,
						croppedWidth = 1536,
						processingModel = "lightroom",
						userOrientation = 1,
					},
					importSource = {
						contentType = "image/jpeg",
						fileName = "IMG_0006.JPG",
						fileSize = 351259,
						importTimestamp = "2016-07-19T12:27:46.438Z",
						importedBy = "97b6cae5c7d60f1d72f6bedda2a64aca",
						importedOnDevice = "iPhone Simulator {dcc5a425c3b334876bde0b9e0e319158e3ffaed5a3283714d4762abb29a13c43}",
						localAssetId = "E6BF924B-E9D3-436D-8D6F-11FA2C75A20A/L0/001",
						originalHeight = 2048,
						originalWidth = 1536,
						sha256 = "539f2f0fbdd5524e05c481961288f8d1640b31c8c4c03152bf8ad2ec72d07b90",
						uniqueDeviceId = "dcc5a425c3b334876bde0b9e0e319158e3ffaed5a3283714d4762abb29a13c43",
					},
					subtype = "image",
					type = "asset",
				}
			}			
		}
	}

end

OzDocStoreExamplesTest.inputUnsyncedImage = function()
	return {
		docId = "fe8b10c24b864a869513f392e9cfbed8",
		docType = "asset",
		localOverlay = {
			type = "asset",
			changedOnDevice = "Guido's iPhone",
			originalCaptureDate = "2017-01-22T14:49:22.147+01:00",
			location = {
				longitude = 10.0068,
				latitude = 53.5477
			},
			_localOnly = {
				devSettingsLastSetAtRev = "pending",
				thumbnail2x = {
					referenceHeight = 3024,
					md5 = "c5debcf2fa9c2d818ee61338632e0fb4",
					referenceWidth = 4032,
					epoch = 1,
					revId = "pending",
					size = 11130
				},
				lrm_customData = {
					autoToneParams = {
						currentRevision = "pending",
						data = "",
						isValidForCurrentRevision = true
					},
					importSettings = {
						currentRevision = "pending",
						data = "eJxjYBgFo2AUjFQAAAQAAAE=",
						isValidForCurrentRevision = false
					}
				},
				localUrl = "DE39FDE6-45BD-40B5-99A6-135685A38315/L0/001",
				preview = {
					referenceHeight = 3024,
					md5 = "70904692471e196e7ae359e98d04d57c",
					referenceWidth = 4032,
					epoch = 1,
					revId = "pending",
					size = 229316
				},
				original = {
					epoch = 1,
					size = 1638130,
					isInCacheFolder = false
				},
				originalFilePath = "/var/mobile/Containers/Data/Application/3BFB5CA5-5ED1-4068-9164-9C2EBBC32259/Documents/db59dae42cd4482e858b893682fe9ce0/Originals/2017/2017-01/2017-01-22/IMG_0640.JPG"
			},
			develop = {
				processingModel = "lightroom",
				croppedHeight = 3024,
				croppedWidth = 4032,
				userUpdated = "2017-01-26T15:24:26.524+01:00",
				userOrientation = 1,
				_merge = "atomic",
				xmpCameraRaw = "<x:xmpmeta />"
			},
			changedAtTime = "2017-01-26T15:24:26.530",
			version = 1,
			captureDate = "2017-01-22T14:49:22.147+01:00",
			height = 3024,
			importSource = {
				type = "inAppCamera",
				importedOnDevice = "Guido's iPhone {7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a}",
				importTimestamp = "2017-01-26T14:24:01.134Z",
				contentType = "image/jpeg",
				sha256 = "6d4959049c71d09198ecbae4c07a72b6bd4e655c74280011da6c9e2bf792d669",
				fileSize = 1638130,
				importedBy = "894ff3c9a01610ad2d3a6e26716a3f17",
				fileName = "IMG_0640.JPG",
				localAssetId = "DE39FDE6-45BD-40B5-99A6-135685A38315/L0/001",
				uniqueDeviceId = "7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a"
			},
			xmp = {
				xmp = {
					CreatorTool = "10.2"
				},
				aux = {
					Lens = "iPhone 7 Plus back dual camera 3.99mm f/1.8"
				},
				tiff = {
					Model = "iPhone 7 Plus",
					Make = "Apple"
				},
				exif = {
					ApertureValue = {
						[1] = 1695994,
						[2] = 1000000
					},
					FNumber = {
						[1] = 18,
						[2] = 10
					},
					ExposureTime = {
						[1] = 1,
						[2] = 35
					},
					FocalLength = {
						[1] = 399,
						[2] = 100
					},
					ISOSpeedRatings = {
						[1] = 32
					}
				}
			},
			width = 4032
		}
	}

end

OzDocStoreExamplesTest.outputUnsyncedImage = function()
	return {
		doc = {
			annotation = {
				_localOnly = {
					devSettingsLastSetAtRev = "pending",
					localUrl = "DE39FDE6-45BD-40B5-99A6-135685A38315/L0/001",
					lrm_customData = {
						autoToneParams = {
							currentRevision = "pending",
							data = "",
							isValidForCurrentRevision = true,
						},
						importSettings = {
							currentRevision = "pending",
							data = "eJxjYBgFo2AUjFQAAAQAAAE=",
							isValidForCurrentRevision = false,
						},
					},
					original = {
						epoch = 1,
						isInCacheFolder = false,
						size = 1638130,
					},
					originalFilePath = "/var/mobile/Containers/Data/Application/3BFB5CA5-5ED1-4068-9164-9C2EBBC32259/Documents/db59dae42cd4482e858b893682fe9ce0/Originals/2017/2017-01/2017-01-22/IMG_0640.JPG",
					preview = {
						epoch = 1,
						md5 = "70904692471e196e7ae359e98d04d57c",
						referenceHeight = 3024,
						referenceWidth = 4032,
						revId = "pending",
						size = 229316,
					},
					thumbnail2x = {
						epoch = 1,
						md5 = "c5debcf2fa9c2d818ee61338632e0fb4",
						referenceHeight = 3024,
						referenceWidth = 4032,
						revId = "pending",
						size = 11130,
					},
				},
			},
			deleted = 0,
			fullDocId = "fe8b10c24b864a869513f392e9cfbed8",
			hasConflicts = 0,
			localDocId = 8,
			mostRecentRevSequence = 10009,
			winningRevSequence = 10009,
		},
		label = {
		},
		revs = {
			{
				content = {
					captureDate = "2017-01-22T14:49:22.147+01:00",
					changedAtTime = "2017-01-26T14:24:26.530Z",
					changedOnDevice = "Guido's iPhone",
					develop = {
						croppedHeight = 3024,
						croppedWidth = 4032,
						processingModel = "lightroom",
						userOrientation = 1,
						userUpdated = "2017-01-26T14:24:26.524Z",
						xmpCameraRaw = "<x:xmpmeta />",
					},
					importSource = {
						contentType = "image/jpeg",
						fileName = "IMG_0640.JPG",
						fileSize = 1638130,
						importTimestamp = "2017-01-26T14:24:01.134Z",
						importedBy = "894ff3c9a01610ad2d3a6e26716a3f17",
						importedOnDevice = "Guido's iPhone {7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a}",
						localAssetId = "DE39FDE6-45BD-40B5-99A6-135685A38315/L0/001",
						originalHeight = 3024,
						originalWidth = 4032,
						sha256 = "6d4959049c71d09198ecbae4c07a72b6bd4e655c74280011da6c9e2bf792d669",
						uniqueDeviceId = "7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a",
					},
					location = {
						latitude = 53.5477,
						longitude = 10.0068,
					},
					subtype = "image",
					type = "asset",
					xmp = {
						aux = {
							Lens = "iPhone 7 Plus back dual camera 3.99mm f/1.8",
						},
						exif = {
							ApertureValue = {
								1695994,
								1000000,
							},
							ExposureTime = {
								1,
								35,
							},
							FNumber = {
								18,
								10,
							},
							FocalLength = {
								399,
								100,
							},
							ISOSpeedRatings = 32,
						},
						tiff = {
							Make = "Apple",
							Model = "iPhone 7 Plus",
						},
						xmp = {
							CreatorTool = "10.2",
						},
					},
				},
				localDocId = 1,
				revId = "3bf40368880a47039b99979f92017823",
				sequence = 10009,
			},
		},
	}
end

OzDocStoreExamplesTest.inputUnsyncedVideo = function()

	return {
		docId = "faf4edb9c32a4409bebe89324a004ec1",
		docType = "asset",
		localOverlay = {
			type = "asset",
			originalCaptureDate = "2015-05-03T13:12:20.000-07:00",
			_localOnly = {
				localUrl = "assets-library://asset/asset.mov?id=CEFB9082-937E-46BF-BD1A-CAED98580065&ext=mov",
				preview = {
					md5 = "ffb9fac2f9ad82c824c49d3ceebac4ea",
					epoch = 1,
					revId = "pending",
					size = 246353
				},
				thumbnail2x = {
					md5 = "abeeeb535bbb7cdb8b342accab84a31e",
					epoch = 1,
					revId = "pending",
					size = 24101
				}
			},
			video = {
				frameRate = {
					[1] = 2999,
					[2] = 100
				},
				videoCodec = "H.264",
				duration = {
					[1] = 26894,
					[2] = 600
				},
				audioSampleRate = 44100,
				audioChannel = "mono",
				audioCodec = "AAC"
			},
			version = 1,
			captureDate = "2015-05-03T13:12:20.000-07:00",
			location = {
				altitude = 0,
				latitude = 37.7725,
				longitude = -122.467
			},
			width = 720,
			importSource = {
				type = "inAppCamera",
				importedOnDevice = "iPhone Simulator {039a84bc8429393c73f9bab794cd3379cef6bf81028a305532e0fe2fd7dacdb4}",
				importTimestamp = "2016-05-25T12:41:09.843",
				contentType = "video/quicktime",
				sha256 = "11df0b7daa5cb257a93d67d5eac17fdb04df4eaf0c26f2a4ac4ace8123ed7dae",
				fileSize = 13111466,
				importedBy = "00000000000000000000000000000000",
				fileName = "IMG_0006.mov",
				localAssetId = "assets-library://asset/asset.mov?id=CEFB9082-937E-46BF-BD1A-CAED98580065&ext=mov",
				uniqueDeviceId = "039a84bc8429393c73f9bab794cd3379cef6bf81028a305532e0fe2fd7dacdb4"
			},
			height = 1280
		}
		
	}
	
end

function OzDocStoreExamplesTest.outputUnsyncedVideo()

	return {
		label = {
		},
		doc = {
			deleted = false,
			hasConflicts = false,
			localDocId = 9,
			fullDocId = "faf4edb9c32a4409bebe89324a004ec1",
			mostRecentRevSequence = 10010,
			winningRevSequence = 10010,
			annotation = {			
				_localOnly = {
					localUrl = "assets-library://asset/asset.mov?id=CEFB9082-937E-46BF-BD1A-CAED98580065&ext=mov",
					preview = {
						epoch = 1,
						md5 = "ffb9fac2f9ad82c824c49d3ceebac4ea",
						revId = "pending",
						size = 246353,
					},
					thumbnail2x = {
						epoch = 1,
						md5 = "abeeeb535bbb7cdb8b342accab84a31e",
						revId = "pending",
						size = 24101,
					},
				},
			},
		},
		revs = {
			{
				revId = "261dc7df6d3b49f6a8737bc044d6017a",
				localDocId = 9,
				sequence = 10010,
				content = {
					type = "asset",
					subtype = "video",
					video = {
						frameRate = {
							[1] = 2999,
							[2] = 100
						},
						videoCodec = "H.264",
						duration = {
							[1] = 26894,
							[2] = 600
						},
						audioSampleRate = 44100,
						audioChannel = "mono",
						audioCodec = "AAC"
					},
					captureDate = "2015-05-03T13:12:20.000-07:00",
					location = {
						altitude = 0,
						latitude = 37.7725,
						longitude = -122.467
					},
					importSource = {
						originalWidth = 720,
						originalHeight = 1280,
						importedOnDevice = "iPhone Simulator {039a84bc8429393c73f9bab794cd3379cef6bf81028a305532e0fe2fd7dacdb4}",
						importTimestamp = "2016-05-25T12:41:09.843",
						contentType = "video/quicktime",
						sha256 = "11df0b7daa5cb257a93d67d5eac17fdb04df4eaf0c26f2a4ac4ace8123ed7dae",
						fileSize = 13111466,
						importedBy = "00000000000000000000000000000000",
						fileName = "IMG_0006.mov",
						localAssetId = "assets-library://asset/asset.mov?id=CEFB9082-937E-46BF-BD1A-CAED98580065&ext=mov",
						uniqueDeviceId = "039a84bc8429393c73f9bab794cd3379cef6bf81028a305532e0fe2fd7dacdb4"
					},
				}
			}
		}
	}

end


function OzDocStoreExamplesTest.inputAlbumAsset()

	return {
		docId = "0895bbe5ca4d4a34b723d7c5c94802c4",
		docType = "album_asset",
		serverBaseValue = {
			created = "2016-05-23T09:10:07.913908Z",
			type = "album_asset",
			order = "V--q",
			asset = {
				id = "urn:carousel:catalog:57950c495f9541f78990aa9b419b1c63:asset:65d43a1e8933496698deb5af68a43e5b",
				_id = "65d43a1e8933496698deb5af68a43e5b",
				links = {
					self = {
						href = "/v1.0/catalogs/57950c495f9541f78990aa9b419b1c63/assets/65d43a1e8933496698deb5af68a43e5b"
					}
				}
			},
			links = {
				self = {
					href = "/v1.0/catalogs/57950c495f9541f78990aa9b419b1c63/albums/d6a7447b19ba81cec33d07ec3d7e6354/assets/65d43a1e8933496698deb5af68a43e5b"
				}
			},
			updated = "2016-05-23T09:10:07.913908Z",
			added_by = "urn:carousel:account:038d53448c61dc56a4631558101edef6",
			album = {
				id = "urn:revel:catalog:57950c495f9541f78990aa9b419b1c63:album:d6a7447b19ba81cec33d07ec3d7e6354",
				_id = "d6a7447b19ba81cec33d07ec3d7e6354",
				links = {
					self = {
						href = "/v1.0/catalogs/57950c495f9541f78990aa9b419b1c63/albums/d6a7447b19ba81cec33d07ec3d7e6354"
					}
				}
			},
			id = "urn:revel:catalog:57950c495f9541f78990aa9b419b1c63:album:d6a7447b19ba81cec33d07ec3d7e6354:asset:65d43a1e8933496698deb5af68a43e5b"
		},
		localOverlay = {
    		_ozMetadataUploadStatus = "uploaded"
		}
	}

end

function OzDocStoreExamplesTest.outputAlbumAsset()

	return {
		label = {
			localDocId = 10,
			revSeq = 10011,
			name = "oz"
		},
		doc = {
			deleted = false,
			hasConflicts = false,
			localDocId = 10,
			fullDocId = "0895bbe5ca4d4a34b723d7c5c94802c4",
			mostRecentRevSequence = 10011,
			winningRevSequence = 10011,
			annotation = {
				_serverProvidedMetadata = {
					created = "2016-05-23T09:10:07.913908Z",
					links = {
						self = {
							href = "/v2/catalogs/57950c495f9541f78990aa9b419b1c63/albums/d6a7447b19ba81cec33d07ec3d7e6354/assets/65d43a1e8933496698deb5af68a43e5b",
						},
					},
					updated = "2016-05-23T09:10:07.913908Z",
				},
			}
		},
		revs = {
			{
				revId = "f1de945daaf7b084497b4c7a95eef248",
				localDocId = 10,
				sequence = 10011,
				content = {
					album = {
						id = "d6a7447b19ba81cec33d07ec3d7e6354",
					},
					asset = {
						id = "65d43a1e8933496698deb5af68a43e5b",
					},
					order = "V--q",
					type = "album_asset",
				}
			}
		}
	}

end

OzDocStoreExamplesTest.inputUnsyncedComment = function()

	return {
		docId = "bd7008cdc9554ff49af6456cf634a098",
		docType = "comment",
		localOverlay = {
		    _localOnly = {
        		created = "2017-01-26T10:59:05.212Z",
        		assetId = "7c8de0deabb446b3a9454f4c9fe8403e",
        		author = {
            		first_name = "Hans",
            		last_name = "Tester",
            		full_name = "Hans Tester",
            		_id = "894ff3c9a01610ad2d3a6e26716a3f17"
        		},
        		spaceId = "abba65038b7143cb949c9ae570d4423c"
    		},
    		body = "test"
		}
	}
end

function OzDocStoreExamplesTest.outputUnsyncedComment()

	return {
		label = {
			localDocId = 11,
			revSeq = 10014,
		},
		doc = {
			deleted = false,
			hasConflicts = false,
			localDocId = 11,
			fullDocId = "bd7008cdc9554ff49af6456cf634a098",
			mostRecentRevSequence = 10014,
			winningRevSequence = 10014,
			annotation = {
				_localOnly = {
					author = {
						id = "894ff3c9a01610ad2d3a6e26716a3f17",
						first_name = "Hans",
						full_name = "Hans Tester",
						last_name = "Tester",
					},
					created = "2017-01-26T10:59:05.212Z",
				}
			}
		},
		revs = {
			{
				revId = "deadbeef1e09c941cebb5db62a7ee10b",
				localDocId = 11,
				sequence = 10014,
				content = {
					asset = {
						id = "7c8de0deabb446b3a9454f4c9fe8403e"
					},
					space = {
						id = "abba65038b7143cb949c9ae570d4423c"
					},
					type = "comment",
					subtype = "user",
					body = "test",
				}
			}
		}
	}
end

OzDocStoreExamplesTest.inputUnsyncedFavorite = function()

	return {
		docId = "8d55c1b4e402482d906468420514172b",
		docType = "spacefavorite",
		localOverlay = {
			_localOnly = {
				created = "2017-01-26T10:59:05.212Z",
				assetId = "7c8de0deabb446b3a9454f4c9fe8403e",
				author = {
					first_name = "Hans",
					last_name = "Tester",
					full_name = "Hans Tester",
					_id = "894ff3c9a01610ad2d3a6e26716a3f17"
				},
				spaceId = "abba65038b7143cb949c9ae570d4423c"
			},
		}
	}
end

function OzDocStoreExamplesTest.outputUnsyncedFavorite()

	return {
		label = {
			localDocId = 12,
			revSeq = 10015,
		},
		doc = {
			deleted = false,
			hasConflicts = false,
			localDocId = 12,
			fullDocId = "8d55c1b4e402482d906468420514172b",
			mostRecentRevSequence = 10015,
			winningRevSequence = 10015,
			annotation = {
				_localOnly = {
					author = {
						id = "894ff3c9a01610ad2d3a6e26716a3f17",
						first_name = "Hans",
						full_name = "Hans Tester",
						last_name = "Tester",
					},
					created = "2017-01-26T10:59:05.212Z",
				}
			}
		},
		revs = {
			{
				revId = "9deadbeefdeadbeefebb5db62a7ee10b",
				localDocId = 12,
				sequence = 10015,
				content = {
					asset = {
						id = "7c8de0deabb446b3a9454f4c9fe8403e"
					},
					space = {
						id = "abba65038b7143cb949c9ae570d4423c"
					},
					subtype = "user",
					type = "favorite",
				}
			}
		}
	}
end


function OzDocStoreExamplesTest.inputTaskAsset()

	return {
		docId = "5b7746d2f28e1a99db640f1c2891cf1f",
		docType = "asset",
		serverBaseValue = {
			application = "oz-tag",
			version = 0,
			action = "tag",
			captureDate = "0000-00-00T00:00:00",
			status = {
				success = "2016-03-18T15:22:09Z",
				executing = "2016-03-18T15:21:32Z",
				accepted = "2016-03-18T15:13:33Z"
			},
			resources = {
				asset = {
					completed = 3176,
					total = 3176
				}
			},
			_serverProvidedMetadata = {
				created = "2016-03-18T15:13:33.516708Z",
				type = "asset",
				storage = {
					updated = "2016-03-18T15:13:33.633494Z",
					account_id = "98afdd652ee64f66e16648a59767423e",
					billed = true,
					size = 0
				},
				subtype = "task",
				links = {
					self = {
						href = "/v1.0/catalogs/e397be7331534acbbad984cf35b194ef/assets/5b7746d2f28e1a99db640f1c2891cf1f"
					},
					[ "/rels/first_revision" ] = {
						href = "/v1.0/catalogs/e397be7331534acbbad984cf35b194ef/assets/5b7746d2f28e1a99db640f1c2891cf1f/revisions/c3cc7c3ca6bc219b50b5396129d6fdbc"
					},
					[ "/rels/latest_revision" ] = {
						href = "/v1.0/catalogs/e397be7331534acbbad984cf35b194ef/assets/5b7746d2f28e1a99db640f1c2891cf1f/revisions/6c96112f8b1c9c45288c415e76fb24f6",
						created_by = "urn:carousel:account:98afdd652ee64f66e16648a59767423e"
					}
				},
				link_templates = {
					[ "/rels/child_revision" ] = {
						href = "/v1.0/catalogs/e397be7331534acbbad984cf35b194ef/assets/5b7746d2f28e1a99db640f1c2891cf1f/revisions/6c96112f8b1c9c45288c415e76fb24f6/children/{revision_id}"
					}
				},
				updated = "2016-03-18T15:22:09.831755Z",
				revision_ids = {
					[1] = "c3cc7c3ca6bc219b50b5396129d6fdbc",
					[2] = "07c3d835df996d26b890d52d1d27431c",
					[3] = "bb10b7789df37b45334af768019c2ff8",
					[4] = "c44269bd2e81130206a7a1f4b55de861",
					[5] = "61d3422d31069e6a970ae8ea2f4146f0",
					[6] = "6c96112f8b1c9c45288c415e76fb24f6"
				}
			},
			finish = "2016-03-18T15:22:09Z"
		},
		localOverlay = {
    		_ozMetadataUploadStatus = "uploaded"
		}
	}

end

--------------------------------------------------------------------------------

function OzDocStoreExamplesTest.inputRatingInvalid()

	return {
		docId = "339d6a9a669a4dbb979b268259510418",
		docType = "asset",
		serverBaseValue = {
			type = "asset",
			width = 6000,
			height = 4000,
			_serverProvidedMetadata = {
				created = "2016-09-29T12:38:36.947615Z",
				type = "asset",
				storage = {
					updated = "2016-09-29T12:38:36.947615Z",
					billed = true,
					sha256 = "c466e162071f232495eff9c9a8c006233836cdcdc6a33f6801fa0eb7eeb69cb3",
					account_id = "0a91cf18f693803d34ebe9e3d1317709",
					size = 0
				},
				subtype = "jpeg",
				links = {
					self = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af"
					},
					[ "/rels/rendition_type/panorama" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/854c8e5811eb47538aa371c846f9688e/renditions/4d16cac8cd088361b423eb11e3ab63c7",
						invalid = true
					},
					[ "/rels/first_revision" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/73effe400f514389a4f8a14453442c67"
					},
					[ "/rels/rendition_type/2048" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/066fd80a2ddf4599b512c979a2bb46e9/renditions/24db4389145c2d9ed97e3e87385e136d"
					},
					[ "/rels/xmp" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/73effe400f514389a4f8a14453442c67/xmp"
					},
					[ "/rels/rendition_type/1280" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/066fd80a2ddf4599b512c979a2bb46e9/renditions/affe17c2632cd1166cca1f302fe09ad0"
					},
					[ "/rels/proxy_type/2560" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/73effe400f514389a4f8a14453442c67/proxies/b36e4dcb6e7048298073e62573b9626a"
					},
					[ "/rels/latest_revision" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/80322e5235e64dcc90f9f38897f5beab",
						created_by = "urn:carousel:account:0a91cf18f693803d34ebe9e3d1317709"
					},
					[ "/rels/rendition_type/640" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/066fd80a2ddf4599b512c979a2bb46e9/renditions/69b98e57b125e51087b190cb1e8f06e7"
					},
					[ "/rels/rendition_type/thumbnail2x" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/066fd80a2ddf4599b512c979a2bb46e9/renditions/ff070be50cc2a2ad1987dd54a1baea67"
					},
					[ "/rels/profiles/lens" ] = {
						filename = "SONY (Sony E 16-70mm F4 ZA OSS) - RAW.lcp",
						href = "/v1.0/catalogs/f270b1c513494be08836d593cd1d6363/assets/2db0ed7721a84ff3915072c17b7193f5/revisions/34227bc5fb5849a493f95986a24cd511/master"
					},
					[ "/rels/profiles/camera" ] = {
						filename = "Sony ILCE-6300 Adobe Standard.dcp",
						href = "/v1.0/catalogs/f270b1c513494be08836d593cd1d6363/assets/3b730956785148c68f929539624f0d92/revisions/efc2fcc3b0334f37911c4001cae52799/master"
					}
				},
				link_templates = {
					[ "/rels/child_revision" ] = {
						href = "/v1.0/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/80322e5235e64dcc90f9f38897f5beab/children/{revision_id}"
					}
				},
				updated = "2017-01-31T11:47:02.194499Z",
				revision_ids = {
					[1] = "80322e5235e64dcc90f9f38897f5beab"
				}
			},
			develop = {
				userUpdated = "2017-01-23T13:09:46.461Z",
				croppedHeight = 3376,
				xmpCameraRaw = "<x:xmpmeta />",
				_merge = "atomic",
				croppedWidth = 6000,
				processingModel = "lightroom",
				userOrientation = 1,
				profiles = {
					lens = {
						filename = "SONY (Sony E 16-70mm F4 ZA OSS) - RAW.lcp",
						href = "/v1.0/catalogs/f270b1c513494be08836d593cd1d6363/assets/2db0ed7721a84ff3915072c17b7193f5/revisions/34227bc5fb5849a493f95986a24cd511/master"
					},
					camera = {
						filename = "Sony ILCE-6300 Adobe Standard.dcp",
						href = "/v1.0/catalogs/f270b1c513494be08836d593cd1d6363/assets/3b730956785148c68f929539624f0d92/revisions/efc2fcc3b0334f37911c4001cae52799/master"
					}
				}
			},
			changedAtTime = "2017-01-23T13:09:46.461Z",
			changedOnDevice = "immisch-mp",
			version = 1,
			captureDate = "2016-09-27T13:51:04",
			xmp = {
				aux = {
					Lens = "E 16-70mm F4 ZA OSS"
				},
				tiff = {
					Model = "ILCE-6300",
					Make = "SONY"
				},
				exif = {
					ApertureValue = {
						[1] = 433985,
						[2] = 100000
					},
					FNumber = {
						[1] = 45,
						[2] = 10
					},
					ExposureTime = {
						[1] = 1,
						[2] = 160
					},
					FocalLength = {
						[1] = 360,
						[2] = 10
					},
					ISOSpeedRatings = {
						[1] = 100
					}
				}
			},
			importSource = {
				importedOnDevice = "immisch-mp {820462f32925ffb5e37ded540d1963f3891f3d5bcc2673cfd178ca60e49f8d88}",
				importTimestamp = "2016-09-29T14:34:28+02:00",
				contentType = "application/octet-stream",
				fileName = "DSC00229.ARW",
				fileSize = 25624576,
				importedBy = "0a91cf18f693803d34ebe9e3d1317709",
				willNotUploadMaster = true,
				sha256 = "c466e162071f232495eff9c9a8c006233836cdcdc6a33f6801fa0eb7eeb69cb3",
				folder = "/Users/immisch/Pictures/2016/2016-09-27"
			},
			ratings = {
				[ "0a91cf18f693803d34ebe9e3d1317709" ] = {
					date = "0000-00-00T00:00:00",
					rating = 5,
					_merge = "atomic"
				},
				[ "2e874852e7d41cda65b23915aa554483" ] = "invalid",
				[ "77b302a683cb827ce5765693288b0399" ] = {
					wrongEntry = 7
				},
				[ "fc29c1192865057265a6db19370d5f52" ] = {
				}
			}
		},
		localOverlay = {
			_ozMetadataUploadStatus = "uploaded",
			_localOnly = {
				freemiumUploadEmbargoUntil = {
					_delete = true
				}
			},
			_ozCentralRevisionId = "80322e5235e64dcc90f9f38897f5beab"
		}
	}

end

--------------------------------------------------------------------------------

function OzDocStoreExamplesTest.outputRatingInvalid()

	return {
		doc = {
			annotation = {
				_localOnly = {
				},
				_serverProvidedMetadata = {
					created = "2016-09-29T12:38:36.947615Z",
					links = {
						["/rels/first_revision"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/73effe400f514389a4f8a14453442c67",
						},
						["/rels/latest_revision"] = {
							created_by = "urn:carousel:account:0a91cf18f693803d34ebe9e3d1317709",
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/80322e5235e64dcc90f9f38897f5beab",
						},
						["/rels/master_create"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/{revision_id}/master",
							templated = true,
						},
						["/rels/profiles/camera"] = {
							filename = "Sony ILCE-6300 Adobe Standard.dcp",
							href = "/v2/catalogs/f270b1c513494be08836d593cd1d6363/assets/3b730956785148c68f929539624f0d92/revisions/efc2fcc3b0334f37911c4001cae52799/master",
						},
						["/rels/profiles/lens"] = {
							filename = "SONY (Sony E 16-70mm F4 ZA OSS) - RAW.lcp",
							href = "/v2/catalogs/f270b1c513494be08836d593cd1d6363/assets/2db0ed7721a84ff3915072c17b7193f5/revisions/34227bc5fb5849a493f95986a24cd511/master",
						},
						["/rels/proxy_type/2560"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/73effe400f514389a4f8a14453442c67/proxies/b36e4dcb6e7048298073e62573b9626a",
						},
						["/rels/rendition_type/1280"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/066fd80a2ddf4599b512c979a2bb46e9/renditions/affe17c2632cd1166cca1f302fe09ad0",
						},
						["/rels/rendition_type/2048"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/066fd80a2ddf4599b512c979a2bb46e9/renditions/24db4389145c2d9ed97e3e87385e136d",
						},
						["/rels/rendition_type/640"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/066fd80a2ddf4599b512c979a2bb46e9/renditions/69b98e57b125e51087b190cb1e8f06e7",
						},
						["/rels/rendition_type/panorama"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/854c8e5811eb47538aa371c846f9688e/renditions/4d16cac8cd088361b423eb11e3ab63c7",
							invalid = true,
						},
						["/rels/rendition_type/thumbnail2x"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/066fd80a2ddf4599b512c979a2bb46e9/renditions/ff070be50cc2a2ad1987dd54a1baea67",
						},
						["/rels/xmp"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af/revisions/73effe400f514389a4f8a14453442c67/xmp",
						},
						["self"] = {
							href = "/v2/catalogs/d80352a99da443b0b12e39167b5b0c7e/assets/a8d55c6fee0dea648a1004a3246283af",
						},
					},
					revision_ids = {
						"80322e5235e64dcc90f9f38897f5beab",
					},
					storage = {
						account_id = "0a91cf18f693803d34ebe9e3d1317709",
						billed = true,
						sha256 = "c466e162071f232495eff9c9a8c006233836cdcdc6a33f6801fa0eb7eeb69cb3",
						size = 0,
						updated = "2016-09-29T12:38:36.947615Z",
					},
					updated = "2017-01-31T11:47:02.194499Z",
				},
			},
			deleted = 0,
			fullDocId = "339d6a9a669a4dbb979b268259510418",
			hasConflicts = 0,
			localDocId = 13,
			mostRecentRevSequence = 10016,
			winningRevSequence = 10016,
		},
		label = {
			localDocId = 13,
			name = "oz",
			revSeq = 10016,
		},
		revs = {
			{
				content = {
					captureDate = "2016-09-27T13:51:04",
					changedAtTime = "2017-01-23T13:09:46.461Z",
					changedOnDevice = "immisch-mp",
					develop = {
						croppedHeight = 3376,
						croppedWidth = 6000,
						processingModel = "lightroom",
						profiles = {
							camera = {
								filename = "Sony ILCE-6300 Adobe Standard.dcp",
								href = "/v2/catalogs/f270b1c513494be08836d593cd1d6363/assets/3b730956785148c68f929539624f0d92/revisions/efc2fcc3b0334f37911c4001cae52799/master",
							},
							lens = {
								filename = "SONY (Sony E 16-70mm F4 ZA OSS) - RAW.lcp",
								href = "/v2/catalogs/f270b1c513494be08836d593cd1d6363/assets/2db0ed7721a84ff3915072c17b7193f5/revisions/34227bc5fb5849a493f95986a24cd511/master",
							},
						},
						userOrientation = 1,
						userUpdated = "2017-01-23T13:09:46.461Z",
						xmpCameraRaw = "<x:xmpmeta />",
					},
					importSource = {
						contentType = "application/octet-stream",
						fileName = "DSC00229.ARW",
						fileSize = 25624576,
						importTimestamp = "2016-09-29T14:34:28+02:00",
						importedBy = "0a91cf18f693803d34ebe9e3d1317709",
						importedOnDevice = "immisch-mp {820462f32925ffb5e37ded540d1963f3891f3d5bcc2673cfd178ca60e49f8d88}",
						originalHeight = 4000,
						originalWidth = 6000,
						sha256 = "c466e162071f232495eff9c9a8c006233836cdcdc6a33f6801fa0eb7eeb69cb3",
						willNotUploadMaster = true,
					},
					ratings = {
						["0a91cf18f693803d34ebe9e3d1317709"] = {
							rating = 5,
						},
					},
					subtype = "image",
					type = "asset",
					xmp = {
						aux = {
							Lens = "E 16-70mm F4 ZA OSS",
						},
						exif = {
							ApertureValue = {
								433985,
								100000,
							},
							ExposureTime = {
								1,
								160,
							},
							FNumber = {
								45,
								10,
							},
							FocalLength = {
								360,
								10,
							},
							ISOSpeedRatings = 100,
						},
						tiff = {
							Make = "SONY",
							Model = "ILCE-6300",
						},
					},
				},
				localDocId = 13,
				revId = "80322e5235e64dcc90f9f38897f5beab",
				sequence = 10016,
			},
		},
	}
end

--------------------------------------------------------------------------------

function OzDocStoreExamplesTest.inputSyncingISO()

	return {
		docId = "dccadb096bdc4bcbb4990fee55c3e813",
		docType = "asset",
		serverBaseValue = {},
		localOverlay = {
			type = "asset",
			originalCaptureDate = "2017-01-28T17:12:05.403+01:00",
			width = 4032,
			_localOnly = {
				devSettingsLastSetAtRev = "e04244a4db134b61936b368156ed6a96",
				_uploadedValues = {
					type = "asset",
					originalCaptureDate = "2017-01-28T17:12:05.403+01:00",
					develop = {
						processingModel = "lightroom",
						croppedHeight = 3024,
						userOrientation = 1,
						_merge = "atomic",
						croppedWidth = 4032
					},
					width = 4032,
					version = 1,
					captureDate = "2017-01-28T17:12:05.403+01:00",
					height = 3024,
					xmp = {
						xmp = {
							CreatorTool = "10.2"
						},
						aux = {
							Lens = "iPhone 7 Plus back dual camera 3.99mm f/1.8"
						},
						tiff = {
							Model = "iPhone 7 Plus",
							Make = "Apple"
						},
						exif = {
							ApertureValue = {
								[1] = 1695994,
								[2] = 1000000
							},
							FNumber = {
								[1] = 18,
								[2] = 10
							},
							ExposureTime = {
								[1] = 1,
								[2] = 4
							},
							FocalLength = {
								[1] = 399,
								[2] = 100
							},
							ISOSpeedRatings = {
								[1] = 100
							}
						}
					},
					importSource = {
						type = "inAppCamera",
						importedOnDevice = "Guido's iPhone {7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a}",
						importTimestamp = "2017-01-31T13:02:07.037Z",
						contentType = "image/jpeg",
						sha256 = "21bff29721d16ba960354894411a719bdc7e3ad0fca8ce5fee8f7c191217c567",
						fileSize = 2156534,
						importedBy = "894ff3c9a01610ad2d3a6e26716a3f17",
						fileName = "IMG_0696.JPG",
						localAssetId = "B3C36110-B836-4AE9-AA24-3825A77BC7D2/L0/001",
						uniqueDeviceId = "7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a"
					},
					location = {
						longitude = 10.0199,
						latitude = 53.5654
					}
				},
				thumbnail2x = {
					md5 = "2adae65e00b341fbfc14a25ca5b8e20e",
					epoch = 1,
					revId = "e04244a4db134b61936b368156ed6a96",
					size = 23672
				},
				freemiumUploadEmbargoUntil = {
					_delete = true
				},
				localUrl = "B3C36110-B836-4AE9-AA24-3825A77BC7D2/L0/001",
				originalFilePath = "/var/mobile/Containers/Data/Application/1D6C651C-C1F3-4538-AF60-D4829245096B/Documents/9fbfd778277f498fb3c62691c3182f9a/Originals/2017/2017-01/2017-01-28/IMG_0696.JPG",
				preview = {
					md5 = "2e4201edfdd4906d29f0301e5065146b",
					epoch = 1,
					revId = "e04244a4db134b61936b368156ed6a96",
					size = 565184
				},
				original = {
					epoch = 1,
					size = 2156534,
					isInCacheFolder = false
				}
			},
			develop = {
				croppedWidth = 4032,
				croppedHeight = 3024,
				userOrientation = 1,
				_merge = "atomic",
				processingModel = "lightroom"
			},
			height = 3024,
			version = 1,
			captureDate = "2017-01-28T17:12:05.403+01:00",
			location = {
				longitude = 10.0199,
				latitude = 53.5654
			},
			importSource = {
				type = "inAppCamera",
				importedOnDevice = "Guido's iPhone {7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a}",
				importTimestamp = "2017-01-31T13:02:07.037Z",
				contentType = "image/jpeg",
				sha256 = "21bff29721d16ba960354894411a719bdc7e3ad0fca8ce5fee8f7c191217c567",
				fileSize = 2156534,
				importedBy = "894ff3c9a01610ad2d3a6e26716a3f17",
				fileName = "IMG_0696.JPG",
				localAssetId = "B3C36110-B836-4AE9-AA24-3825A77BC7D2/L0/001",
				uniqueDeviceId = "7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a"
			},
			xmp = {
				xmp = {
					CreatorTool = "10.2"
				},
				aux = {
					Lens = "iPhone 7 Plus back dual camera 3.99mm f/1.8"
				},
				tiff = {
					Model = "iPhone 7 Plus",
					Make = "Apple"
				},
				exif = {
					ApertureValue = {
						[1] = 1695994,
						[2] = 1000000
					},
					FNumber = {
						[1] = 18,
						[2] = 10
					},
					ExposureTime = {
						[1] = 1,
						[2] = 4
					},
					FocalLength = {
						[1] = 399,
						[2] = 100
					},
					ISOSpeedRatings = {
						[1] = 100
					}
				}
			},
			_ozCentralRevisionId = "e04244a4db134b61936b368156ed6a96"
		}
	}
end

--------------------------------------------------------------------------------

function OzDocStoreExamplesTest.outputSyncingISO()

	return {
		doc = {
			annotation = {
				_localOnly = {
					devSettingsLastSetAtRev = "e04244a4db134b61936b368156ed6a96",
					localUrl = "B3C36110-B836-4AE9-AA24-3825A77BC7D2/L0/001",
					original = {
						epoch = 1,
						isInCacheFolder = false,
						size = 2156534,
					},
					originalFilePath = "/var/mobile/Containers/Data/Application/1D6C651C-C1F3-4538-AF60-D4829245096B/Documents/9fbfd778277f498fb3c62691c3182f9a/Originals/2017/2017-01/2017-01-28/IMG_0696.JPG",
					preview = {
						epoch = 1,
						md5 = "2e4201edfdd4906d29f0301e5065146b",
						revId = "e04244a4db134b61936b368156ed6a96",
						size = 565184,
					},
					thumbnail2x = {
						epoch = 1,
						md5 = "2adae65e00b341fbfc14a25ca5b8e20e",
						revId = "e04244a4db134b61936b368156ed6a96",
						size = 23672,
					},
				},
			},
			deleted = 0,
			fullDocId = "dccadb096bdc4bcbb4990fee55c3e813",
			hasConflicts = 0,
			localDocId = 14,
			mostRecentRevSequence = 10017,
			winningRevSequence = 10017,
		},
		label = {
			localDocId = 14,
			name = "oz",
			revSeq = 10017,
		},
		revs = {
			{
				content = {
					captureDate = "2017-01-28T17:12:05.403+01:00",
					develop = {
						croppedHeight = 3024,
						croppedWidth = 4032,
						processingModel = "lightroom",
						userOrientation = 1,
					},
					importSource = {
						contentType = "image/jpeg",
						fileName = "IMG_0696.JPG",
						fileSize = 2156534,
						importTimestamp = "2017-01-31T13:02:07.037Z",
						importedBy = "894ff3c9a01610ad2d3a6e26716a3f17",
						importedOnDevice = "Guido's iPhone {7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a}",
						localAssetId = "B3C36110-B836-4AE9-AA24-3825A77BC7D2/L0/001",
						originalHeight = 3024,
						originalWidth = 4032,
						sha256 = "21bff29721d16ba960354894411a719bdc7e3ad0fca8ce5fee8f7c191217c567",
						uniqueDeviceId = "7bec805b2c272c7171ada544e650eb5d49a82ec08371f82a5869abe9e376097a",
					},
					location = {
						latitude = 53.5654,
						longitude = 10.0199,
					},
					subtype = "image",
					type = "asset",
					xmp = {
						aux = {
							Lens = "iPhone 7 Plus back dual camera 3.99mm f/1.8",
						},
						exif = {
							ApertureValue = {
								1695994,
								1000000,
							},
							ExposureTime = {
								1,
								4,
							},
							FNumber = {
								18,
								10,
							},
							FocalLength = {
								399,
								100,
							},
							ISOSpeedRatings = 100,
						},
						tiff = {
							Make = "Apple",
							Model = "iPhone 7 Plus",
						},
						xmp = {
							CreatorTool = "10.2",
						},
					},
				},
				localDocId = 14,
				revId = "e04244a4db134b61936b368156ed6a96",
				sequence = 10017,
			},
		},
	}

end

--------------------------------------------------------------------------------


function OzDocStoreExamplesTest.inputExternalDevelop()
	
	return {
		docId = "63b26d9ca1e10ec1a93ee6a3bc28f88f",
		docType = "asset",
		serverBaseValue = {
			changedAtTime = "2017-02-02T16:40:31.772",
			develop = {
				croppedWidth = 3264,
				croppedHeight = 2448,
				processingModel = "lightroom",
				userOrientation = 1,
				userUpdated = "2017-02-02T15:40:31.756Z",
				_merge = "atomic",
				xmpCameraRaw = [[ <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/06/19-23:40:37        ">
		 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
		  <rdf:Description rdf:about=""
			xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/"
		   crs:Version="9.8"
		   crs:ProcessVersion="6.7"
		   crs:WhiteBalance="As Shot"
		   crs:AutoWhiteVersion="134348800"
		   crs:Saturation="0"
		   crs:Sharpness="25"
		   crs:LuminanceSmoothing="0"
		   crs:ColorNoiseReduction="25"
		   crs:VignetteAmount="0"
		   crs:ShadowTint="0"
		   crs:RedHue="0"
		   crs:RedSaturation="0"
		   crs:GreenHue="0"
		   crs:GreenSaturation="0"
		   crs:BlueHue="0"
		   crs:BlueSaturation="0"
		   crs:Vibrance="0"
		   crs:HueAdjustmentRed="0"
		   crs:HueAdjustmentOrange="0"
		   crs:HueAdjustmentYellow="0"
		   crs:HueAdjustmentGreen="0"
		   crs:HueAdjustmentAqua="0"
		   crs:HueAdjustmentBlue="0"
		   crs:HueAdjustmentPurple="0"
		   crs:HueAdjustmentMagenta="0"
		   crs:SaturationAdjustmentRed="0"
		   crs:SaturationAdjustmentOrange="0"
		   crs:SaturationAdjustmentYellow="0"
		   crs:SaturationAdjustmentGreen="0"
		   crs:SaturationAdjustmentAqua="0"
		   crs:SaturationAdjustmentBlue="0"
		   crs:SaturationAdjustmentPurple="0"
		   crs:SaturationAdjustmentMagenta="0"
		   crs:LuminanceAdjustmentRed="0"
		   crs:LuminanceAdjustmentOrange="0"
		   crs:LuminanceAdjustmentYellow="0"
		   crs:LuminanceAdjustmentGreen="0"
		   crs:LuminanceAdjustmentAqua="0"
		   crs:LuminanceAdjustmentBlue="0"
		   crs:LuminanceAdjustmentPurple="0"
		   crs:LuminanceAdjustmentMagenta="0"
		   crs:SplitToningShadowHue="0"
		   crs:SplitToningShadowSaturation="0"
		   crs:SplitToningHighlightHue="0"
		   crs:SplitToningHighlightSaturation="0"
		   crs:SplitToningBalance="0"
		   crs:ParametricShadows="0"
		   crs:ParametricDarks="0"
		   crs:ParametricLights="0"
		   crs:ParametricHighlights="0"
		   crs:ParametricShadowSplit="25"
		   crs:ParametricMidtoneSplit="50"
		   crs:ParametricHighlightSplit="75"
		   crs:SharpenRadius="+1.0"
		   crs:SharpenDetail="25"
		   crs:SharpenEdgeMasking="0"
		   crs:PostCropVignetteAmount="0"
		   crs:GrainAmount="0"
		   crs:ColorNoiseReductionDetail="50"
		   crs:ColorNoiseReductionSmoothness="50"
		   crs:LensProfileEnable="0"
		   crs:LensManualDistortionAmount="0"
		   crs:PerspectiveVertical="0"
		   crs:PerspectiveHorizontal="0"
		   crs:PerspectiveRotate="0.0"
		   crs:PerspectiveScale="100"
		   crs:PerspectiveAspect="0"
		   crs:PerspectiveUpright="0"
		   crs:PerspectiveX="0.00"
		   crs:PerspectiveY="0.00"
		   crs:AutoLateralCA="0"
		   crs:Exposure2012="0.00"
		   crs:Contrast2012="0"
		   crs:Highlights2012="0"
		   crs:Shadows2012="0"
		   crs:Whites2012="0"
		   crs:Blacks2012="0"
		   crs:Clarity2012="0"
		   crs:DefringePurpleAmount="0"
		   crs:DefringePurpleHueLo="30"
		   crs:DefringePurpleHueHi="70"
		   crs:DefringeGreenAmount="0"
		   crs:DefringeGreenHueLo="40"
		   crs:DefringeGreenHueHi="60"
		   crs:Dehaze="0"
		   crs:ToneMapStrength="0"
		   crs:ConvertToGrayscale="False"
		   crs:ToneCurveName="Medium Contrast"
		   crs:ToneCurveName2012="Linear"
		   crs:CameraProfile="Embedded"
		   crs:CameraProfileDigest="3A46F61395F630E99C19324CF0447D29"
		   crs:LensProfileSetup="LensDefaults"
		   crs:UprightVersion="151388160"
		   crs:UprightCenterMode="0"
		   crs:UprightCenterNormX="0.5"
		   crs:UprightCenterNormY="0.5"
		   crs:UprightFocalMode="0"
		   crs:UprightFocalLength35mm="35"
		   crs:UprightPreview="False"
		   crs:UprightTransformCount="6"
		   crs:UprightFourSegmentsCount="0"
		   crs:HasSettings="True"
		   crs:CropTop="0"
		   crs:CropLeft="0"
		   crs:CropBottom="1"
		   crs:CropRight="1"
		   crs:CropAngle="0"
		   crs:CropConstrainToWarp="0"
		   crs:HasCrop="True">
		   <crs:ToneCurve>
			<rdf:Seq>
			 <rdf:li>0, 0</rdf:li>
			 <rdf:li>32, 22</rdf:li>
			 <rdf:li>64, 56</rdf:li>
			 <rdf:li>128, 128</rdf:li>
			 <rdf:li>192, 196</rdf:li>
			 <rdf:li>255, 255</rdf:li>
			</rdf:Seq>
		   </crs:ToneCurve>
		   <crs:ToneCurveRed>
			<rdf:Seq>
			 <rdf:li>0, 0</rdf:li>
			 <rdf:li>255, 255</rdf:li>
			</rdf:Seq>
		   </crs:ToneCurveRed>
		   <crs:ToneCurveGreen>
			<rdf:Seq>
			 <rdf:li>0, 0</rdf:li>
			 <rdf:li>255, 255</rdf:li>
			</rdf:Seq>
		   </crs:ToneCurveGreen>
		   <crs:ToneCurveBlue>
			<rdf:Seq>
			 <rdf:li>0, 0</rdf:li>
			 <rdf:li>255, 255</rdf:li>
			</rdf:Seq>
		   </crs:ToneCurveBlue>
		   <crs:ToneCurvePV2012>
			<rdf:Seq>
			 <rdf:li>0, 0</rdf:li>
			 <rdf:li>255, 255</rdf:li>
			</rdf:Seq>
		   </crs:ToneCurvePV2012>
		   <crs:ToneCurvePV2012Red>
			<rdf:Seq>
			 <rdf:li>0, 0</rdf:li>
			 <rdf:li>255, 255</rdf:li>
			</rdf:Seq>
		   </crs:ToneCurvePV2012Red>
		   <crs:ToneCurvePV2012Green>
			<rdf:Seq>
			 <rdf:li>0, 0</rdf:li>
			 <rdf:li>255, 255</rdf:li>
			</rdf:Seq>
		   </crs:ToneCurvePV2012Green>
		   <crs:ToneCurvePV2012Blue>
			<rdf:Seq>
			 <rdf:li>0, 0</rdf:li>
			 <rdf:li>255, 255</rdf:li>
			</rdf:Seq>
		   </crs:ToneCurvePV2012Blue>
		   <crs:CircularGradientBasedCorrections>
			<rdf:Seq>
			 <rdf:li>
			  <rdf:Description
			   crs:What="Correction"
			   crs:CorrectionAmount="1.000000"
			   crs:CorrectionActive="true"
			   crs:LocalExposure="0.000000"
			   crs:LocalSaturation="0.000000"
			   crs:LocalContrast="0.000000"
			   crs:LocalClarity="0.000000"
			   crs:LocalSharpness="0.000000"
			   crs:LocalBrightness="0.000000"
			   crs:LocalToningHue="0.000000"
			   crs:LocalToningSaturation="0.000000"
			   crs:LocalExposure2012="-0.991578"
			   crs:LocalContrast2012="0.000000"
			   crs:LocalHighlights2012="0.000000"
			   crs:LocalShadows2012="0.000000"
			   crs:LocalWhites2012="0.000000"
			   crs:LocalBlacks2012="0.000000"
			   crs:LocalClarity2012="0.000000"
			   crs:LocalDehaze="0.000000"
			   crs:LocalLuminanceNoise="0.000000"
			   crs:LocalMoire="0.000000"
			   crs:LocalDefringe="0.000000"
			   crs:LocalTemperature="0.000000"
			   crs:LocalTint="0.000000">
			  <crs:CorrectionMasks>
			   <rdf:Seq>
				<rdf:li
				 crs:What="Mask/CircularGradient"
				 crs:MaskValue="1.000000"
				 crs:Top="0.055944"
				 crs:Left="0.062768"
				 crs:Bottom="0.332501"
				 crs:Right="0.307899"
				 crs:Angle="0.000000"
				 crs:Midpoint="+50"
				 crs:Roundness="0"
				 crs:Feather="+50"
				 crs:Flipped="true"
				 crs:Version="+2"/>
			   </rdf:Seq>
			  </crs:CorrectionMasks>
			  </rdf:Description>
			 </rdf:li>
			 <rdf:li>
			  <rdf:Description
			   crs:What="Correction"
			   crs:CorrectionAmount="1.000000"
			   crs:CorrectionActive="true"
			   crs:LocalExposure="0.000000"
			   crs:LocalSaturation="0.000000"
			   crs:LocalContrast="0.000000"
			   crs:LocalClarity="0.000000"
			   crs:LocalSharpness="0.000000"
			   crs:LocalBrightness="0.000000"
			   crs:LocalToningHue="0.000000"
			   crs:LocalToningSaturation="0.000000"
			   crs:LocalExposure2012="-1.000000"
			   crs:LocalContrast2012="0.000000"
			   crs:LocalHighlights2012="0.000000"
			   crs:LocalShadows2012="0.000000"
			   crs:LocalWhites2012="0.000000"
			   crs:LocalBlacks2012="0.000000"
			   crs:LocalClarity2012="0.000000"
			   crs:LocalDehaze="0.000000"
			   crs:LocalLuminanceNoise="0.000000"
			   crs:LocalMoire="0.000000"
			   crs:LocalDefringe="0.000000"
			   crs:LocalTemperature="0.000000"
			   crs:LocalTint="0.000000">
			  <crs:CorrectionMasks>
			   <rdf:Seq>
				<rdf:li
				 crs:What="Mask/CircularGradient"
				 crs:MaskValue="1.000000"
				 crs:Top="0.000444"
				 crs:Left="0.333333"
				 crs:Bottom="0.356000"
				 crs:Right="0.600000"
				 crs:Angle="0.000000"
				 crs:Midpoint="+50"
				 crs:Roundness="0"
				 crs:Feather="+50"
				 crs:Flipped="true"
				 crs:Version="+2"/>
			   </rdf:Seq>
			  </crs:CorrectionMasks>
			  </rdf:Description>
			 </rdf:li>
			 <rdf:li>
			  <rdf:Description
			   crs:What="Correction"
			   crs:CorrectionAmount="1.000000"
			   crs:CorrectionActive="true"
			   crs:LocalExposure="0.000000"
			   crs:LocalSaturation="0.000000"
			   crs:LocalContrast="0.000000"
			   crs:LocalClarity="0.000000"
			   crs:LocalSharpness="0.000000"
			   crs:LocalBrightness="0.000000"
			   crs:LocalToningHue="0.000000"
			   crs:LocalToningSaturation="0.000000"
			   crs:LocalExposure2012="-0.995784"
			   crs:LocalContrast2012="0.000000"
			   crs:LocalHighlights2012="0.000000"
			   crs:LocalShadows2012="0.000000"
			   crs:LocalWhites2012="0.000000"
			   crs:LocalBlacks2012="0.000000"
			   crs:LocalClarity2012="0.000000"
			   crs:LocalDehaze="0.000000"
			   crs:LocalLuminanceNoise="0.000000"
			   crs:LocalMoire="0.000000"
			   crs:LocalDefringe="0.000000"
			   crs:LocalTemperature="0.000000"
			   crs:LocalTint="0.000000">
			  <crs:CorrectionMasks>
			   <rdf:Seq>
				<rdf:li
				 crs:What="Mask/CircularGradient"
				 crs:MaskValue="1.000000"
				 crs:Top="0.048832"
				 crs:Left="0.636883"
				 crs:Bottom="0.325390"
				 crs:Right="0.885784"
				 crs:Angle="0.000000"
				 crs:Midpoint="+50"
				 crs:Roundness="0"
				 crs:Feather="+50"
				 crs:Flipped="true"
				 crs:Version="+2"/>
			   </rdf:Seq>
			  </crs:CorrectionMasks>
			  </rdf:Description>
			 </rdf:li>
			 <rdf:li>
			  <rdf:Description
			   crs:What="Correction"
			   crs:CorrectionAmount="1.000000"
			   crs:CorrectionActive="true"
			   crs:LocalExposure="0.000000"
			   crs:LocalSaturation="0.000000"
			   crs:LocalContrast="0.000000"
			   crs:LocalClarity="0.000000"
			   crs:LocalSharpness="0.000000"
			   crs:LocalBrightness="0.000000"
			   crs:LocalToningHue="0.000000"
			   crs:LocalToningSaturation="0.000000"
			   crs:LocalExposure2012="-0.970703"
			   crs:LocalContrast2012="0.000000"
			   crs:LocalHighlights2012="0.000000"
			   crs:LocalShadows2012="0.000000"
			   crs:LocalWhites2012="0.000000"
			   crs:LocalBlacks2012="0.000000"
			   crs:LocalClarity2012="0.000000"
			   crs:LocalDehaze="0.000000"
			   crs:LocalLuminanceNoise="0.000000"
			   crs:LocalMoire="0.000000"
			   crs:LocalDefringe="0.000000"
			   crs:LocalTemperature="0.000000"
			   crs:LocalTint="0.000000">
			  <crs:CorrectionMasks>
			   <rdf:Seq>
				<rdf:li
				 crs:What="Mask/CircularGradient"
				 crs:MaskValue="1.000000"
				 crs:Top="0.521333"
				 crs:Left="0.016000"
				 crs:Bottom="0.876889"
				 crs:Right="0.282667"
				 crs:Angle="0.000000"
				 crs:Midpoint="+50"
				 crs:Roundness="0"
				 crs:Feather="+50"
				 crs:Flipped="true"
				 crs:Version="+2"/>
			   </rdf:Seq>
			  </crs:CorrectionMasks>
			  </rdf:Description>
			 </rdf:li>
			 <rdf:li>
			  <rdf:Description
			   crs:What="Correction"
			   crs:CorrectionAmount="1.000000"
			   crs:CorrectionActive="true"
			   crs:LocalExposure="0.000000"
			   crs:LocalSaturation="0.000000"
			   crs:LocalContrast="0.000000"
			   crs:LocalClarity="0.000000"
			   crs:LocalSharpness="0.000000"
			   crs:LocalBrightness="0.000000"
			   crs:LocalToningHue="0.000000"
			   crs:LocalToningSaturation="0.000000"
			   crs:LocalExposure2012="-1.000000"
			   crs:LocalContrast2012="0.000000"
			   crs:LocalHighlights2012="0.000000"
			   crs:LocalShadows2012="0.000000"
			   crs:LocalWhites2012="0.000000"
			   crs:LocalBlacks2012="0.000000"
			   crs:LocalClarity2012="0.000000"
			   crs:LocalDehaze="0.000000"
			   crs:LocalLuminanceNoise="0.000000"
			   crs:LocalMoire="0.000000"
			   crs:LocalDefringe="0.000000"
			   crs:LocalTemperature="0.000000"
			   crs:LocalTint="0.000000">
			  <crs:CorrectionMasks>
			   <rdf:Seq>
				<rdf:li
				 crs:What="Mask/CircularGradient"
				 crs:MaskValue="1.000000"
				 crs:Top="0.494750"
				 crs:Left="0.295415"
				 crs:Bottom="0.761250"
				 crs:Right="0.517918"
				 crs:Angle="0.000000"
				 crs:Midpoint="+50"
				 crs:Roundness="0"
				 crs:Feather="+50"
				 crs:Flipped="true"
				 crs:Version="+2"/>
			   </rdf:Seq>
			  </crs:CorrectionMasks>
			  </rdf:Description>
			 </rdf:li>
			 <rdf:li>
			  <rdf:Description
			   crs:What="Correction"
			   crs:CorrectionAmount="1.000000"
			   crs:CorrectionActive="true"
			   crs:LocalExposure="0.000000"
			   crs:LocalSaturation="0.000000"
			   crs:LocalContrast="0.000000"
			   crs:LocalClarity="0.000000"
			   crs:LocalSharpness="0.000000"
			   crs:LocalBrightness="0.000000"
			   crs:LocalToningHue="0.000000"
			   crs:LocalToningSaturation="0.000000"
			   crs:LocalExposure2012="-1.000000"
			   crs:LocalContrast2012="0.000000"
			   crs:LocalHighlights2012="0.000000"
			   crs:LocalShadows2012="0.000000"
			   crs:LocalWhites2012="0.000000"
			   crs:LocalBlacks2012="0.000000"
			   crs:LocalClarity2012="0.000000"
			   crs:LocalDehaze="0.000000"
			   crs:LocalLuminanceNoise="0.000000"
			   crs:LocalMoire="0.000000"
			   crs:LocalDefringe="0.000000"
			   crs:LocalTemperature="0.000000"
			   crs:LocalTint="0.000000">
			  <crs:CorrectionMasks>
			   <rdf:Seq>
				<rdf:li
				 crs:What="Mask/CircularGradient"
				 crs:MaskValue="1.000000"
				 crs:Top="0.555120"
				 crs:Left="0.602941"
				 crs:Bottom="0.907102"
				 crs:Right="0.919725"
				 crs:Angle="0.000000"
				 crs:Midpoint="+50"
				 crs:Roundness="0"
				 crs:Feather="+50"
				 crs:Flipped="true"
				 crs:Version="+2"/>
			   </rdf:Seq>
			  </crs:CorrectionMasks>
			  </rdf:Description>
			 </rdf:li>
			</rdf:Seq>
		   </crs:CircularGradientBasedCorrections>
		  </rdf:Description>
		 </rdf:RDF>
		</x:xmpmeta>
		]]
			},
			changedOnDevice = "Jens-Heiner's Mac Pro",
		},
		localOverlay = {
			_localOnly = {
				proxy = {
					size = 1196352,
					epoch = 1,
					filePath = "/Users/jrechtie/Library/Developer/CoreSimulator/Devices/8EF6DB26-2FF7-42D4-88E2-B51BD7F2090C/data/Containers/Data/Application/66C9CAEB-C7EE-4D7E-9A42-55D8BE0046A0/Documents/d1d889591633464cabd0c28e0adda8fd/Originals/2013/2013-09/CRW_1203_proxy.dng",
					ozUrl = "/v1.0/catalogs/d1d889591633464cabd0c28e0adda8fd/assets/63b26d9ca1e10ec1a93ee6a3bc28f88f/revisions/830a9b14e0de444b9c6fd4aeeb0b4d01/proxies/dc121b56f5ce46e0a2fa0a705619e0ba"
				},
				thumbnail2x = {
					referenceHeight = 2448,
					renditionId = "070afaf57d5e663a2710787545eeedff",
					md5 = "bdfd1e61dac318790f07756e67a6437e",
					referenceWidth = 3264,
					epoch = 1,
					revId = "pending",
					size = 14451
				},
				freemiumUploadEmbargoUntil = {
					_delete = true
				},
				preview = {
					md5 = "6ad320c10d1d98b25f4eb4ce9734417b",
					referenceHeight = 2448,
					renditionId = "9c46daf1de6b4c939b060d76df52470d",
					referenceWidth = 3264,
					epoch = 1,
					revId = "pending",
					size = 312037
				},
				devSettingsLastSetAtRev = "pending"
			},
    		_ozMetadataUploadStatus = "uploaded",
			_ozCentralRevisionId = "3dee4a9348c14a35b5246a73735ec4ff"
		}
	}
end

--------------------------------------------------------------------------------

if destination then

	function OzDocStoreExamplesTest.rxTestWriteInputAssets( )

		-- dump our manually generated input documents
		local docStorePath = getTestDataDocStorePath( 'input' )
		
		if WFFileUtils.exists( docStorePath ) then
			WFFileUtils.delete( docStorePath )
		end

		local docStore = WFOldOzDocStoreWriter( docStorePath )
		
		docStore:writeDocument( OzDocStoreExamplesTest.inputSynced() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputSyncedLocalChanges() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputUnsyncedConfirmationPending() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputConflict() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputSpaceFavorite() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputSpace() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputComment() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputUnsyncedImage() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputUnsyncedVideo() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputSyncedLocallyDeleted() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputAlbumAsset() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputUnsyncedComment() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputUnsyncedFavorite() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputTaskAsset() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputRatingInvalid() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputSyncingISO() )
		docStore:writeDocument( OzDocStoreExamplesTest.inputExternalDevelop() )

		-- this makes it possible to open the db from readonly files
		-- Thanks to @jrechtie
		docStore._db:exec('pragma journal_mode=delete')
		
		docStore:close()
		
		if destination then

			local dest = destination .. 'input.ozdocstore' 
			
			WFFileUtils.delete( dest )
			WFFileUtils.copy( docStorePath, dest )
			
		end
		
	end

	--------------------------------------------------------------------------------

	function OzDocStoreExamplesTest.rxTestWriteOutputAssets( )

		-- dump our manually generated output documents - you will still need to copy the file manually, though
		-- set a breakpoint to be able to copy the file location
		local docStorePath = getTestDataDocStorePath( 'output' )

		if WFFileUtils.exists( docStorePath ) then
			WFFileUtils.delete( docStorePath )
		end

		local docStore = WFRxDocStoreImp( docStorePath )
			
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputSynced() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputSyncedLocalChanges() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputUnsyncedConfirmationPending() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputConflict() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputSpaceFavorite() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputSpace() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputComment() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputUnsyncedImage() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputUnsyncedVideo() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputSyncedLocallyDeleted() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputAlbumAsset() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputUnsyncedComment() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputUnsyncedFavorite() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputRatingInvalid() )
		writeFullV2Document( docStore, OzDocStoreExamplesTest.outputSyncingISO() )
		
--		local OzDocStoreMigratorTest = require 'OzDocStoreMigratorTest'
--		local migrateDocument = OzDocStoreMigratorTest.migrateDocument
--		local output = migrateDocument( OzDocStoreExamplesTest.inputRatingInvalid() )
--		local WFTableArchiving = require "WFTableArchiving"
--		local s = WFTableArchiving.tableToString( output )
--		print(s)
--		
--		writeFullV2Document( docStore, output )

		-- see above
		docStore._db:exec('pragma journal_mode=delete')

		docStore:close()
		
		if destination then

			local dest = destination .. 'output.ozdocstore' 
			
			WFFileUtils.delete( dest )
			WFFileUtils.copy( docStorePath, dest )
			
		end

		
	end

end

return WFRxTestCase.wrapSuite( 'OzDocStoreExamplesTest', OzDocStoreExamplesTest )
