                 expectation.fulfill()
             })
         
-        dispatch_delay(0.25, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
-            promise1.fulfill(1)
-        }
+        promise1.fulfill(1)
         
         self.waitForExpectationsWithTimeout(1.0) { (error: NSError!) -> () in
         }

            expectation.fulfill()
        })
        
        dispatch_delay(0.25, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
            promise1.fulfill(1)
        }
        
        self.waitForExpectationsWithTimeout(1.0) { (error: NSError!) -> () in
        }

        
        let promiseA = promise.when { (value: Int) -> () in
            isFulfilled = true
            promiseFulfilled1.fulfill()
        }

        promise.reject(ExpectedRejectionError())
        
        let promiseB = promise.then(
            onFulfilled: { (value: Int) -> Result<Int> in
                isFulfilled = true
                promiseFulfilled2.fulfill()
                return .Success(value)
            },
            onRejected: { (reason: Error) -> Result<Int> in
                isFulfilled = false
                promiseFulfilled2.fulfill()
                return .Failure(reason)
            }
        )

        self.waitForExpectationsWithTimeout(1.0, handler: { (error: NSError!) -> Void in
            XCTAssertTrue(isFulfilled, "When fulfilled, a promise must not transition to any other state")
        })

    }
    
    // 2.1.2.2 - must have a value, which must not change
    
    func testFulfilledMustHaveAValueWhichMustNotChange() {
        let promiseFulfilled1 = self.expectationWithDescription("onFulfilled called once")
        let promiseFulfilled2 = self.expectationWithDescription("onFulfilled called twice")
        let promise = Promise<Int>()
        var fulfilledValue = 0
        
        promise.fulfill(1)
        
        let promiseA = promise.when { (value: Int) -> () in
            fulfilledValue = value
            promiseFulfilled1.fulfill()
        }
        
        promise.fulfill(2)

        let promiseB = promise.when { (value: Int) -> () in
            fulfilledValue = value
            promiseFulfilled2.fulfill()
        }
        
        self.waitForExpectationsWithTimeout(1.0, handler: { (error: NSError!) -> Void in
            XCTAssertEqual(fulfilledValue, 1, "When fulfilled, a promise must have a value, which must not change")
        })
    }
    
    // 2.1.3 - When rejected, a promise
    // 2.1.3.1 - must not transition to any other state
    
    func testRejectedMustNotTransitionToAnyOtherState() {
        let promiseRejected1 = self.expectationWithDescription("onRejected called once")
        let promiseRejected2 = self.expectationWithDescription("onRejected called twice")
        let promise = Promise<Int>()
        var isRejected = false
        
