### Question:
ProductDraftBuilder extends ProductDraftBuilderBase<ProductDraftBuilder> { public static ProductDraftBuilder of(final ResourceIdentifiable<ProductType> productType, final LocalizedString name, final LocalizedString slug, final List<ProductVariantDraft> allVariants) { final ProductVariantDraft masterVariant = allVariants.stream().findFirst().orElse(null); final List<ProductVariantDraft> variants = allVariants.stream().skip(1).collect(Collectors.toList()); return of(productType, name, slug, masterVariant) .plusVariants(variants); } ProductDraftBuilder(final Set<ResourceIdentifier<Category>> categories,
                        @Nullable final CategoryOrderHints categoryOrderHints,
                        @Nullable final LocalizedString description,
                        @Nullable final String key,
                        @Nullable final ProductVariantDraft masterVariant,
                        @Nullable final LocalizedString metaDescription,
                        @Nullable final LocalizedString metaKeywords,
                        @Nullable final LocalizedString metaTitle,
                        final LocalizedString name,
                        final ResourceIdentifier<ProductType> productType,
                        @Nullable final Boolean publish,
                        final SearchKeywords searchKeywords,
                        final LocalizedString slug,
                        @Nullable final ResourceIdentifier<State> state,
                        @Nullable final ResourceIdentifier<TaxCategory> taxCategory,
                        final List<ProductVariantDraft> variants); static ProductDraftBuilder of(final ResourceIdentifiable<ProductType> productType,
                                         final LocalizedString name,
                                         final LocalizedString slug,
                                         final List<ProductVariantDraft> allVariants); static ProductDraftBuilder of(final ResourceIdentifiable<ProductType> productType,
                                         final LocalizedString name,
                                         final LocalizedString slug,
                                         @Nullable final ProductVariantDraft masterVariant); ProductDraftBuilder variants(final List<ProductVariantDraft> variants); ProductDraftBuilder plusVariants(final ProductVariantDraft variantToAdd); ProductDraftBuilder plusVariants(final List<ProductVariantDraft> variantsToAdd); ProductDraftBuilder categories(final List<Reference<Category>> categories); ProductDraftBuilder categoriesAsObjectList(final List<Category> categories); ProductDraftBuilder state(@Nullable final Referenceable<State> state); ProductDraftBuilder state(@Nullable Reference<State> state); ProductDraftBuilder taxCategory(@Nullable Referenceable<TaxCategory> taxCategory); ProductDraftBuilder taxCategory(@Nullable Reference<TaxCategory> taxCategory);  }### Answer:
@Test public void createsWithAllVariants() { final List<ProductVariantDraft> allVariants = IntStream.range(0, 9) .mapToObj(i -> ProductVariantDraftBuilder.of().sku("sku-" + i).build()) .collect(toList()); final Reference<ProductType> productType = ProductType.referenceOfId("product-type-id"); final ProductDraft productDraft = ProductDraftBuilder.of(productType, randomSlug(), randomSlug(), allVariants).build(); assertThat(productDraft.getMasterVariant().getSku()).isEqualTo("sku-0"); assertThat(productDraft.getVariants().get(3).getSku()).isEqualTo("sku-4"); }