     func testIndexPathOf() {
         let controller = ChatDataController()
 
+        controller.lastSeen = Date()
+
         var obj2 = ChatData(type: .message, timestamp: Date())
-        obj2.timestamp = Date().addingTimeInterval(1.0)
+        obj2.timestamp = Date().addingTimeInterval(-2.0)
 
         var obj1 = ChatData(type: .message, timestamp: Date())
-        obj1.timestamp = Date()
+        obj1.timestamp = Date().addingTimeInterval(-3.0)
 
         var obj3 = ChatData(type: .message, timestamp: Date())
-        obj3.timestamp = Date().addingTimeInterval(2.0)
+        obj3.timestamp = Date().addingTimeInterval(-1.0)
 
         controller.insert([obj2, obj1, obj3])
 

        XCTAssertNotNil(message1, "Message1 can't be nil")
        XCTAssertNotNil(message2, "Message2 can't be nil")

        var obj1 = ChatData(type: .message, timestamp: Date())
        obj1.message = message1

        var obj2 = ChatData(type: .message, timestamp: Date())
        obj2.message = message2

        let (indexPaths, _) = controller.insert([obj1, obj2])


        var obj2 = ChatData(type: .message, timestamp: Date())
        obj2.message = message
        obj2.timestamp = Date().addingTimeInterval(-2.0)

        var obj1 = ChatData(type: .header, timestamp: Date())
        obj1.timestamp = Date().addingTimeInterval(-3.0)

        var obj3 = ChatData(type: .message, timestamp: Date())
        obj3.timestamp = Date().addingTimeInterval(-1.0)

        controller.insert([obj2, obj1, obj3])

