         
         self.waitForExpectationsWithTimeout(2, handler: nil)
     }
-
+}
+
+/**
+ * This extension contains all tests related to FutureUtils
+ */
+extension BrightFuturesTests {
     func testUtilsTraverseSuccess() {
         let n = 10
         

 */
extension BrightFuturesTests {

    func testMapSuccess() {
        let e = self.expectationWithDescription("")
        
        future { _ in
            fibonacci(10)
        }.map { value, _ -> String? in
            if value > 5 {
                return "large"
            }
            return "small"
        }.map { sizeString, _ -> Bool? in
            return sizeString == "large"
        }.onSuccess { numberIsLarge in
            XCTAssert(numberIsLarge)
            e.fulfill()
        }
        
        self.waitForExpectationsWithTimeout(2, handler: nil)
    }
    
    func testMapFailure() {
        
        let e = self.expectationWithDescription("")
        
        future { (inout error:NSError?) -> Int? in
            error = NSError(domain: "Tests", code: 123, userInfo: nil)
            return nil
        }.map { number, _ in
            XCTAssert(false, "map should not be evaluated because of failure above")
        }.map { number, _ in
            XCTAssert(false, "this map should also not be evaluated because of failure above")
        }.onFailure { error in
            XCTAssert(error.domain == "Tests")
            e.fulfill()
        }
        
        self.waitForExpectationsWithTimeout(2, handler: nil)
    }
    
    func testAndThen() {
        
        var answer = 10

        
        self.waitForExpectationsWithTimeout(10, handler: nil)
    }
}

/**
 * This extension contains utility methods used in the tests above
 */
extension BrightFuturesTests {
    func expectation() -> XCTestExpectation {
        return self.expectationWithDescription("")
    }
    
    func failingFuture<U>() -> Future<U> {
        return future { error in
