public function testPatchOfficers()
 {
     // create user info and convert it to json
     $user = factory(User::class)->create();
     $officerPosition = factory(OfficerPosition::class)->create();
     $officerObject = factory(Officer::class)->create(['user_id' => $user->id, 'officer_position_id' => $officerPosition->id]);
     $officerObject->started = '2011-10-10';
     $officerData = json_encode(['data' => ['type' => 'officers', 'attributes' => $officerObject->toArray(), 'relationships' => ['position' => ['data' => ['type' => 'officer-positions', 'id' => $officerPosition->id]], 'user' => ['data' => ['type' => 'users', 'id' => $user->id]]]]]);
     $response = $this->callPatch(self::API_URL . $officerObject->id, $officerData);
     $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
     $this->assertNotNull($officer = json_decode($response->getContent())->data);
     $this->assertNotEmpty($officer->id);
     // test to make sure the user was created
     $updatedOfficer = Officer::findOrFail($officer->id);
     $this->assertEquals('2011-10-10', $updatedOfficer->started);
 }
 public function destroy(Officer $officers)
 {
     $officers->delete();
     return response()->json('', Response::HTTP_NO_CONTENT);
 }