public function testPutNotExistingLocation()
 {
     $request = ['code' => 'test.code.4', 'frontend' => '1', 'backend' => '0', 'length' => '20', 'package' => ['id' => $this->package2->getId()], 'location' => ['id' => 5123]];
     $this->client->request('PUT', '/api/codes/' . $this->code1->getId(), $request);
     $this->assertEquals(500, $this->client->getResponse()->getStatusCode());
     $this->client->request('GET', '/api/codes/' . $this->code1->getId());
     $response = json_decode($this->client->getResponse()->getContent());
     $this->assertEquals($this->code1->getCode(), $response->code);
     $this->assertEquals($this->code1->getBackend(), $response->backend);
     $this->assertEquals($this->code1->getFrontend(), $response->frontend);
     $this->assertEquals($this->code1->getLength(), $response->length);
     $this->assertEquals($this->code1->getLocation()->getId(), $response->location->id);
 }