         service.useMockServer = true
         let expection = expectation(description: "All Done")
         var order = 0
-        
+        let stream = TeslaStreaming(teslaSwift: service)
+
         service.authenticate(email: "user", password: "pass").then { (token) in
                 service.getVehicles()
 			}.done { (vehicles: [Vehicle]) in
-				service.openStream(vehicle: vehicles[0], dataReceived: {
+                stream.openStream(vehicle: vehicles[0], dataReceived: {
 					(event: TeslaStreamingEvent) in
 
                     switch event {

				service.getVehicleChargeState(vehicles[0])
			}.done { (response) -> Void in
				
				XCTAssertEqual(response.chargingState, .Complete)
				XCTAssertEqual(response.ratedBatteryRange?.miles, 200.0)
				XCTAssertEqual(response.batteryHeaterOn, true)
				

			}.done { (response) -> Void in
				
				XCTAssertEqual(response.userId, 1234)
				XCTAssertEqual(response.chargeState?.chargingState, .disconnected)
				XCTAssertEqual(response.vehicleConfig?.trimBadging, "85")
				
				expection.fulfill()
