         int.on(.error(TestError.test))
         int.on(.next(1))
 
-        exp.fulfill()
-
-        waitForExpectations(timeout: 1) { _ in
-            XCTAssert(received.count == 1)
-            XCTAssert(received.first == "ERROR")
-        }
+        XCTAssertEqual(received.count, 1)
+        XCTAssertEqual(received.first, "ERROR")
     }
 }
 

        int.on(.next(3))
        int.on(.done)

        waitForExpectations(timeout: 1) { _ in
            XCTAssert(received.count == 4)
            XCTAssert(received[0] == "The number: 1")
            XCTAssert(received[1] == "The number: 2")
            XCTAssert(received[2] == "The digit: 2")
            XCTAssert(received[3] == "The digit: 3")
        }
    }

    func testCombineLatestOptional() {
        let exp = expectation(description: "combineLatest")

        var received: [String] = []

        let string = Observable<String?>()

        subject?.on(.next("2"))
        subject?.on(.error(TestError.test))
        subject?.on(.next("3"))
        XCTAssertEqual(strings?.count, 2)
        XCTAssertEqual(strings?[0], "1")
        XCTAssertEqual(strings?[1], "2")
        XCTAssertEqual(error as? TestError, .test)
    }

    func testMultipleSubscribers() {
