     return createFileOperation() if files.length is 0
     root = if Math.random() > 0.5 then folders[0] else folders[1]
     src = faker.random.arrayElement files
-    dst = faker.company.bs()
+    parent = path.dirname src
+    dst = path.join parent, faker.name.firstName()
+    files.push dst
     op =
         move: 'file'
+        src: path.join root, src
+        dst: path.join root, dst
+    return op
+
+# Create a random copy file operation
+copyFileOperation = ->
+    return createFileOperation() if files.length is 0
+    root = if Math.random() > 0.5 then folders[0] else folders[1]
+    src = faker.random.arrayElement files
+    parent = path.dirname src
+    dst = path.join parent, faker.name.firstName()
+    files.push dst
+    op =
+        copy: 'file'
         src: path.join root, src
         dst: path.join root, dst
     return op

    pid.kill()


# List of directories and files that can be used when generating operations
dirs = ['.']
files = []




# In this test, we launch 2 cozy-desktops in two directories, and make them
# synchronize via a central cozy instance. During ~10 seconds, we do some
# operations in both directory (like creating files, or moving folders).
# After that, we wait 20 seconds and we compare the 2 directories. They should
# be identical: same files and folders.
describe 'Property based testing', ->
    @slow 1000
