public function setScenarioState(ScenarioState $scenarioState)
    {
        $uri = $this->createBaseUri()->withPath(self::API_SCENARIOS_URL);
        $request = (new PsrRequest())
            ->withUri($uri)
            ->withMethod('put')
            ->withHeader('Content-Type', 'application/json')
            ->withBody(new StringStream(json_encode($scenarioState)));

        $response = $this->connection->send($request);
        if (200 !== $response->getStatusCode()) {
            $this->checkErrorResponse($response);
        }
    }