Search in sources :

Example 1 with TaxCategorySync

use of com.commercetools.sync.taxcategories.TaxCategorySync in project commercetools-sync-java by commercetools.

the class TaxCategorySyncIT method sync_WithUpdatedTaxCategory_ShouldUpdateTaxCategory.

@Test
void sync_WithUpdatedTaxCategory_ShouldUpdateTaxCategory() {
    // preparation
    final SubRate subRate1 = SubRate.of("subRate-1", 0.07);
    final SubRate subRate2 = SubRate.of("subRate-2", 0.09);
    final TaxRateDraft taxRateDraft = TaxRateDraftBuilder.of("%16 VAT", 0.16, true, CountryCode.DE).subRates(asList(subRate1, subRate2)).build();
    final TaxCategoryDraft taxCategoryDraft = TaxCategoryDraftBuilder.of("tax-category-name-updated", singletonList(taxRateDraft), "tax-category-description-updated").key("tax-category-key").build();
    final TaxCategorySyncOptions taxCategorySyncOptions = TaxCategorySyncOptionsBuilder.of(CTP_TARGET_CLIENT).build();
    final TaxCategorySync taxCategorySync = new TaxCategorySync(taxCategorySyncOptions);
    // test
    final TaxCategorySyncStatistics taxCategorySyncStatistics = taxCategorySync.sync(singletonList(taxCategoryDraft)).toCompletableFuture().join();
    // assertion
    assertThat(taxCategorySyncStatistics).hasValues(1, 0, 1, 0);
    final Optional<TaxCategory> oldTaxCategoryAfter = getTaxCategoryByKey(CTP_TARGET_CLIENT, "tax-category-key");
    Assertions.assertThat(oldTaxCategoryAfter).hasValueSatisfying(taxCategory -> {
        Assertions.assertThat(taxCategory.getName()).isEqualTo("tax-category-name-updated");
        Assertions.assertThat(taxCategory.getDescription()).isEqualTo("tax-category-description-updated");
        final TaxRate taxRate = taxCategory.getTaxRates().get(0);
        Assertions.assertThat(taxRate.getName()).isEqualTo("%16 VAT");
        Assertions.assertThat(taxRate.getAmount()).isEqualTo(0.16);
        Assertions.assertThat(taxRate.getCountry()).isEqualTo(CountryCode.DE);
        Assertions.assertThat(taxRate.isIncludedInPrice()).isEqualTo(true);
        Assertions.assertThat(taxRate.getSubRates()).isEqualTo(asList(subRate1, subRate2));
    });
}
Also used : TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxCategorySyncStatistics(com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) SubRate(io.sphere.sdk.taxcategories.SubRate) TaxRate(io.sphere.sdk.taxcategories.TaxRate) TaxRateDraft(io.sphere.sdk.taxcategories.TaxRateDraft) Test(org.junit.jupiter.api.Test)

Example 2 with TaxCategorySync

use of com.commercetools.sync.taxcategories.TaxCategorySync in project commercetools-sync-java by commercetools.

the class TaxCategorySyncIT method sync_withChangedTaxCategoryButConcurrentModificationException_shouldRetryAndUpdateTaxCategory.

@Test
void sync_withChangedTaxCategoryButConcurrentModificationException_shouldRetryAndUpdateTaxCategory() {
    // preparation
    final SphereClient spyClient = buildClientWithConcurrentModificationUpdate();
    List<String> errorCallBackMessages = new ArrayList<>();
    List<String> warningCallBackMessages = new ArrayList<>();
    List<Throwable> errorCallBackExceptions = new ArrayList<>();
    final TaxCategorySyncOptions spyOptions = TaxCategorySyncOptionsBuilder.of(spyClient).errorCallback((exception, oldResource, newResource, updateActions) -> {
        errorCallBackMessages.add(exception.getMessage());
        errorCallBackExceptions.add(exception.getCause());
    }).build();
    final TaxCategorySync taxCategorySync = new TaxCategorySync(spyOptions);
    final TaxCategoryDraft taxCategoryDraft = TaxCategoryDraftBuilder.of("tax-category-name-updated", null, "tax-category-description-updated").key("tax-category-key").build();
    // test
    final TaxCategorySyncStatistics taxCategorySyncStatistics = taxCategorySync.sync(singletonList(taxCategoryDraft)).toCompletableFuture().join();
    assertThat(taxCategorySyncStatistics).hasValues(1, 0, 1, 0);
    Assertions.assertThat(errorCallBackExceptions).isEmpty();
    Assertions.assertThat(errorCallBackMessages).isEmpty();
    Assertions.assertThat(warningCallBackMessages).isEmpty();
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BeforeEach(org.junit.jupiter.api.BeforeEach) TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) TaxCategorySyncStatistics(com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) AssertionsForStatistics.assertThat(com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) CompletableFuture(java.util.concurrent.CompletableFuture) Mockito.spy(org.mockito.Mockito.spy) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) TaxCategoryITUtils.getTaxCategoryByKey(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.getTaxCategoryByKey) AfterAll(org.junit.jupiter.api.AfterAll) TaxRateDraft(io.sphere.sdk.taxcategories.TaxRateDraft) SubRate(io.sphere.sdk.taxcategories.SubRate) Arrays.asList(java.util.Arrays.asList) SphereClient(io.sphere.sdk.client.SphereClient) Assertions(org.assertj.core.api.Assertions) Nonnull(javax.annotation.Nonnull) TaxCategoryDraftBuilder(io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder) CountryCode(com.neovisionaries.i18n.CountryCode) BadGatewayException(io.sphere.sdk.client.BadGatewayException) TaxRate(io.sphere.sdk.taxcategories.TaxRate) TaxCategorySyncOptionsBuilder(com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder) TaxCategoryUpdateCommand(io.sphere.sdk.taxcategories.commands.TaxCategoryUpdateCommand) CompletionStageUtil.executeBlocking(com.commercetools.tests.utils.CompletionStageUtil.executeBlocking) Mockito.when(org.mockito.Mockito.when) String.format(java.lang.String.format) Test(org.junit.jupiter.api.Test) List(java.util.List) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxRateDraftBuilder(io.sphere.sdk.taxcategories.TaxRateDraftBuilder) PagedQueryResult(io.sphere.sdk.queries.PagedQueryResult) ConcurrentModificationException(io.sphere.sdk.client.ConcurrentModificationException) TaxCategoryCreateCommand(io.sphere.sdk.taxcategories.commands.TaxCategoryCreateCommand) Optional(java.util.Optional) TaxCategoryITUtils.deleteTaxCategories(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.deleteTaxCategories) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxCategorySyncStatistics(com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics) SphereClient(io.sphere.sdk.client.SphereClient) ArrayList(java.util.ArrayList) Test(org.junit.jupiter.api.Test)

Example 3 with TaxCategorySync

use of com.commercetools.sync.taxcategories.TaxCategorySync in project commercetools-sync-java by commercetools.

the class TaxCategorySyncIT method sync_WithConcurrentModificationExceptionAndFailedFetch_ShouldFailToReFetchAndUpdate.

@Test
void sync_WithConcurrentModificationExceptionAndFailedFetch_ShouldFailToReFetchAndUpdate() {
    // preparation
    final SphereClient spyClient = buildClientWithConcurrentModificationUpdateAndFailedFetchOnRetry();
    List<String> errorCallBackMessages = new ArrayList<>();
    List<Throwable> errorCallBackExceptions = new ArrayList<>();
    final TaxCategorySyncOptions spyOptions = TaxCategorySyncOptionsBuilder.of(spyClient).errorCallback((exception, oldResource, newResource, updateActions) -> {
        errorCallBackMessages.add(exception.getMessage());
        errorCallBackExceptions.add(exception.getCause());
    }).build();
    final TaxCategorySync taxCategorySync = new TaxCategorySync(spyOptions);
    final TaxCategoryDraft taxCategoryDraft = TaxCategoryDraftBuilder.of("tax-category-name-updated", null, "tax-category-description-updated").key("tax-category-key").build();
    // test
    final TaxCategorySyncStatistics taxCategorySyncStatistics = taxCategorySync.sync(singletonList(taxCategoryDraft)).toCompletableFuture().join();
    // Test and assertion
    assertThat(taxCategorySyncStatistics).hasValues(1, 0, 0, 1);
    Assertions.assertThat(errorCallBackMessages).hasSize(1);
    Assertions.assertThat(errorCallBackExceptions).hasSize(1);
    Assertions.assertThat(errorCallBackExceptions.get(0).getCause()).isExactlyInstanceOf(BadGatewayException.class);
    Assertions.assertThat(errorCallBackMessages.get(0)).contains(format("Failed to update tax category with key: '%s'. Reason: Failed to fetch from CTP while retrying " + "after concurrency modification.", taxCategoryDraft.getKey()));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BeforeEach(org.junit.jupiter.api.BeforeEach) TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) TaxCategorySyncStatistics(com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) AssertionsForStatistics.assertThat(com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) CompletableFuture(java.util.concurrent.CompletableFuture) Mockito.spy(org.mockito.Mockito.spy) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) TaxCategoryITUtils.getTaxCategoryByKey(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.getTaxCategoryByKey) AfterAll(org.junit.jupiter.api.AfterAll) TaxRateDraft(io.sphere.sdk.taxcategories.TaxRateDraft) SubRate(io.sphere.sdk.taxcategories.SubRate) Arrays.asList(java.util.Arrays.asList) SphereClient(io.sphere.sdk.client.SphereClient) Assertions(org.assertj.core.api.Assertions) Nonnull(javax.annotation.Nonnull) TaxCategoryDraftBuilder(io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder) CountryCode(com.neovisionaries.i18n.CountryCode) BadGatewayException(io.sphere.sdk.client.BadGatewayException) TaxRate(io.sphere.sdk.taxcategories.TaxRate) TaxCategorySyncOptionsBuilder(com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder) TaxCategoryUpdateCommand(io.sphere.sdk.taxcategories.commands.TaxCategoryUpdateCommand) CompletionStageUtil.executeBlocking(com.commercetools.tests.utils.CompletionStageUtil.executeBlocking) Mockito.when(org.mockito.Mockito.when) String.format(java.lang.String.format) Test(org.junit.jupiter.api.Test) List(java.util.List) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxRateDraftBuilder(io.sphere.sdk.taxcategories.TaxRateDraftBuilder) PagedQueryResult(io.sphere.sdk.queries.PagedQueryResult) ConcurrentModificationException(io.sphere.sdk.client.ConcurrentModificationException) TaxCategoryCreateCommand(io.sphere.sdk.taxcategories.commands.TaxCategoryCreateCommand) Optional(java.util.Optional) TaxCategoryITUtils.deleteTaxCategories(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.deleteTaxCategories) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxCategorySyncStatistics(com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics) SphereClient(io.sphere.sdk.client.SphereClient) ArrayList(java.util.ArrayList) Test(org.junit.jupiter.api.Test)

Example 4 with TaxCategorySync

use of com.commercetools.sync.taxcategories.TaxCategorySync in project commercetools-sync-java by commercetools.

the class TaxCategorySyncIT method sync_WithConcurrentModificationExceptionAndUnexpectedDelete_ShouldFailToReFetchAndUpdate.

@Test
void sync_WithConcurrentModificationExceptionAndUnexpectedDelete_ShouldFailToReFetchAndUpdate() {
    // preparation
    final SphereClient spyClient = buildClientWithConcurrentModificationUpdateAndNotFoundFetchOnRetry();
    List<String> errorCallBackMessages = new ArrayList<>();
    List<Throwable> errorCallBackExceptions = new ArrayList<>();
    final TaxCategorySyncOptions spyOptions = TaxCategorySyncOptionsBuilder.of(spyClient).errorCallback((exception, oldResource, newResource, updateActions) -> {
        errorCallBackMessages.add(exception.getMessage());
        errorCallBackExceptions.add(exception.getCause());
    }).build();
    final TaxCategorySync taxCategorySync = new TaxCategorySync(spyOptions);
    final TaxCategoryDraft taxCategoryDraft = TaxCategoryDraftBuilder.of("tax-category-name-updated", null, "tax-category-description-updated").key("tax-category-key").build();
    final TaxCategorySyncStatistics taxCategorySyncStatistics = taxCategorySync.sync(singletonList(taxCategoryDraft)).toCompletableFuture().join();
    // Test and assertion
    assertThat(taxCategorySyncStatistics).hasValues(1, 0, 0, 1);
    Assertions.assertThat(errorCallBackMessages).hasSize(1);
    Assertions.assertThat(errorCallBackExceptions).hasSize(1);
    Assertions.assertThat(errorCallBackMessages.get(0)).contains(format("Failed to update tax category with key: '%s'. Reason: Not found when attempting to fetch while" + " retrying after concurrency modification.", taxCategoryDraft.getKey()));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BeforeEach(org.junit.jupiter.api.BeforeEach) TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) TaxCategorySyncStatistics(com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) AssertionsForStatistics.assertThat(com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) CompletableFuture(java.util.concurrent.CompletableFuture) Mockito.spy(org.mockito.Mockito.spy) CompletableFutureUtils(io.sphere.sdk.utils.CompletableFutureUtils) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) TaxCategoryITUtils.getTaxCategoryByKey(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.getTaxCategoryByKey) AfterAll(org.junit.jupiter.api.AfterAll) TaxRateDraft(io.sphere.sdk.taxcategories.TaxRateDraft) SubRate(io.sphere.sdk.taxcategories.SubRate) Arrays.asList(java.util.Arrays.asList) SphereClient(io.sphere.sdk.client.SphereClient) Assertions(org.assertj.core.api.Assertions) Nonnull(javax.annotation.Nonnull) TaxCategoryDraftBuilder(io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder) CountryCode(com.neovisionaries.i18n.CountryCode) BadGatewayException(io.sphere.sdk.client.BadGatewayException) TaxRate(io.sphere.sdk.taxcategories.TaxRate) TaxCategorySyncOptionsBuilder(com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder) TaxCategoryUpdateCommand(io.sphere.sdk.taxcategories.commands.TaxCategoryUpdateCommand) CompletionStageUtil.executeBlocking(com.commercetools.tests.utils.CompletionStageUtil.executeBlocking) Mockito.when(org.mockito.Mockito.when) String.format(java.lang.String.format) Test(org.junit.jupiter.api.Test) List(java.util.List) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxRateDraftBuilder(io.sphere.sdk.taxcategories.TaxRateDraftBuilder) PagedQueryResult(io.sphere.sdk.queries.PagedQueryResult) ConcurrentModificationException(io.sphere.sdk.client.ConcurrentModificationException) TaxCategoryCreateCommand(io.sphere.sdk.taxcategories.commands.TaxCategoryCreateCommand) Optional(java.util.Optional) TaxCategoryITUtils.deleteTaxCategories(com.commercetools.sync.integration.commons.utils.TaxCategoryITUtils.deleteTaxCategories) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxCategorySyncStatistics(com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics) SphereClient(io.sphere.sdk.client.SphereClient) ArrayList(java.util.ArrayList) Test(org.junit.jupiter.api.Test)

Example 5 with TaxCategorySync

use of com.commercetools.sync.taxcategories.TaxCategorySync in project commercetools-project-sync by commercetools.

the class TaxCategorySyncer method of.

@Nonnull
public static TaxCategorySyncer of(@Nonnull final SphereClient sourceClient, @Nonnull final SphereClient targetClient, @Nonnull final Clock clock) {
    final QuadConsumer<SyncException, Optional<TaxCategoryDraft>, Optional<TaxCategory>, List<UpdateAction<TaxCategory>>> logErrorCallback = (exception, newResourceDraft, oldResource, updateActions) -> logErrorCallback(LOGGER, "tax category", exception, oldResource, updateActions);
    final TriConsumer<SyncException, Optional<TaxCategoryDraft>, Optional<TaxCategory>> logWarningCallback = (exception, newResourceDraft, oldResource) -> logWarningCallback(LOGGER, "tax category", exception, oldResource);
    final TaxCategorySyncOptions syncOptions = TaxCategorySyncOptionsBuilder.of(targetClient).errorCallback(logErrorCallback).warningCallback(logWarningCallback).build();
    final TaxCategorySync taxCategorySync = new TaxCategorySync(syncOptions);
    final CustomObjectService customObjectService = new CustomObjectServiceImpl(targetClient);
    return new TaxCategorySyncer(taxCategorySync, sourceClient, targetClient, customObjectService, clock);
}
Also used : TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) TaxCategorySyncStatistics(com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics) SyncException(com.commercetools.sync.commons.exceptions.SyncException) TaxCategoryDraft(io.sphere.sdk.taxcategories.TaxCategoryDraft) LoggerFactory(org.slf4j.LoggerFactory) UpdateAction(io.sphere.sdk.commands.UpdateAction) TaxCategoryQuery(io.sphere.sdk.taxcategories.queries.TaxCategoryQuery) CompletableFuture(java.util.concurrent.CompletableFuture) QuadConsumer(com.commercetools.sync.commons.utils.QuadConsumer) SyncUtils.logWarningCallback(com.commercetools.project.sync.util.SyncUtils.logWarningCallback) TaxRateDraft(io.sphere.sdk.taxcategories.TaxRateDraft) SphereClient(io.sphere.sdk.client.SphereClient) TriConsumer(com.commercetools.sync.commons.utils.TriConsumer) Nonnull(javax.annotation.Nonnull) TaxCategoryDraftBuilder(io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder) SyncUtils.logErrorCallback(com.commercetools.project.sync.util.SyncUtils.logErrorCallback) TaxRate(io.sphere.sdk.taxcategories.TaxRate) Logger(org.slf4j.Logger) TaxCategorySyncOptionsBuilder(com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder) CustomObjectService(com.commercetools.project.sync.service.CustomObjectService) Collectors(java.util.stream.Collectors) List(java.util.List) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) CompletionStage(java.util.concurrent.CompletionStage) Syncer(com.commercetools.project.sync.Syncer) TaxRateDraftBuilder(io.sphere.sdk.taxcategories.TaxRateDraftBuilder) Clock(java.time.Clock) Optional(java.util.Optional) CustomObjectServiceImpl(com.commercetools.project.sync.service.impl.CustomObjectServiceImpl) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) CustomObjectService(com.commercetools.project.sync.service.CustomObjectService) TaxCategorySync(com.commercetools.sync.taxcategories.TaxCategorySync) Optional(java.util.Optional) TaxCategorySyncOptions(com.commercetools.sync.taxcategories.TaxCategorySyncOptions) TaxCategory(io.sphere.sdk.taxcategories.TaxCategory) CustomObjectServiceImpl(com.commercetools.project.sync.service.impl.CustomObjectServiceImpl) List(java.util.List) SyncException(com.commercetools.sync.commons.exceptions.SyncException) Nonnull(javax.annotation.Nonnull)

Aggregations

TaxCategorySync (com.commercetools.sync.taxcategories.TaxCategorySync)7 TaxCategorySyncOptions (com.commercetools.sync.taxcategories.TaxCategorySyncOptions)7 TaxCategorySyncStatistics (com.commercetools.sync.taxcategories.helpers.TaxCategorySyncStatistics)7 TaxCategoryDraft (io.sphere.sdk.taxcategories.TaxCategoryDraft)7 TaxRateDraft (io.sphere.sdk.taxcategories.TaxRateDraft)7 SubRate (io.sphere.sdk.taxcategories.SubRate)6 Test (org.junit.jupiter.api.Test)6 TaxCategory (io.sphere.sdk.taxcategories.TaxCategory)5 TaxRate (io.sphere.sdk.taxcategories.TaxRate)5 TaxCategorySyncOptionsBuilder (com.commercetools.sync.taxcategories.TaxCategorySyncOptionsBuilder)4 SphereClient (io.sphere.sdk.client.SphereClient)4 TaxCategoryDraftBuilder (io.sphere.sdk.taxcategories.TaxCategoryDraftBuilder)4 TaxRateDraftBuilder (io.sphere.sdk.taxcategories.TaxRateDraftBuilder)4 TaxCategoryQuery (io.sphere.sdk.taxcategories.queries.TaxCategoryQuery)4 List (java.util.List)4 Optional (java.util.Optional)4 CompletableFuture (java.util.concurrent.CompletableFuture)4 Nonnull (javax.annotation.Nonnull)4 AssertionsForStatistics.assertThat (com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat)3 CTP_TARGET_CLIENT (com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT)3