     
     func testIsValid() {
         var dispatchTimer: DispatchTimer = DispatchTimer(interval: 0.25, closure: {
-            (timer: DispatchTimer?, invocations: Int) in
+            (timer: Timer, invocations: Int) in
         })
         
         XCTAssertTrue(dispatchTimer.isValid)

    
    func testIsNotRunning() {
        var dispatchTimer: DispatchTimer = DispatchTimer(interval: 0.25, closure: {
            (timer: DispatchTimer?, invocations: Int) in
        })
        
        XCTAssertFalse(dispatchTimer.isRunning)

        var flag: Bool = false
        
        var dispatchTimer: DispatchTimer = DispatchTimer(interval: 0.25, closure: {
            (timer: Timer, invocations: Int) in
            var dTimer = timer as DispatchTimer
            
            if invocations == 5 && !flag {
                flag = true
                timer.pause()
                
                XCTAssertTrue(dTimer.isValid)
                XCTAssertFalse(dTimer.isRunning)
                
                timer.start(true)
                
                XCTAssertTrue(dTimer.isValid)
                XCTAssertTrue(dTimer.isRunning)
            }
            
            if invocations == 10 && flag {
                timer.cancel()
                
                XCTAssertFalse(dTimer.isValid)
                XCTAssertFalse(dTimer.isRunning)
                
                dispatch_semaphore_signal(semaphore)
            }
