|
24 | 24 | import com.commercetools.sync.integration.commons.utils.CategoryITUtils; |
25 | 25 | import com.commercetools.sync.integration.commons.utils.ITUtils; |
26 | 26 | import com.commercetools.sync.integration.commons.utils.TestClientUtils; |
27 | | -import io.vrap.rmf.base.client.ApiHttpResponse; |
28 | 27 | import java.util.ArrayList; |
29 | 28 | import java.util.Collections; |
30 | 29 | import java.util.List; |
31 | 30 | import java.util.Locale; |
32 | 31 | import java.util.UUID; |
33 | | -import java.util.concurrent.CompletableFuture; |
34 | 32 | import java.util.concurrent.CompletionException; |
35 | 33 | import org.junit.jupiter.api.*; |
36 | 34 |
|
@@ -487,8 +485,24 @@ void syncDrafts_fromCategoriesWithoutKeys_ShouldNotUpdateCategories() { |
487 | 485 | final CategoryDraft newCategoryDraft2 = |
488 | 486 | CategoryDraftBuilder.of(oldCategoryDraft2).key(null).build(); |
489 | 487 |
|
490 | | - TestClientUtils.CTP_TARGET_CLIENT.categories().create(newCategoryDraft1).executeBlocking(); |
491 | | - TestClientUtils.CTP_TARGET_CLIENT.categories().create(newCategoryDraft2).executeBlocking(); |
| 488 | + final Category targetCat1 = |
| 489 | + TestClientUtils.CTP_TARGET_CLIENT |
| 490 | + .categories() |
| 491 | + .create(newCategoryDraft1) |
| 492 | + .executeBlocking() |
| 493 | + .getBody(); |
| 494 | + final Category targetCat2 = |
| 495 | + TestClientUtils.CTP_TARGET_CLIENT |
| 496 | + .categories() |
| 497 | + .create(newCategoryDraft2) |
| 498 | + .executeBlocking() |
| 499 | + .getBody(); |
| 500 | + |
| 501 | + // Verify both categories were created in TARGET |
| 502 | + assertThat(targetCat1).isNotNull(); |
| 503 | + assertThat(targetCat1.getSlug().get(Locale.ENGLISH)).isEqualTo(slug1); |
| 504 | + assertThat(targetCat2).isNotNull(); |
| 505 | + assertThat(targetCat2.getSlug().get(Locale.ENGLISH)).isEqualTo(slug2); |
492 | 506 |
|
493 | 507 | // --------- |
494 | 508 |
|
|
0 commit comments