public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionFieldIdNotFound()
{
$contentTypeDraft = $this->createDraftContentType();
$draftId = $contentTypeDraft->id;
/* BEGIN: Use Case */
// $draftId contains the ID of a content type draft
$contentTypeService = $this->repository->getContentTypeService();
$contentTypeDraft = $contentTypeService->loadContentTypeDraft($draftId);
$bodyField = $contentTypeDraft->getFieldDefinition('body');
$contentTypeService->removeFieldDefinition($contentTypeDraft, $bodyField);
$loadedDraft = $contentTypeService->loadContentTypeDraft($draftId);
$bodyUpdateStruct = $contentTypeService->newFieldDefinitionUpdateStruct();
// Throws exception, since field "body" is already deleted
$contentTypeService->updateFieldDefinition($loadedDraft, $bodyField, $bodyUpdateStruct);
/* END: Use Case */
}