         
         FutureUtils.traverse(Array(1...10), context: Queue.main.context) { _ -> Future<Int> in
             XCTAssert(NSThread.isMainThread())
-            return future(1)
+            return Future.succeeded(1)
         }.onComplete { _ in
             e.fulfill()
         }

    
    func testFilterNoSuchElement() {
        let e = self.expectation()
        future(3).filter { $0 > 5}.onComplete { result in
            if let err = result.error {
                XCTAssert(err.code == ErrorCode.NoSuchElement.rawValue, "filter should yield no result")
            }

            }
        }
        
        FutureUtils.traverse([2,4,6,8,9,10], fn: evenFuture).onFailure { err in
            XCTAssertEqual(err.code, 9)
            e.fulfill()
        }
