     case TestCase2
     case TestCase3
     case TestCase4
+    case TestCase5
+    case TestCase6
+    case TestCase7
 }
 
 enum TestPattern: Int, TMABTestPattern {


        ex = self.expectationWithDescription(#function)
        tester.execute(.TestCase4)
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(5 * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
            ex.fulfill()
        }
        waitForExpectationsWithTimeout(1000) { _ in }
    }
}

        let tester = ABTester1()
        let tmpPattern = tester.pattern
        
        tester.addTest(.TestCase1) { pattern, _ in
            XCTAssertEqual(pattern, tmpPattern)
            ex.fulfill()
        }
        tester.addTest(.TestCase2, only: tmpPattern) { pattern, _ in
            XCTAssertEqual(pattern, tmpPattern)
            ex.fulfill()
        }
        
        tester.addTest(.TestCase3, only: [tmpPattern]) { pattern, _ in
            XCTAssertEqual(pattern, tmpPattern)
            ex.fulfill()
        }

        let patterns: [TestPattern] = [.A, .B, .C, .D]
        tester.addTest(.TestCase4, only: patterns.filter { $0 != tmpPattern }) { pattern, _ in
            XCTFail()
        }
        
        tester.addTest(.TestCase5) { pattern, parameters in
            XCTAssertEqual(pattern, tmpPattern)
            XCTAssertEqual(parameters?["foo"] as? Int, 1)
            XCTAssertEqual(parameters?["bar"] as? Int, 2)
            XCTAssertNil(parameters?["baz"])
            ex.fulfill()
        }
        
        tester.addTest(.TestCase6, only: [tmpPattern]) { pattern, parameters in
            XCTAssertEqual(pattern, tmpPattern)
            XCTAssertEqual(parameters?["foo"] as? Int, 1)
            XCTAssertEqual(parameters?["bar"] as? Int, 2)
            XCTAssertNil(parameters?["baz"])
            ex.fulfill()
        }
        
        tester.addTest(.TestCase7) { _, parameters in
            XCTAssertNil(parameters?["foo"])
            XCTAssertNil(parameters?["bar"])
            XCTAssertNil(parameters?["baz"])
            ex.fulfill()
        }
        
        tester.execute(.TestCase1)
