 	var sampleValues: TestableObservable<Int>!
     var sampleValuesWithError: TestableObservable<Int>!
 	let scheduler = TestScheduler(initialClock: 0)
+    let predicateFalse: RepeatPredicate = { false }
+    let predicateTrue: RepeatPredicate = { true }
 	
 	override func setUp() {
 		super.setUp()

            completed(300)]
		
		// provide simple predicate that always return false (so, sequence will not repeated)
		let res = scheduler.start(0, subscribed: 0, disposed: 1000) {
			self.sampleValues.asObservable().repeatWithBehavior(.immediate(maxCount: 3), scheduler: self.scheduler) { _ in
				false
			}
		}
		
		XCTAssertEqual(res.events, correctValues)
	}

    func testImmediateNotRepeatWithPredicateWithError() {
		let res = scheduler.start(0, subscribed: 0, disposed: 1000) {
            self.sampleValuesWithError.asObservable().repeatWithBehavior(.immediate(maxCount: 3), scheduler: self.scheduler) { _ in
                false
            }
        }
        XCTAssertEqual(res.events, erroredCorrectValues)
    }

			next(210, 1),
			next(220, 2),
			completed(300)]
		let res = scheduler.start(created: 0, subscribed: 0, disposed: 1000) {
			self.sampleValues
                .asObservable()
                .repeatWithBehavior(.delayed(maxCount: 3, time: 5.0), scheduler: self.scheduler, shouldRepeat: self.predicateFalse)
		}
		
		XCTAssertEqual(res.events, correctValues)
	}

    func testDelayedNotRepeatWithPredicateWithError() {
		let res = scheduler.start(created: 0, subscribed: 0, disposed: 1000) {
            self.sampleValuesWithError
                .asObservable()
                .repeatWithBehavior(.delayed(maxCount: 3, time: 5.0), scheduler: self.scheduler, shouldRepeat: self.predicateFalse)
        }
        XCTAssertEqual(res.events, erroredCorrectValues)
    }
