### Question:
CategoryDraftBuilder extends CategoryDraftBuilderBase<CategoryDraftBuilder> { @Deprecated public CategoryDraftBuilder parent(@Nullable final Referenceable<Category> parent) { this.parent = Optional.ofNullable(parent).map(Referenceable::toReference).orElse(null); return this; } protected  CategoryDraftBuilder(@Nullable final List<AssetDraft> assets,
                                   @Nullable final CustomFieldsDraft custom, @Nullable final LocalizedString description,
                                   @Nullable final String externalId, @Nullable final String key,
                                   @Nullable final LocalizedString metaDescription, @Nullable final LocalizedString metaKeywords,
                                   @Nullable final LocalizedString metaTitle, final LocalizedString name,
                                   @Nullable final String orderHint, @Nullable final ResourceIdentifier<Category> parent,
                                   final LocalizedString slug); @Deprecated CategoryDraftBuilder parent(@Nullable final Referenceable<Category> parent);  }### Answer:
@Test public void copyFromCategory() { final Category parent = CategoryBuilder.of(randomString(), LocalizedString.ofEnglish(randomString()), LocalizedString.ofEnglish(randomString())) .build(); final Category category = CategoryBuilder.of(randomString(), LocalizedString.ofEnglish(randomString()), LocalizedString.ofEnglish(randomString())) .externalId(randomString()) .key(randomKey()) .parent(parent) .assets(null) .build(); final CategoryDraft categoryDraft = CategoryDraftBuilder.of(category).build(); assertThat(category.getName()).isEqualTo(categoryDraft.getName()); assertThat(category.getSlug()).isEqualTo(categoryDraft.getSlug()); assertThat(category.getExternalId()).isEqualTo(categoryDraft.getExternalId()); assertThat(category.getParent()).isEqualTo(categoryDraft.getParent()); assertThat(category.getAssets()).isEqualTo(categoryDraft.getAssets()); assertThat(category.getKey()).isEqualTo(categoryDraft.getKey()); }