                           .offset(2)
                           .order(Thread.attributes.lastMessageReceivedTimestamp.ascending())
       lastResultSet: [
-        new Thread(accountId: 'a', id: '1', lastMessageReceivedTimestamp: 1)
-        new Thread(accountId: 'a', id: '2', lastMessageReceivedTimestamp: 2)
-        new Thread(accountId: 'a', id: '3', lastMessageReceivedTimestamp: 3)
-        new Thread(accountId: 'a', id: '4', lastMessageReceivedTimestamp: 4)
+        new Thread(accountId: 'a', clientId: '1', lastMessageReceivedTimestamp: 1)
+        new Thread(accountId: 'a', clientId: '2', lastMessageReceivedTimestamp: 2)
+        new Thread(accountId: 'a', clientId: '3', lastMessageReceivedTimestamp: 3)
+        new Thread(accountId: 'a', clientId: '4', lastMessageReceivedTimestamp: 4)
       ]
       tests: [{
         name: 'Item in set saved, sort order changed'
         change:
           objectClass: Thread.name
-          objects: [new Thread(accountId: 'a', id: '3', lastMessageReceivedTimestamp: 1.5)]
-          type: 'persist'
-        newResultSet:[
-          new Thread(accountId: 'a', id: '1', lastMessageReceivedTimestamp: 1)
-          new Thread(accountId: 'a', id: '3', lastMessageReceivedTimestamp: 1.5)
-          new Thread(accountId: 'a', id: '2', lastMessageReceivedTimestamp: 2)
-          new Thread(accountId: 'a', id: '4', lastMessageReceivedTimestamp: 4)
+          objects: [new Thread(accountId: 'a', clientId: '3', lastMessageReceivedTimestamp: 1.5)]
+          type: 'persist'
+        newResultSet:[
+          new Thread(accountId: 'a', clientId: '1', lastMessageReceivedTimestamp: 1)
+          new Thread(accountId: 'a', clientId: '3', lastMessageReceivedTimestamp: 1.5)
+          new Thread(accountId: 'a', clientId: '2', lastMessageReceivedTimestamp: 2)
+          new Thread(accountId: 'a', clientId: '4', lastMessageReceivedTimestamp: 4)
         ]
         refetchRequired: false
       }]

                          .limit(4)
                          .offset(2)
      lastResultSet: [
        new Thread(accountId: 'a', id: '4', lastMessageReceivedTimestamp: 4)
        new Thread(accountId: 'a', id: '3', lastMessageReceivedTimestamp: 3),
        new Thread(accountId: 'a', id: '2', lastMessageReceivedTimestamp: 2)
      ]
      tests: [{
        name: 'Item in set saved, no longer matches query clauses'
        change:
          objectClass: Thread.name
          objects: [new Thread(accountId: 'b', id: '4', lastMessageReceivedTimestamp: 4)]
          type: 'persist'
        newResultSet: [
          new Thread(accountId: 'a', id: '3', lastMessageReceivedTimestamp: 3),
          new Thread(accountId: 'a', id: '2', lastMessageReceivedTimestamp: 2),
        ]
        refetchRequired: false
      },{
        name: 'Item in set deleted'
        change:
          objectClass: Thread.name
          objects: [new Thread(accountId: 'a', id: '4')]
          type: 'unpersist'
        newResultSet: [
          new Thread(accountId: 'a', id: '3', lastMessageReceivedTimestamp: 3),
          new Thread(accountId: 'a', id: '2', lastMessageReceivedTimestamp: 2),
        ]
        refetchRequired: false
      }]

        name: 'Item saved which does not lie in the range after sorting'
        change:
          objectClass: Thread.name
          objects: [new Thread(accountId: 'b', clientId: '5', lastMessageReceivedTimestamp: -2)]
          type: 'persist'
        newResultSet: 'unchanged'
        refetchRequired: false
