@@ -0,0 +1,2771 @@
+package crud.lecture2_get;%0A%0Aimport intern.BaseTest;%0Aimport io.sphere.sdk.models.LocalizedString;%0Aimport io.sphere.sdk.products.ProductDraftBuilder;%0Aimport io.sphere.sdk.products.ProductProjection;%0Aimport io.sphere.sdk.products.ProductVariantDraft;%0Aimport io.sphere.sdk.products.ProductVariantDraftBuilder;%0Aimport io.sphere.sdk.products.commands.ProductCreateCommand;%0Aimport io.sphere.sdk.products.commands.ProductDeleteCommand;%0Aimport io.sphere.sdk.products.queries.ProductProjectionQuery;%0Aimport io.sphere.sdk.products.queries.ProductQuery;%0Aimport io.sphere.sdk.producttypes.ProductType;%0Aimport io.sphere.sdk.producttypes.ProductTypeDraft;%0Aimport io.sphere.sdk.producttypes.commands.ProductTypeCreateCommand;%0Aimport io.sphere.sdk.producttypes.commands.ProductTypeDeleteCommand;%0Aimport io.sphere.sdk.producttypes.queries.ProductTypeByKeyGet;%0Aimport io.sphere.sdk.queries.PagedQueryResult;%0Aimport org.junit.AfterClass;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport java.util.Collections;%0Aimport java.util.Locale;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Apublic class GetTest extends BaseTest %7B%0A%0A    public static final String PRODUCT_TYPE_KEY = %22tshirt%22;%0A%0A    @Test%0A    public void queryProductBySlug() %7B%0A        final PagedQueryResult%3CProductProjection%3E queryResult = ct().complete(ProductProjectionQuery.ofStaged().withPredicates(p -%3E TODO()));%0A        assertThat(queryResult.getResults()).hasSize(3).extracting(%22slug%22)%0A                .contains(LocalizedString.of(Locale.ENGLISH, %22foo-tshirt-1%22),%0A                        LocalizedString.of(Locale.ENGLISH, %22foo-tshirt-2%22),%0A                        LocalizedString.of(Locale.ENGLISH, %22foo-tshirt-3%22));%0A    %7D%0A%0A    @BeforeClass%0A    @AfterClass%0A    public void cleanup() %7B%0A        final ProductType productType = ct().complete(ProductTypeByKeyGet.of(PRODUCT_TYPE_KEY));%0A        if (productType != null) %7B%0A            ct().complete(ProductQuery.of().byProductType(productType)).getResults()%0A                    .forEach(p -%3E ct().complete(ProductDeleteCommand.of(p)));%0A            ct().complete(ProductTypeDeleteCommand.of(productType));%0A        %7D%0A    %7D%0A%0A    @BeforeClass%0A    public void setup() %7B%0A        final ProductType productType = ct().complete(ProductTypeCreateCommand.of(ProductTypeDraft.of(PRODUCT_TYPE_KEY, %22tshirt%22, %22a t shaped cloth%22, Collections.emptyList())));%0A        final LocalizedString name = LocalizedString.of(Locale.ENGLISH, %22foo%22);%0A        final ProductVariantDraft productVariantDraft = ProductVariantDraftBuilder.of().build();%0A        for (int i = 0; i %3C 20; i++) %7B%0A            ct().complete(ProductCreateCommand.of(ProductDraftBuilder.of(productType, name, LocalizedString.of(Locale.ENGLISH, %22foo-tshirt-%22 + i), productVariantDraft).build()));%0A        %7D%0A    %7D%0A%0A%0A%7D%0A

Add some query tests.