         wait(for: [ex], timeout: 10)
     }
 
+    #if swift(>=4)
+    func testMapValuesByKeyPath() {
+        let ex = expectation(description: "")
+
+        Guarantee.value([Person(name: "Max"), Person(name: "Roman"), Person(name: "John")])
+            .mapValues(\.name)
+            .done { values in
+                XCTAssertEqual(["Max", "Roman", "John"], values)
+                ex.fulfill()
+            }
+
+        wait(for: [ex], timeout: 10)
+    }
+    #endif
+
     func testFlatMapValues() {
         let ex = expectation(description: "")
 


        wait(for: [ex], timeout: 10)
    }

    func testSorted() {


        wait(for: [ex], timeout: 10)
    }

    #if swift(>=4)
    func testCompactMapValuesByKeyPath() {
        let ex = expectation(description: "")

        Guarantee.value([Person(name: "Max"), Person(name: "Roman", age: 26), Person(name: "John", age: 23)])
            .compactMapValues(\.age)
            .done { values in
                XCTAssertEqual([26, 23], values)
                ex.fulfill()
            }

        wait(for: [ex], timeout: 10)
    }
    #endif

    func testThenMap() {

        let ex = expectation(description: "")
