public function testNotifyActionWithCategories()
 {
     $history = new History();
     $this->client->getEmitter()->attach($history);
     $this->subscriber->addResponse(new Response(200, [], new Stream(fopen('data://text/plain,[]', 'r'))));
     $this->client->notifyAction('12345', 'LOGIN', null, ['foo', 'bar']);
     $contents = $history->getLastRequest()->getBody()->__toString();
     $request = json_decode($contents, true);
     $this->assertEquals(['userId' => '12345', 'actionCode' => 'LOGIN', 'categories' => ['foo', 'bar']], $request);
 }