         wait(for: [expectation], timeout: 10)
     }
     
-    // TODO Adjust this to expect an Observable when GraphQL is piped up correctly.
     func testSubscription() throws {
+        let disposeBag = DisposeBag()
+        
         let subscription = """
         subscription {
             subscribeUser {

        User(arguments.user)
    }
    
    func subscribeUser(context: HelloContext, arguments: NoArguments) -> Observable<User> {
        pubsub
    }
}

        }
        """
        
        let observable = try api.subscribe(
            request: subscription,
            context: api.context,
            on: group
        ).wait().observable!
        
        let expectation = XCTestExpectation()
        
        var currentResult = GraphQLResult()
        let _ = observable.subscribe { event in
            event.element!.whenSuccess { result in
                currentResult = result
                expectation.fulfill()
            }
        }.disposed(by: disposeBag)

        pubsub.onNext(User(id: "124", name: "Jerry"))

        wait(for: [expectation], timeout: 10)

        XCTAssertEqual(currentResult, GraphQLResult(data: [
            "subscribeUser": [
                "user": [
                    "name": "Jerry",
                    "id": "124"
                ]
            ]
        ]))
    }
}

