public function testRemoveFieldDefinitionThrowsInvalidArgumentException()
{
$draftId = $this->createDraftContentType()->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);
// Throws an exception because "body" has already been removed
$contentTypeService->removeFieldDefinition($contentTypeDraft, $bodyField);
/* END: Use Case */
}