diff --git a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php
index 2b3f65728068bee22560f06943f88eea69e36d79..0498b22d550e7f8c78cc2af53819a31aebeb3d47 100644
--- a/app/code/Magento/Checkout/Controller/Cart/CouponPost.php
+++ b/app/code/Magento/Checkout/Controller/Cart/CouponPost.php
@@ -90,26 +90,17 @@ class CouponPost extends \Magento\Checkout\Controller\Cart
 
             if ($codeLength) {
                 $escaper = $this->_objectManager->get(\Magento\Framework\Escaper::class);
+                $coupon = $this->couponFactory->create();
+                $coupon->load($couponCode, 'code');
                 if (!$itemsCount) {
-                    if ($isCodeLengthValid) {
-                        $coupon = $this->couponFactory->create();
-                        $coupon->load($couponCode, 'code');
-                        if ($coupon->getId()) {
-                            $this->_checkoutSession->getQuote()->setCouponCode($couponCode)->save();
-                            $this->messageManager->addSuccess(
-                                __(
-                                    'You used coupon code "%1".',
-                                    $escaper->escapeHtml($couponCode)
-                                )
-                            );
-                        } else {
-                            $this->messageManager->addError(
-                                __(
-                                    'The coupon code "%1" is not valid.',
-                                    $escaper->escapeHtml($couponCode)
-                                )
-                            );
-                        }
+                    if ($isCodeLengthValid && $coupon->getId()) {
+                        $this->_checkoutSession->getQuote()->setCouponCode($couponCode)->save();
+                        $this->messageManager->addSuccess(
+                            __(
+                                'You used coupon code "%1".',
+                                $escaper->escapeHtml($couponCode)
+                            )
+                        );
                     } else {
                         $this->messageManager->addError(
                             __(
@@ -119,7 +110,7 @@ class CouponPost extends \Magento\Checkout\Controller\Cart
                         );
                     }
                 } else {
-                    if ($isCodeLengthValid && $couponCode == $cartQuote->getCouponCode()) {
+                    if ($isCodeLengthValid && $coupon->getId() && $couponCode == $cartQuote->getCouponCode()) {
                         $this->messageManager->addSuccess(
                             __(
                                 'You used coupon code "%1".',
diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Cart/CouponPostTest.php b/app/code/Magento/Checkout/Test/Unit/Controller/Cart/CouponPostTest.php
index 16ffb7c2b1437da5e7ffadcc6ebe2fc4b3c479d3..93100df3d8c32182912d59f96f9149200f5f0139 100644
--- a/app/code/Magento/Checkout/Test/Unit/Controller/Cart/CouponPostTest.php
+++ b/app/code/Magento/Checkout/Test/Unit/Controller/Cart/CouponPostTest.php
@@ -69,6 +69,16 @@ class CouponPostTest extends \PHPUnit_Framework_TestCase
      */
     protected $quoteRepository;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $redirect;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $redirectFactory;
+
     /**
      * @return void
      */
@@ -204,6 +214,12 @@ class CouponPostTest extends \PHPUnit_Framework_TestCase
             ->method('getCouponCode')
             ->willReturn('OLDCODE');
 
+        $coupon = $this->getMock(\Magento\SalesRule\Model\Coupon::class, [], [], '', false);
+        $this->couponFactory->expects($this->once())
+            ->method('create')
+            ->willReturn($coupon);
+        $coupon->expects($this->once())->method('load')->willReturnSelf();
+        $coupon->expects($this->once())->method('getId')->willReturn(1);
         $this->quote->expects($this->any())
             ->method('getItemsCount')
             ->willReturn(1);
diff --git a/app/code/Magento/Eav/Model/AttributeManagement.php b/app/code/Magento/Eav/Model/AttributeManagement.php
index 8d8674bcca0e7886d4a174840a7d55dea5bef8a4..102aafbd39fb1ba473dc1a346a857ccf695a5dab 100644
--- a/app/code/Magento/Eav/Model/AttributeManagement.php
+++ b/app/code/Magento/Eav/Model/AttributeManagement.php
@@ -6,10 +6,14 @@
  */
 namespace Magento\Eav\Model;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Exception\InputException;
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Exception\StateException;
 
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class AttributeManagement implements \Magento\Eav\Api\AttributeManagementInterface
 {
     /**
@@ -19,6 +23,7 @@ class AttributeManagement implements \Magento\Eav\Api\AttributeManagementInterfa
 
     /**
      * @var \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection
+     * @deprecated please use instead \Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory
      */
     protected $attributeCollection;
 
@@ -47,6 +52,11 @@ class AttributeManagement implements \Magento\Eav\Api\AttributeManagementInterfa
      */
     protected $attributeResource;
 
+    /**
+     * @var \Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory
+     */
+    private $attributeCollectionFactory;
+
     /**
      * @param \Magento\Eav\Api\AttributeSetRepositoryInterface $setRepository
      * @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection $attributeCollection
@@ -154,11 +164,26 @@ class AttributeManagement implements \Magento\Eav\Api\AttributeManagementInterfa
         if (!$attributeSet->getAttributeSetId() || $attributeSet->getEntityTypeId() != $requiredEntityTypeId) {
             throw NoSuchEntityException::singleField('attributeSetId', $attributeSetId);
         }
-
-        $attributeCollection = $this->attributeCollection
-            ->setAttributeSetFilter($attributeSet->getAttributeSetId())
-            ->load();
+        /** @var \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection $attributeCollection */
+        $attributeCollection = $this->getCollectionFactory()->create();
+        $attributeCollection->setAttributeSetFilter($attributeSet->getAttributeSetId())->load();
 
         return $attributeCollection->getItems();
     }
+
+    /**
+     * Retrieve collection factory
+     *
+     * @deprecated
+     * @return \Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory
+     */
+    private function getCollectionFactory()
+    {
+        if ($this->attributeCollectionFactory === null) {
+            $this->attributeCollectionFactory = ObjectManager::getInstance()->create(
+                \Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory::class
+            );
+        }
+        return $this->attributeCollectionFactory;
+    }
 }
diff --git a/app/code/Magento/Eav/Test/Unit/Model/AttributeManagementTest.php b/app/code/Magento/Eav/Test/Unit/Model/AttributeManagementTest.php
index 88118e0b0f70fc54241d76b3895c644c5bd4a616..c45c575dffc2fa9fd87cf9e226ef06ceaa0ce2e2 100644
--- a/app/code/Magento/Eav/Test/Unit/Model/AttributeManagementTest.php
+++ b/app/code/Magento/Eav/Test/Unit/Model/AttributeManagementTest.php
@@ -371,6 +371,24 @@ class AttributeManagementTest extends \PHPUnit_Framework_TestCase
         $entityType = 'type';
         $attributeSetId = 148;
 
+        $attributeCollectionFactoryMock = $this->getMock(
+            \Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory::class,
+            ['create'],
+            [],
+            '',
+            false
+        );
+        $attributeCollectionFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($this->attributeCollectionMock);
+
+        $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+        $objectManager->setBackwardCompatibleProperty(
+            $this->model,
+            'attributeCollectionFactory',
+            $attributeCollectionFactoryMock
+        );
+
         $attributeSetMock = $this->getMock(\Magento\Eav\Api\Data\AttributeSetInterface::class, [], [], '', false);
         $this->setRepositoryMock->expects($this->once())
             ->method('get')
diff --git a/app/code/Magento/Sales/Model/Order/Payment.php b/app/code/Magento/Sales/Model/Order/Payment.php
index a0f56d6ea9a73ea02d4c852ef6ac4831be29b574..3cd5ecde21366c87d4ee746a0ddc1b453ec0bf95 100644
--- a/app/code/Magento/Sales/Model/Order/Payment.php
+++ b/app/code/Magento/Sales/Model/Order/Payment.php
@@ -1289,7 +1289,7 @@ class Payment extends Info implements OrderPaymentInterface
      */
     public function isCaptureFinal($amountToCapture)
     {
-        $total = $this->getOrder()->getTotalDue();
+        $total = $this->getOrder()->getBaseTotalDue();
         return $this->formatAmount($total, true) == $this->formatAmount($amountToCapture, true);
     }
 
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php
index f97e3be1dcb6dcb9ea6383efec081517751325b5..7f058b7c05053646af0272e5b4f206105b8b45aa 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php
@@ -1548,7 +1548,7 @@ class PaymentTest extends \PHPUnit_Framework_TestCase
         $partialAmount = 12.00;
 
         $this->orderMock->expects(static::exactly(2))
-            ->method('getTotalDue')
+            ->method('getBaseTotalDue')
             ->willReturn($amount);
 
         static::assertFalse($this->payment->isCaptureFinal($partialAmount));
diff --git a/app/code/Magento/Swatches/Helper/Data.php b/app/code/Magento/Swatches/Helper/Data.php
index 68a18ef8be6a1b2d51403acac0ebaca1ecc83996..a973a822c4101671faa0fe57925a0e9b0c5b2f2a 100644
--- a/app/code/Magento/Swatches/Helper/Data.php
+++ b/app/code/Magento/Swatches/Helper/Data.php
@@ -63,6 +63,13 @@ class Data
      */
     protected $imageHelper;
 
+    /**
+     * Product metadata pool
+     *
+     * @var \Magento\Framework\EntityManager\MetadataPool
+     */
+    private $metadataPool;
+
     /**
      * Data key which should populated to Attribute entity from "additional_data" field
      *
@@ -196,7 +203,13 @@ class Data
         }
 
         $productCollection = $this->productCollectionFactory->create();
-        $this->addFilterByParent($productCollection, $parentProduct->getId());
+
+        $productLinkedFiled = $this->getMetadataPool()
+            ->getMetadata(\Magento\Catalog\Api\Data\ProductInterface::class)
+            ->getLinkField();
+        $parentId = $parentProduct->getData($productLinkedFiled);
+
+        $this->addFilterByParent($productCollection, $parentId);
 
         $configurableAttributes = $this->getAttributesFromConfigurable($parentProduct);
         $allAttributesArray = [];
@@ -491,4 +504,19 @@ class Data
         }
         return $attribute->getData(Swatch::SWATCH_INPUT_TYPE_KEY) == Swatch::SWATCH_INPUT_TYPE_TEXT;
     }
+
+    /**
+     * Get product metadata pool.
+     *
+     * @return \Magento\Framework\EntityManager\MetadataPool
+     * @deprecared
+     */
+    protected function getMetadataPool()
+    {
+        if (!$this->metadataPool) {
+            $this->metadataPool = \Magento\Framework\App\ObjectManager::getInstance()
+                ->get(\Magento\Framework\EntityManager\MetadataPool::class);
+        }
+        return $this->metadataPool;
+    }
 }
diff --git a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php
index 6cf79dae309a583aca3ced31bd1411eb9d53b27b..e5f2f887836eff5ad73ca95602d4d7aec411150e 100644
--- a/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php
+++ b/app/code/Magento/Swatches/Test/Unit/Helper/DataTest.php
@@ -46,6 +46,9 @@ class DataTest extends \PHPUnit_Framework_TestCase
     /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Catalog\Api\ProductRepositoryInterface */
     protected $productRepoMock;
 
+    /** @var   \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\EntityManager\MetadataPool*/
+    private $metaDataPoolMock;
+
     protected function setUp()
     {
         $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
@@ -108,7 +111,13 @@ class DataTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-
+        $this->metaDataPoolMock = $this->getMock(
+            \Magento\Framework\EntityManager\MetadataPool::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->swatchHelperObject = $this->objectManager->getObject(
             \Magento\Swatches\Helper\Data::class,
             [
@@ -120,6 +129,11 @@ class DataTest extends \PHPUnit_Framework_TestCase
                 'imageHelper' => $this->imageHelperMock,
             ]
         );
+        $this->objectManager->setBackwardCompatibleProperty(
+            $this->swatchHelperObject,
+            'metadataPool',
+            $this->metaDataPoolMock
+        );
     }
 
     public function dataForAdditionalData()
@@ -246,12 +260,16 @@ class DataTest extends \PHPUnit_Framework_TestCase
      */
     public function testLoadVariationByFallback($product)
     {
+        $metadataMock = $this->getMock(\Magento\Framework\EntityManager\EntityMetadataInterface::class);
+        $this->metaDataPoolMock->expects($this->once())->method('getMetadata')->willReturn($metadataMock);
+        $metadataMock->expects($this->once())->method('getLinkField')->willReturn('id');
+
         $this->getSwatchAttributes($product);
 
         $this->prepareVariationCollection();
 
         $this->productCollectionMock->method('getFirstItem')->willReturn($this->productMock);
-        $this->productMock->method('getId')->willReturn(95);
+        $this->productMock->method('getData')->with('id')->willReturn(95);
         $this->productModelFactoryMock->method('create')->willReturn($this->productMock);
         $this->productMock->method('load')->with(95)->will($this->returnSelf());
 
diff --git a/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/ThemeId.php b/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/ThemeId.php
index f5197dd7d0435d672023a0027d7bbb7674036abb..dc048d41612b800c9d291b5067b0106bb1fbf079 100644
--- a/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/ThemeId.php
+++ b/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/ThemeId.php
@@ -10,6 +10,10 @@
  */
 namespace Magento\Widget\Model\ResourceModel\Widget\Instance\Options;
 
+/**
+ * @deprecated created new class that correctly loads theme options and whose name follows naming convention
+ * @see \Magento\Widget\Model\ResourceModel\Widget\Instance\Options\Themes
+ */
 class ThemeId implements \Magento\Framework\Option\ArrayInterface
 {
     /**
diff --git a/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/Themes.php b/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/Themes.php
new file mode 100644
index 0000000000000000000000000000000000000000..403dfeb40ff2ea3330440c0a22db4247e9a5e377
--- /dev/null
+++ b/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/Themes.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Widget\Model\ResourceModel\Widget\Instance\Options;
+
+use Magento\Framework\Data\OptionSourceInterface;
+use Magento\Theme\Model\ResourceModel\Theme\CollectionFactory as ThemeCollectionFactory;
+
+/**
+ * Option source of the widget theme property.
+ *
+ * Can be used as a data provider for UI components that shows possible themes as a list.
+ */
+class Themes implements OptionSourceInterface
+{
+    /**
+     * @var ThemeCollectionFactory
+     */
+    private $themeCollectionFactory;
+
+    /**
+     * @param ThemeCollectionFactory $themeCollectionFactory
+     */
+    public function __construct(ThemeCollectionFactory $themeCollectionFactory)
+    {
+        $this->themeCollectionFactory = $themeCollectionFactory;
+    }
+
+    /**
+     * Return array of options as value-label pairs
+     *
+     * @return array Format: array('<theme ID>' => '<theme label>', ...)
+     */
+    public function toOptionArray()
+    {
+        // Load only visible themes that are used in frontend area
+        return $this->themeCollectionFactory->create()->loadRegisteredThemes()->toOptionHash();
+    }
+}
diff --git a/app/code/Magento/Widget/Test/Unit/Model/ResourceModel/Widget/Instance/Options/ThemesTest.php b/app/code/Magento/Widget/Test/Unit/Model/ResourceModel/Widget/Instance/Options/ThemesTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..e3854a599013298e0b3bbd6439183611d14b95d3
--- /dev/null
+++ b/app/code/Magento/Widget/Test/Unit/Model/ResourceModel/Widget/Instance/Options/ThemesTest.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Widget\Test\Unit\Model\ResourceModel\Widget\Instance\Options;
+
+use Magento\Widget\Model\ResourceModel\Widget\Instance\Options\Themes;
+use Magento\Theme\Model\ResourceModel\Theme\Collection as ThemeCollection;
+use Magento\Theme\Model\ResourceModel\Theme\CollectionFactory as ThemeCollectionFactory;
+
+/**
+ * Test class for \Magento\Widget\Model\ResourceModel\Widget\Instance\Options\Themes
+ */
+class ThemesTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Themes
+     */
+    private $model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $themeCollectionFactoryMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $themeCollectionMock;
+
+    protected function setUp()
+    {
+        $this->themeCollectionMock = $this->getMock(ThemeCollection::class, [], [], '', false);
+        $this->themeCollectionFactoryMock = $this->getMock(ThemeCollectionFactory::class, ['create'], [], '', false);
+        $this->model = new Themes(
+            $this->themeCollectionFactoryMock
+        );
+    }
+
+    public function testToOptionArray()
+    {
+        $expectedResult = [
+            1 => 'Theme Label',
+        ];
+        $this->themeCollectionFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($this->themeCollectionMock);
+
+        $this->themeCollectionMock->expects($this->once())->method('loadRegisteredThemes')->willReturnSelf();
+        $this->themeCollectionMock->expects($this->once())->method('toOptionHash')->willReturn($expectedResult);
+
+        $this->assertEquals($expectedResult, $this->model->toOptionArray());
+    }
+}
diff --git a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml
index 2d9cf935afa0d4281e46f997e22465285f69e53d..db73e302f4a7629e380292308cce534693560d99 100644
--- a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml
+++ b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_block.xml
@@ -52,7 +52,7 @@
                             <argument name="header" xsi:type="string" translate="true">Design Theme</argument>
                             <argument name="index" xsi:type="string">theme_id</argument>
                             <argument name="type" xsi:type="string">options</argument>
-                            <argument name="options" xsi:type="options" model="Magento\Widget\Model\ResourceModel\Widget\Instance\Options\ThemeId"/>
+                            <argument name="options" xsi:type="options" model="Magento\Widget\Model\ResourceModel\Widget\Instance\Options\Themes"/>
                             <argument name="with_empty" xsi:type="string">1</argument>
                         </arguments>
                     </block>
diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_checkout.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_checkout.less
index 3804721026db50a77ebaf752c75f5dc35a23cf09..d861d4dcae256222cb30cc81ee21359a40e12582 100644
--- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_checkout.less
+++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_checkout.less
@@ -23,8 +23,7 @@
 
 & when (@media-common = true) {
 
-    .checkout-index-index,
-    .checkout-onepage-success {
+    .checkout-index-index {
         .page-title-wrapper {
             &:extend(.abs-visually-hidden all);
         }
@@ -61,6 +60,14 @@
             margin-left: 0;
         }
     }
+
+    .checkout-onepage-success {
+        &:extend(.abs-add-clearfix all);
+
+        .print {
+            display: none;
+        }
+    }
 }
 
 //
@@ -87,4 +94,12 @@
         .lib-layout-column(2, 1, @checkout-wrapper__columns);
         padding-right: @indent__l;
     }
+
+    .checkout-onepage-success {
+        .print {
+            display: block;
+            float: right;
+            margin: 22px 0 0;
+        }
+    }
 }
diff --git a/app/design/frontend/Magento/blank/Magento_Rma/web/css/source/_module.less b/app/design/frontend/Magento/blank/Magento_Rma/web/css/source/_module.less
index a8d0bf8b584822f7e0084d690f9feb5ad04246a2..6596fe2fd79762908b1a87d2fbeac90fd8be7824 100644
--- a/app/design/frontend/Magento/blank/Magento_Rma/web/css/source/_module.less
+++ b/app/design/frontend/Magento/blank/Magento_Rma/web/css/source/_module.less
@@ -158,11 +158,12 @@
     .block-returns-tracking {
         .block-title {
             .action {
-                margin: 12px 0 0 30px;
+                margin: 0 0 0 30px;
+            }
 
-                &.track {
-                    float: right;
-                }
+            .actions-track {
+                float: right;
+                margin-top: 12px;
             }
         }
     }
diff --git a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_checkout.less b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_checkout.less
index f037c1c5777cbf8f761fddf779f7c8e9942278f8..a1109523d26b5ea6b85e794a66ebad3100a551c0 100644
--- a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_checkout.less
+++ b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_checkout.less
@@ -27,8 +27,7 @@
 
 & when (@media-common = true) {
 
-    .checkout-index-index,
-    .checkout-onepage-success {
+    .checkout-index-index {
         .page-title-wrapper {
             &:extend(.abs-visually-hidden all);
         }
@@ -66,6 +65,14 @@
             margin-left: 0;
         }
     }
+
+    .checkout-onepage-success {
+        &:extend(.abs-add-clearfix all);
+
+        .print {
+            display: none;
+        }
+    }
 }
 
 //
@@ -96,4 +103,12 @@
         .lib-layout-column(2, 1, @checkout-wrapper__columns);
         padding-right: @indent__l;
     }
+
+    .checkout-onepage-success {
+        .print {
+            display: block;
+            float: right;
+            margin: 23px 0 0;
+        }
+    }
 }
diff --git a/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less
index cfec28464244e59e48aeb16e674d8afcc33407b4..c7e955e69c3a66864e073365d2863968f014ed66 100644
--- a/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less
+++ b/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less
@@ -176,11 +176,12 @@
     .block-returns-tracking {
         .block-title {
             .action {
-                margin: 12px 0 0 30px;
+                margin: 0 0 0 30px;
+            }
 
-                &.track {
-                    float: right;
-                }
+            .actions-track {
+                float: right;
+                margin-top: 12px;
             }
         }
     }
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php
index 54bf06f70b5f1c0f192b79bda3ade75a85cd37f7..da1ec8f71a1121bceba80b6a3138f77b07663310 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php
@@ -13,9 +13,11 @@ use Magento\Mtf\Constraint\AbstractConstraint;
 use Magento\Catalog\Test\Fixture\CatalogProductAttribute;
 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit;
 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex;
+use Magento\Mtf\Client\BrowserInterface;
 
 /**
  * Check attribute on product form.
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class AssertAddedProductAttributeOnProductForm extends AbstractConstraint
 {
@@ -45,6 +47,13 @@ class AssertAddedProductAttributeOnProductForm extends AbstractConstraint
      */
     protected $catalogProductEdit;
 
+    /**
+     * Locator for attributes section.
+     *
+     * @var string
+     */
+    protected $attributes = '[data-index="attributes"]';
+
     /**
      * Add this attribute to Default attribute Template. Create product and Assert that created attribute
      * is displayed on product form (Products > Inventory > Catalog).
@@ -66,6 +75,7 @@ class AssertAddedProductAttributeOnProductForm extends AbstractConstraint
         CatalogProductEdit $catalogProductEdit,
         CatalogProductAttribute $attribute,
         CatalogAttributeSet $attributeSet,
+        BrowserInterface $browser,
         CatalogProductAttribute $productAttributeOriginal = null
     ) {
         $this->fixtureFactory = $fixtureFactory;
@@ -92,7 +102,9 @@ class AssertAddedProductAttributeOnProductForm extends AbstractConstraint
         $catalogProductAttribute = ($productAttributeOriginal !== null)
             ? array_merge($productAttributeOriginal->getData(), $attribute->getData())
             : $attribute->getData();
-        $catalogProductEdit->getProductForm()->openSection(self::ATTRIBUTES);
+        if ($browser->find($this->attributes)->isVisible()) {
+            $catalogProductEdit->getProductForm()->openSection(self::ATTRIBUTES);
+        }
 
         \PHPUnit_Framework_Assert::assertTrue(
             $catalogProductEdit->getProductForm()->checkAttributeLabel($catalogProductAttribute),
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment.php
index cad6dda90459845718bc3ab1e3ac2952cca16640..ce8f5a4cbfd99b41e990a11fc89527f28b0fec5f 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment.php
@@ -8,7 +8,6 @@ namespace Magento\Checkout\Test\Block\Onepage;
 
 use Magento\Mtf\Block\Block;
 use Magento\Mtf\Fixture\InjectableFixture;
-use Magento\Payment\Test\Fixture\CreditCard;
 
 /**
  * Checkout payment block.
@@ -90,7 +89,12 @@ class Payment extends Block
         } catch (\Exception $exception) {
             throw new \Exception('Such payment method is absent.');
         }
-
+        $browser = $this->browser;
+        $browser->waitUntil(
+            function () use ($browser, $paymentSelector) {
+                return $browser->find($paymentSelector);
+            }
+        );
         $paymentRadioButton = $this->_rootElement->find($paymentSelector);
         if ($paymentRadioButton->isVisible()) {
             $paymentRadioButton->click();
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/Curl/RemoveTaxRule.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/Curl/RemoveTaxRule.php
index 31ca2396f07827735fa3f686facb412807bdf59e..3e69145b42b3416efb88b6557c780d83eae59a1c 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/Curl/RemoveTaxRule.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/Curl/RemoveTaxRule.php
@@ -39,9 +39,9 @@ class RemoveTaxRule extends Curl
     public function persist(FixtureInterface $fixture = null)
     {
         $this->taxRuleGridUrl = $_ENV['app_backend_url'] . 'tax/rule/index/';
-        $curl = $this->_getCurl($this->taxRuleGridUrl);
+        $curl = $this->getCurl($this->taxRuleGridUrl);
         $response = $curl->read();
-        $this->_removeTaxRules($response);
+        $this->removeTaxRules($response);
         $curl->close();
         return $response;
     }
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/Block/Adminhtml/Widget/WidgetGrid.php b/dev/tests/functional/tests/app/Magento/Widget/Test/Block/Adminhtml/Widget/WidgetGrid.php
index 50a5657a4783088eabef74ea56aed23cd8592835..2a03872f4be6bce82a7764ec0358f83c654a5b0a 100644
--- a/dev/tests/functional/tests/app/Magento/Widget/Test/Block/Adminhtml/Widget/WidgetGrid.php
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/Block/Adminhtml/Widget/WidgetGrid.php
@@ -7,12 +7,20 @@
 namespace Magento\Widget\Test\Block\Adminhtml\Widget;
 
 use Magento\Backend\Test\Block\Widget\Grid as AbstractGrid;
+use Magento\Mtf\Client\Locator;
 
 /**
  * Widget grid on the Widget Instance Index page.
  */
 class WidgetGrid extends AbstractGrid
 {
+    /**
+     * Selector for not empty options at select element.
+     *
+     * @var string
+     */
+    private $notEmptyOptionsSelector = 'option:not([value=""])';
+
     /**
      * Locator value for link in action column.
      *
@@ -36,5 +44,28 @@ class WidgetGrid extends AbstractGrid
         'title' => [
             'selector' => 'input[name="title"]',
         ],
+        'theme_id' => [
+            'selector' => 'select[name="theme_id"]',
+            'input' => 'select',
+        ],
     ];
+
+    /**
+     * Returns values of theme_id filter.
+     *
+     * @return array
+     */
+    public function getThemeIdValues()
+    {
+        $values = [];
+        $themeFilter = $this->filters['theme_id'];
+        $strategy = empty($themeFilter['strategy']) ? Locator::SELECTOR_CSS : $themeFilter['strategy'];
+        $element = $this->_rootElement->find($themeFilter['selector'], $strategy, $themeFilter['input']);
+        $options = $element->getElements($this->notEmptyOptionsSelector);
+        foreach ($options as $option) {
+            $values[] = $option->getText();
+        }
+
+        return $values;
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertThemeFilterValuesOnWidgetGrid.php b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertThemeFilterValuesOnWidgetGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..31ebfd87c252b6e4142263636eb00329ab8d72b7
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertThemeFilterValuesOnWidgetGrid.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Widget\Test\Constraint;
+
+use Magento\Mtf\Constraint\AbstractConstraint;
+use Magento\Widget\Test\Fixture\Widget;
+use Magento\Widget\Test\Page\Adminhtml\WidgetInstanceIndex;
+
+/**
+ * Assert theme filter contains all possible values from created widgets.
+ */
+class AssertThemeFilterValuesOnWidgetGrid extends AbstractConstraint
+{
+    /**
+     * Assert theme filter contains all possible values from created widgets.
+     *
+     * @param Widget[] $widgets
+     * @param WidgetInstanceIndex $widgetInstanceIndex
+     * @return void
+     */
+    public function processAssert(array $widgets, WidgetInstanceIndex $widgetInstanceIndex)
+    {
+        $expectedValues = [];
+        foreach ($widgets as $widget) {
+            $expectedValues[] = $widget->getThemeId();
+        }
+        $widgetInstanceIndex->open();
+        $actualValues = $widgetInstanceIndex->getWidgetGrid()->getThemeIdValues();
+        \PHPUnit_Framework_Assert::assertEmpty(
+            array_diff($expectedValues, $actualValues),
+            'Widget grid theme filter doesn\'t contain all possible values from created widgets.'
+        );
+    }
+
+    /**
+     * Returns a string representation of the object.
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Widget grid theme filter contains all possible values from created widgets.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetInGrid.php b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetInGrid.php
index 5382d544a94b9f590a3475c915025c205e1453cd..2cc675f79fbd38a0f7654b40acc5d215be2a5191 100644
--- a/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetInGrid.php
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetInGrid.php
@@ -11,7 +11,7 @@ use Magento\Widget\Test\Page\Adminhtml\WidgetInstanceIndex;
 use Magento\Mtf\Constraint\AbstractConstraint;
 
 /**
- * Class AssertWidgetInGrid
+ * Assert widget is present in widget grid.
  */
 class AssertWidgetInGrid extends AbstractConstraint
 {
@@ -20,7 +20,10 @@ class AssertWidgetInGrid extends AbstractConstraint
     /* end tags */
 
     /**
-     * Assert widget availability in widget grid
+     * Assert widget availability in widget grid.
+     * Verifying such fields as:
+     * - title
+     * - theme_id
      *
      * @param Widget $widget
      * @param WidgetInstanceIndex $widgetInstanceIndex
@@ -28,7 +31,7 @@ class AssertWidgetInGrid extends AbstractConstraint
      */
     public function processAssert(Widget $widget, WidgetInstanceIndex $widgetInstanceIndex)
     {
-        $filter = ['title' => $widget->getTitle()];
+        $filter = ['title' => $widget->getTitle(), 'theme_id' => $widget->getThemeId()];
         $widgetInstanceIndex->open();
         \PHPUnit_Framework_Assert::assertTrue(
             $widgetInstanceIndex->getWidgetGrid()->isRowVisible($filter),
@@ -37,7 +40,7 @@ class AssertWidgetInGrid extends AbstractConstraint
     }
 
     /**
-     * Returns a string representation of the object
+     * Returns a string representation of the object.
      *
      * @return string
      */
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetsInGrid.php b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetsInGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..bc61b3ef66f51585b0e21fc7dc1a64b7f04e57f7
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetsInGrid.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Widget\Test\Constraint;
+
+use Magento\Mtf\Constraint\AbstractConstraint;
+use Magento\Widget\Test\Fixture\Widget;
+use Magento\Widget\Test\Page\Adminhtml\WidgetInstanceIndex;
+
+/**
+ * Assert widgets are present in widget grid.
+ */
+class AssertWidgetsInGrid extends AbstractConstraint
+{
+    /**
+     * Assert widgets are present in widget grid.
+     * Verifying such fields as:
+     * - title
+     * - theme_id
+     *
+     * @param Widget[] $widgets
+     * @param WidgetInstanceIndex $widgetInstanceIndex
+     * @param AssertWidgetInGrid $assertWidgetInGrid
+     * @return void
+     */
+    public function processAssert(
+        array $widgets,
+        WidgetInstanceIndex $widgetInstanceIndex,
+        AssertWidgetInGrid $assertWidgetInGrid
+    ) {
+        foreach ($widgets as $widget) {
+            $assertWidgetInGrid->processAssert($widget, $widgetInstanceIndex);
+        }
+    }
+
+    /**
+     * Returns a string representation of the object.
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Widgets are present in widget grid.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/Handler/Widget/Curl.php b/dev/tests/functional/tests/app/Magento/Widget/Test/Handler/Widget/Curl.php
index 4c9e61cdb873db0b32d3b77d9c16be3601537364..54520d0786a52732123a7fc0634d363f74d4b43d 100644
--- a/dev/tests/functional/tests/app/Magento/Widget/Test/Handler/Widget/Curl.php
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/Handler/Widget/Curl.php
@@ -27,6 +27,7 @@ class Curl extends AbstractCurl
     protected $mappingData = [
         'code' => [
             'CMS Page Link' => 'cms_page_link',
+            'Recently Viewed Products' => 'recently_viewed',
         ],
         'block' => [
             'Main Content Area' => 'content',
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/Repository/Widget.xml b/dev/tests/functional/tests/app/Magento/Widget/Test/Repository/Widget.xml
index dc39ed7fa1259a02da5eadbc84c38e22f64c71aa..4a8972bfd8dbb3f5a80b7f6fc8a7e20c2f80e0fc 100644
--- a/dev/tests/functional/tests/app/Magento/Widget/Test/Repository/Widget.xml
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/Repository/Widget.xml
@@ -25,5 +25,20 @@
                 <item name="dataset" xsi:type="string">cmsPageLink</item>
             </field>
         </dataset>
+
+        <dataset name="recently_viewed_products_on_blank_theme">
+            <field name="code" xsi:type="string">Recently Viewed Products</field>
+            <field name="title" xsi:type="string">Title_%isolation%</field>
+            <field name="theme_id" xsi:type="string">Magento Blank</field>
+            <field name="store_ids" xsi:type="array">
+                <item name="dataset" xsi:type="string">all_store_views</item>
+            </field>
+            <field name="widget_instance" xsi:type="array">
+                <item name="dataset" xsi:type="string">for_viewed_products</item>
+            </field>
+            <field name="parameters" xsi:type="array">
+                <item name="dataset" xsi:type="string">recentlyViewedProducts</item>
+            </field>
+        </dataset>
     </repository>
 </config>
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetEntityTest.php b/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetEntityTest.php
index 6358ac8821f26b621de3e83f7ef8380ffb7c3efc..cc02293ff8fdd98febf581beb87e8a00d7b128fb 100644
--- a/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetEntityTest.php
@@ -48,7 +48,7 @@ class CreateWidgetEntityTest extends AbstractCreateWidgetEntityTest
         // Preconditions
         $this->caches = $caches;
         $this->adjustCacheSettings();
-        
+
         // Steps
         $this->widgetInstanceIndex->open();
         $this->widgetInstanceIndex->getPageActionsBlock()->addNew();
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetsEntityTest.php b/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetsEntityTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..5269c315f78fc23c55e6848ec2482f850cdf2c0e
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetsEntityTest.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Widget\Test\TestCase;
+
+use Magento\Mtf\Fixture\FixtureFactory;
+use \Magento\Mtf\TestCase\Injectable;
+use Magento\Widget\Test\Fixture\Widget;
+
+/**
+ * Steps:
+ * 1. Create widgets.
+ * 2. Perform all assertions.
+ *
+ * @group Widget
+ * @ZephyrId MAGETWO-60672
+ */
+class CreateWidgetsEntityTest extends Injectable
+{
+    /* tags */
+    const SEVERITY = 'S3';
+    /* end tags */
+
+    /**
+     * Create multiple widgets.
+     *
+     * @param array $widgets
+     * @param FixtureFactory $fixtureFactory
+     * @return array
+     */
+    public function test(array $widgets, FixtureFactory $fixtureFactory)
+    {
+        /** @var Widget[] $widgetInstances */
+        $widgetInstances = [];
+        // Preconditions
+        foreach ($widgets as $widget) {
+            $widget = $fixtureFactory->createByCode('widget', ['dataset' => $widget]);
+            $widget->persist();
+            $widgetInstances[] = $widget;
+        }
+
+        return ['widgets' => $widgetInstances];
+    }
+
+    /**
+     * Delete all widgets.
+     *
+     * @return void
+     */
+    public function tearDown()
+    {
+        $this->objectManager->create(\Magento\Widget\Test\TestStep\DeleteAllWidgetsStep::class)->run();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetsEntityTest.xml b/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetsEntityTest.xml
new file mode 100644
index 0000000000000000000000000000000000000000..484ea26cf5253a6524b77e299ccdc2532924d3e9
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/CreateWidgetsEntityTest.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+ -->
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
+    <testCase name="Magento\Widget\Test\TestCase\CreateWidgetsEntityTest" summary="Create Widget" ticketId="MAGETWO-60672">
+        <variation name="CreateWidgetEntityTestWithDifferentThemes" summary="Widgets with different themes is presented in grid/filter">
+            <data name="tag" xsi:type="string">severity:S3</data>
+            <data name="widgets/0" xsi:type="string">default</data>
+            <data name="widgets/1" xsi:type="string">recently_viewed_products_on_blank_theme</data>
+            <constraint name="Magento\Widget\Test\Constraint\AssertThemeFilterValuesOnWidgetGrid" />
+            <constraint name="Magento\Widget\Test\Constraint\AssertWidgetsInGrid" />
+        </variation>
+    </testCase>
+</config>
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/etc/di.xml b/dev/tests/functional/tests/app/Magento/Widget/Test/etc/di.xml
index 122a9659cf2b6be0706218e1f761870784179ea7..c1595838b4f63d51d1732857c7ccdd6d6ff8bec3 100644
--- a/dev/tests/functional/tests/app/Magento/Widget/Test/etc/di.xml
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/etc/di.xml
@@ -66,4 +66,14 @@
             <argument name="severity" xsi:type="string">S1</argument>
         </arguments>
     </type>
+    <type name="Magento\Widget\Test\Constraint\AssertWidgetsInGrid">
+        <arguments>
+            <argument name="severity" xsi:type="string">S3</argument>
+        </arguments>
+    </type>
+    <type name="Magento\Widget\Test\Constraint\AssertThemeFilterValuesOnWidgetGrid">
+        <arguments>
+            <argument name="severity" xsi:type="string">S3</argument>
+        </arguments>
+    </type>
 </config>
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Controller/Cart/Index/CouponPostTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Controller/Cart/Index/CouponPostTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..a6031429c66023491e2c411748046e76ecbddf41
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Checkout/Controller/Cart/Index/CouponPostTest.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Checkout\Controller\Cart\Index;
+
+/**
+ * @magentoDbIsolation enabled
+ */
+class CouponPostTest extends \Magento\TestFramework\TestCase\AbstractController
+{
+    /**
+     * Test for \Magento\Checkout\Controller\Cart\CouponPost::execute() with simple product
+     *
+     * @magentoDataFixture Magento/Checkout/_files/quote_with_virtual_product_and_address.php
+     */
+    public function testExecute()
+    {
+        /** @var $session \Magento\Checkout\Model\Session */
+        $session = $this->_objectManager->create(\Magento\Checkout\Model\Session::class);
+        $quote = $session->getQuote();
+        $quote->setData('trigger_recollect', 1)->setTotalsCollectedFlag(true);
+        $inputData = [
+            'remove' => 0,
+            'coupon_code' => 'test'
+        ];
+        $this->getRequest()->setPostValue($inputData);
+        $this->dispatch(
+            'checkout/cart/couponPost/'
+        );
+
+        $this->assertSessionMessages(
+            $this->equalTo(['The coupon code "test" is not valid.']),
+            \Magento\Framework\Message\MessageInterface::TYPE_ERROR
+        );
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Eav/Model/AttributeManagementTest.php b/dev/tests/integration/testsuite/Magento/Eav/Model/AttributeManagementTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..82d83938db148ace03cedf19a89cf098517a1d56
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Eav/Model/AttributeManagementTest.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Eav\Model;
+
+class AttributeManagementTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Eav\Api\AttributeManagementInterface
+     */
+    private $model;
+
+    /**
+     * @var \Magento\Framework\ObjectManagerInterface
+     */
+    private $objectManager;
+
+    protected function setUp()
+    {
+        $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->model = $this->objectManager->create(\Magento\Eav\Api\AttributeManagementInterface::class);
+    }
+
+    /**
+     * Verify that collection in service used correctly
+     */
+    public function testGetList()
+    {
+        $productAttributeSetId = $this->getAttributeSetId(
+            \Magento\Catalog\Api\Data\ProductAttributeInterface::ENTITY_TYPE_CODE
+        );
+        $productAttributes = $this->model->getAttributes(
+            \Magento\Catalog\Api\Data\ProductAttributeInterface::ENTITY_TYPE_CODE,
+            $productAttributeSetId
+        );
+        // Verify that result contains only product attributes
+        $this->verifyAttributeSetIds($productAttributes, $productAttributeSetId);
+
+        $categoryAttributeSetId = $this->getAttributeSetId(
+            \Magento\Catalog\Api\Data\CategoryAttributeInterface::ENTITY_TYPE_CODE
+        );
+        $categoryAttributes = $this->model->getAttributes(
+            \Magento\Catalog\Api\Data\CategoryAttributeInterface::ENTITY_TYPE_CODE,
+            $categoryAttributeSetId
+        );
+        // Verify that result contains only category attributes
+        $this->verifyAttributeSetIds($categoryAttributes, $categoryAttributeSetId);
+    }
+
+    /**
+     * @param string $entityTypeCode
+     * @return int
+     */
+    private function getAttributeSetId($entityTypeCode)
+    {
+        /** @var \Magento\Eav\Model\Config $eavConfig */
+        $eavConfig = $this->objectManager->create(\Magento\Eav\Model\Config::class);
+        return $eavConfig->getEntityType($entityTypeCode)->getDefaultAttributeSetId();
+    }
+
+    /**
+     * @param array $items
+     * @param string $attributeSetId
+     * @return void
+     */
+    private function verifyAttributeSetIds(array $items, $attributeSetId)
+    {
+        /** @var \Magento\Eav\Model\Entity\Attribute\AbstractAttribute $item */
+        foreach ($items as $item) {
+            $this->assertEquals($attributeSetId, $item->getAttributeSetId());
+        }
+    }
+}