     @sphereClient.productTypes.save(pt).then (productType) =>
       @newProduct.productType.id = productType.id
       @sphereClient.products.save(@newProduct).then (product) =>
-        @oldProduct = product.masterData.staged
-        @oldProduct.productType = product.productType # set product type to staged subset
-        # set id for matching and version for update
-        @oldProduct.id = product.id
-        @oldProduct.version = product.version
+        @oldProduct = getProductFromStaged product
         @newProduct.id = product.id
         done()
 

      expect(true).toBe false
      done()


describe "Integration test between projects", ->


            expect(b.taxCategory.id).toBe taxCategory2.id

    # deletion
            @oldProduct = getProductFromStaged b
            @newProduct.taxCategory = null

            data = @sync.buildActions @newProduct, @oldProduct
            data.update (e, r, b) ->
