diff --git a/Gruntfile.js.sample b/Gruntfile.js.sample
index 44c5e897dd3fa9757263e4081559201e1f51cc20..3bd874be0480d97217d51a68f4b2da2fa98545ab 100644
--- a/Gruntfile.js.sample
+++ b/Gruntfile.js.sample
@@ -5,14 +5,19 @@
 
 // For performance use one level down: 'name/{,*/}*.js'
 // If you want to recursively match all subfolders, use: 'name/**/*.js'
+
 module.exports = function (grunt) {
     'use strict';
 
     var _ = require('underscore'),
         path = require('path'),
-        themes = require('./dev/tools/grunt/configs/themes'),
+        filesRouter = require('./dev/tools/grunt/tools/files-router'),
         configDir = './dev/tools/grunt/configs',
-        tasks = grunt.file.expand('./dev/tools/grunt/tasks/*');
+        tasks = grunt.file.expand('./dev/tools/grunt/tasks/*'),
+        themes;
+
+        filesRouter.set('themes', 'dev/tools/grunt/configs/themes');
+        themes = filesRouter.get('themes');
 
     tasks = _.map(tasks, function(task){ return task.replace('.js', '') });
     tasks.push('time-grunt');
diff --git a/app/code/Magento/Backend/Model/View/Result/Redirect.php b/app/code/Magento/Backend/Model/View/Result/Redirect.php
index 799a9f6c55b31e9a0b1a754fa4b4f34a7a52cedb..239d18acfd5cd377b7b1f59e16091ab688b671f3 100644
--- a/app/code/Magento/Backend/Model/View/Result/Redirect.php
+++ b/app/code/Magento/Backend/Model/View/Result/Redirect.php
@@ -10,6 +10,7 @@ use Magento\Backend\Model\Session;
 use Magento\Backend\Model\UrlInterface;
 use Magento\Framework\App;
 use Magento\Framework\App\ActionFlag;
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 
 class Redirect extends \Magento\Framework\Controller\Result\Redirect
 {
@@ -56,7 +57,7 @@ class Redirect extends \Magento\Framework\Controller\Result\Redirect
     /**
      * {@inheritdoc}
      */
-    protected function render(App\ResponseInterface $response)
+    protected function render(HttpResponseInterface $response)
     {
         $this->session->setIsUrlNotice($this->actionFlag->get('', AbstractAction::FLAG_IS_URLS_CHECKED));
         return parent::render($response);
diff --git a/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml b/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml
index e1f79d4c8aaf8ef5f1ccb2bcafa934d663010fe6..f5ffbb48e97a619db471049d5535b55d3ea0b3c8 100644
--- a/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml
+++ b/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml
@@ -69,6 +69,9 @@
                             <item name="fit" xsi:type="boolean">false</item>
                             <item name="label" xsi:type="string">Search String</item>
                             <item name="showFallbackReset" xsi:type="boolean">false</item>
+                            <item name="validation" xsi:type="array">
+                                <item name="required-entry" xsi:type="boolean">true</item>
+                            </item>
                         </item>
                     </argument>
                 </field>
@@ -82,6 +85,9 @@
                             <item name="fit" xsi:type="boolean">false</item>
                             <item name="label" xsi:type="string">Theme Name</item>
                             <item name="showFallbackReset" xsi:type="boolean">false</item>
+                            <item name="validation" xsi:type="array">
+                                <item name="required-entry" xsi:type="boolean">true</item>
+                            </item>
                         </item>
                     </argument>
                 </field>
diff --git a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/cells/action-delete.html b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/cells/action-delete.html
index 117eee7e69fdc9bfc92f9afde5868e9ec5206006..44c460825b45d809c67a5e40b89ccce48d7a0e41 100644
--- a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/cells/action-delete.html
+++ b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/cells/action-delete.html
@@ -11,5 +11,5 @@
                 title: $parent.deleteButtonLabel
             }
         ">
-    <span data-bind="text: $parent.deleteButtonLabel"></span>
+    <span translate="$parent.deleteButtonLabel"></span>
 </button>
diff --git a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html
index 6e24ee96a62a07f76832113eb7f77841b542424a..63a3196ff3385f2db16d08267f5ddcc71f4f984e 100644
--- a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html
+++ b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html
@@ -16,7 +16,7 @@
                 class="action-secondary"
                 type="button"
                 click="processingAddChild.bind($data, false, false, false)">
-            <span text="addButtonLabel"/>
+            <span translate="addButtonLabel"/>
         </button>
     </div>
 
@@ -30,7 +30,7 @@
      css="element.setClasses(element)"
      attr="'data-index': index">
     <label if="element.label" class="admin__field-label" attr="for: element.uid">
-        <span text="element.label"/>
+        <span translate="element.label"/>
     </label>
 
     <div class="admin__field-control" data-role="grid-wrapper">
@@ -51,7 +51,7 @@
 
                         <th repeat="foreach: labels, item: '$label'"
                             class="data-grid-th"
-                            text="$label().label"
+                            translate="$label().label"
                             visible="$label().visible"
                             disable="$label().disabled"
                             css="setClasses($label())">
diff --git a/app/code/Magento/Braintree/Gateway/Command/CaptureStrategyCommand.php b/app/code/Magento/Braintree/Gateway/Command/CaptureStrategyCommand.php
index 3119042b776e2cb59598f628244f72620fba5d6a..a03546b36604587fbea2158890d183570ba4015a 100644
--- a/app/code/Magento/Braintree/Gateway/Command/CaptureStrategyCommand.php
+++ b/app/code/Magento/Braintree/Gateway/Command/CaptureStrategyCommand.php
@@ -166,16 +166,25 @@ class CaptureStrategyCommand implements CommandInterface
      */
     private function isExistsCaptureTransaction(OrderPaymentInterface $payment)
     {
-        $filters[] = $this->filterBuilder->setField('payment_id')
-            ->setValue($payment->getId())
-            ->create();
+        $this->searchCriteriaBuilder->addFilters(
+            [
+                $this->filterBuilder
+                    ->setField('payment_id')
+                    ->setValue($payment->getId())
+                    ->create(),
+            ]
+        );
 
-        $filters[] = $this->filterBuilder->setField('txn_type')
-            ->setValue(TransactionInterface::TYPE_CAPTURE)
-            ->create();
+        $this->searchCriteriaBuilder->addFilters(
+            [
+                $this->filterBuilder
+                    ->setField('txn_type')
+                    ->setValue(TransactionInterface::TYPE_CAPTURE)
+                    ->create(),
+            ]
+        );
 
-        $searchCriteria = $this->searchCriteriaBuilder->addFilters($filters)
-            ->create();
+        $searchCriteria = $this->searchCriteriaBuilder->create();
 
         $count = $this->transactionRepository->getList($searchCriteria)->getTotalCount();
         return (boolean) $count;
diff --git a/app/code/Magento/Braintree/Gateway/Config/Config.php b/app/code/Magento/Braintree/Gateway/Config/Config.php
index 59cd8f7a75aa3f66fe3e4b3c4b1fc71c0113189a..774b8e365368f0f843c239ffeaaa3855dd7249e8 100644
--- a/app/code/Magento/Braintree/Gateway/Config/Config.php
+++ b/app/code/Magento/Braintree/Gateway/Config/Config.php
@@ -193,4 +193,14 @@ class Config extends \Magento\Payment\Gateway\Config\Config
         }
         return $values;
     }
+
+    /**
+     * Get Merchant account ID
+     *
+     * @return string
+     */
+    public function getMerchantAccountId()
+    {
+        return $this->getValue(self::KEY_MERCHANT_ACCOUNT_ID);
+    }
 }
diff --git a/app/code/Magento/Braintree/Gateway/Request/PaymentDataBuilder.php b/app/code/Magento/Braintree/Gateway/Request/PaymentDataBuilder.php
index 9591d24465487d686771274abf0f800f9e2b337f..dd038e1f9f259304ff7f297732dbe0fad159fbae 100644
--- a/app/code/Magento/Braintree/Gateway/Request/PaymentDataBuilder.php
+++ b/app/code/Magento/Braintree/Gateway/Request/PaymentDataBuilder.php
@@ -87,7 +87,7 @@ class PaymentDataBuilder implements BuilderInterface
             self::ORDER_ID => $order->getOrderIncrementId()
         ];
 
-        $merchantAccountId = $this->config->getValue(Config::KEY_MERCHANT_ACCOUNT_ID);
+        $merchantAccountId = $this->config->getMerchantAccountId();
         if (!empty($merchantAccountId)) {
             $result[self::MERCHANT_ACCOUNT_ID] = $merchantAccountId;
         }
diff --git a/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php b/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
index 77c83707bfc67aefb45f3ce5bb99b6183ac012e9..76788c3c1451073f0ecff3ca578ce384b98d1886 100644
--- a/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
+++ b/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Braintree\Model\Ui;
 
+use Magento\Braintree\Gateway\Request\PaymentDataBuilder;
 use Magento\Checkout\Model\ConfigProviderInterface;
 use Magento\Braintree\Gateway\Config\Config;
 use Magento\Braintree\Model\Adapter\BraintreeAdapter;
@@ -86,7 +87,14 @@ final class ConfigProvider implements ConfigProviderInterface
     public function getClientToken()
     {
         if (empty($this->clientToken)) {
-            $this->clientToken = $this->adapter->generate();
+            $params = [];
+
+            $merchantAccountId = $this->config->getMerchantAccountId();
+            if (!empty($merchantAccountId)) {
+                $params[PaymentDataBuilder::MERCHANT_ACCOUNT_ID] = $merchantAccountId;
+            }
+
+            $this->clientToken = $this->adapter->generate($params);
         }
 
         return $this->clientToken;
diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Command/CaptureStrategyCommandTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Command/CaptureStrategyCommandTest.php
index fda3e85d167c28438afd5b084bb14c9b019f2da3..9665afa1f3655aafe9ab1ce5e8bc529ff0483cd8 100644
--- a/app/code/Magento/Braintree/Test/Unit/Gateway/Command/CaptureStrategyCommandTest.php
+++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Command/CaptureStrategyCommandTest.php
@@ -374,7 +374,7 @@ class CaptureStrategyCommandTest extends \PHPUnit_Framework_TestCase
             ->willReturnSelf();
 
         $searchCriteria = new SearchCriteria();
-        $this->searchCriteriaBuilder->expects(static::once())
+        $this->searchCriteriaBuilder->expects(static::exactly(2))
             ->method('addFilters')
             ->willReturnSelf();
         $this->searchCriteriaBuilder->expects(static::once())
diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php
index 47a9a49670eb43dca9a36270c7f074d444970227..7d30651c69e4230fd2a54ffa5250ad176a5792be 100644
--- a/app/code/Magento/Braintree/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php
+++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Request/PaymentDataBuilderTest.php
@@ -133,8 +133,7 @@ class PaymentDataBuilderTest extends \PHPUnit_Framework_TestCase
             ->willReturnMap($additionalData);
 
         $this->configMock->expects(static::once())
-            ->method('getValue')
-            ->with(Config::KEY_MERCHANT_ACCOUNT_ID)
+            ->method('getMerchantAccountId')
             ->willReturn(self::MERCHANT_ACCOUNT_ID);
 
         $this->paymentDO->expects(static::once())
diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Request/VaultCaptureDataBuilderTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Request/VaultCaptureDataBuilderTest.php
index a5d89fb0e23e4fd6de8a22be2d7a21b6d631d7e0..165bc94aa68429b1ffe447975622a266817b55d9 100644
--- a/app/code/Magento/Braintree/Test/Unit/Gateway/Request/VaultCaptureDataBuilderTest.php
+++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Request/VaultCaptureDataBuilderTest.php
@@ -80,7 +80,7 @@ class VaultCaptureDataBuilderTest extends \PHPUnit_Framework_TestCase
         $paymentExtension = $this->getMockBuilder(OrderPaymentExtension::class)
             ->setMethods(['getVaultPaymentToken'])
             ->disableOriginalConstructor()
-            ->getMock();
+            ->getMockForAbstractClass();
 
         $paymentToken = $this->getMockBuilder(PaymentToken::class)
             ->disableOriginalConstructor()
diff --git a/app/code/Magento/Braintree/Test/Unit/Model/Ui/ConfigProviderTest.php b/app/code/Magento/Braintree/Test/Unit/Model/Ui/ConfigProviderTest.php
index 9147b0632583ab050f5cb76447bc61acdaea4950..04846f369eba9621f14baba9cec0d6cb7b455e0a 100644
--- a/app/code/Magento/Braintree/Test/Unit/Model/Ui/ConfigProviderTest.php
+++ b/app/code/Magento/Braintree/Test/Unit/Model/Ui/ConfigProviderTest.php
@@ -18,8 +18,8 @@ use PHPUnit_Framework_MockObject_MockObject as MockObject;
 class ConfigProviderTest extends \PHPUnit_Framework_TestCase
 {
     const SDK_URL = 'https://js.braintreegateway.com/v2/braintree.js';
-
     const CLIENT_TOKEN = 'token';
+    const MERCHANT_ACCOUNT_ID = '245345';
 
     /**
      * @var Config|MockObject
@@ -76,11 +76,17 @@ class ConfigProviderTest extends \PHPUnit_Framework_TestCase
 
     /**
      * @covers \Magento\Braintree\Model\Ui\ConfigProvider::getClientToken
+     * @dataProvider getClientTokenDataProvider
      */
-    public function testGetClientToken()
+    public function testGetClientToken($merchantAccountId, $params)
     {
+        $this->config->expects(static::once())
+            ->method('getMerchantAccountId')
+            ->willReturn($merchantAccountId);
+
         $this->braintreeAdapter->expects(static::once())
             ->method('generate')
+            ->with($params)
             ->willReturn(self::CLIENT_TOKEN);
 
         static::assertEquals(self::CLIENT_TOKEN, $this->configProvider->getClientToken());
@@ -140,4 +146,21 @@ class ConfigProviderTest extends \PHPUnit_Framework_TestCase
             ]
         ];
     }
+
+    /**
+     * @return array
+     */
+    public function getClientTokenDataProvider()
+    {
+        return [
+            [
+                'merchantAccountId' => '',
+                'params' => []
+            ],
+            [
+                'merchantAccountId' => self::MERCHANT_ACCOUNT_ID,
+                'params' => ['merchantAccountId' => self::MERCHANT_ACCOUNT_ID]
+            ]
+        ];
+    }
 }
diff --git a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php
index d452888fa54960a0a65df7f73e7f6077df32b300..8305bb0137ed2b091b0d70916917276dcfc4b7a7 100644
--- a/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php
+++ b/app/code/Magento/Bundle/Helper/Catalog/Product/Configuration.php
@@ -142,6 +142,7 @@ class Configuration extends AbstractHelper implements ConfigurationInterface
                                     . $this->pricingHelper->currency(
                                         $this->getSelectionFinalPrice($item, $bundleSelection)
                                     );
+                                $option['has_html'] = true;
                             }
                         }
 
diff --git a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php
index 2f560d5294c91ebf85d4f041c5e4141681efec1c..0919e95a9a09de549758c79a0f94eab871598a90 100644
--- a/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Helper/Catalog/Product/ConfigurationTest.php
@@ -164,6 +164,9 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals([], $this->helper->getBundleOptions($this->item));
     }
 
+    /**
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
+     */
     public function testGetOptions()
     {
         $optionIds = 'a:1:{i:0;i:1;}';
@@ -254,8 +257,12 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals(
             [
-                0 => ['label' => 'title', 'value' => [0 => '1 x name <span class="price">$15.00</span>']],
-                1 => ['label' => 'title', 'value' => 'value'],
+                [
+                    'label' => 'title',
+                    'value' => ['1 x name <span class="price">$15.00</span>'],
+                    'has_html' => true,
+                ],
+                ['label' => 'title', 'value' => 'value'],
             ],
             $this->helper->getOptions($this->item)
         );
diff --git a/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml
index 3ec8f108bc18d2d121bb61d423f1db96869dbf1f..1aceb9ff95d3acd379586a75a7be88f39986bb8c 100644
--- a/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml
+++ b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml
@@ -19,7 +19,7 @@
             id="captcha"
             class="admin__control-text"
             type="text"
-            name="<?php /* @escapeNotVerified */ echo \Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE ?>[<?php /* @escapeNotVerified */ echo $block->getFormId()?>]"
+            name="<?php echo $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?php echo $block->escapeHtml($block->getFormId())?>]"
             data-validate="{required:true}"/>
         <?php if ($captcha->isCaseSensitive()) :?>
             <div class="admin__field-note">
@@ -32,19 +32,19 @@
     <img
         id="captcha-reload"
         class="captcha-reload"
-        src="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('Magento_Captcha::reload.png') ?>"
+        src="<?php echo $block->escapeUrl($block->getViewFileUrl('Magento_Captcha::reload.png')) ?>"
         alt="<?php /* @escapeNotVerified */ echo __('Reload captcha') ?>"/>
     <img
-        id="<?php /* @escapeNotVerified */ echo $block->getFormId() ?>"
-        width="<?php /* @escapeNotVerified */ echo $block->getImgWidth() ?>"
-        height="<?php /* @escapeNotVerified */ echo $block->getImgHeight() ?>"
-        src="<?php /* @escapeNotVerified */ echo $captcha->getImgSrc() ?>" />
+        id="<?php echo $block->escapeHtmlAttr($block->getFormId()) ?>"
+        width="<?php /* @noEscape */ echo (float) $block->getImgWidth() ?>"
+        height="<?php /* @noEscape */ echo (float) $block->getImgHeight() ?>"
+        src="<?php echo $block->escapeUrl($captcha->getImgSrc()) ?>" />
 </div>
 <script>
     require(["prototype", "mage/captcha"], function(){
 
 //<![CDATA[
-        var captcha = new Captcha('<?php /* @escapeNotVerified */ echo $block->getRefreshUrl() ?>', '<?php /* @escapeNotVerified */ echo $block->getFormId() ?>');
+        var captcha = new Captcha('<?php echo $block->escapeUrl($block->getRefreshUrl()) ?>', '<?php echo $block->escapeJs($block->getFormId()) ?>');
 
         $('captcha-reload').observe('click', function () {
             captcha.refresh(this);
diff --git a/app/code/Magento/Captcha/view/frontend/templates/default.phtml b/app/code/Magento/Captcha/view/frontend/templates/default.phtml
index d97d2922c02cb875b3d80d6e53ee5087dc50132b..4046b5f96ecea6fa9a62a96b7e9582e7baa005d0 100644
--- a/app/code/Magento/Captcha/view/frontend/templates/default.phtml
+++ b/app/code/Magento/Captcha/view/frontend/templates/default.phtml
@@ -10,19 +10,19 @@
 <?php /* @var $captcha \Magento\Captcha\Model\DefaultModel */ ?>
 <?php /* @var $block \Magento\Captcha\Block\Captcha\DefaultCaptcha */ ?>
 <?php $captcha = $block->getCaptchaModel() ?>
-<div class="field captcha required" role="<?php /* @escapeNotVerified */ echo $block->getFormId()?>">
-    <label for="captcha_<?php /* @escapeNotVerified */ echo $block->getFormId() ?>" class="label"><span><?php /* @escapeNotVerified */ echo __('Please type the letters below')?></span></label>
+<div class="field captcha required" role="<?php echo $block->escapeHtmlAttr($block->getFormId())?>">
+    <label for="captcha_<?php echo $block->escapeHtmlAttr($block->getFormId()) ?>" class="label"><span><?php /* @escapeNotVerified */ echo __('Please type the letters below')?></span></label>
     <div class="control captcha">
-        <input name="<?php /* @escapeNotVerified */ echo \Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE ?>[<?php /* @escapeNotVerified */ echo $block->getFormId()?>]" type="text" class="input-text required-entry" data-validate="{required:true}" id="captcha_<?php /* @escapeNotVerified */ echo $block->getFormId() ?>" />
+        <input name="<?php echo $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?php echo $block->escapeHtmlAttr($block->getFormId())?>]" type="text" class="input-text required-entry" data-validate="{required:true}" id="captcha_<?php echo $block->escapeHtmlAttr($block->getFormId()) ?>" />
         <div class="nested">
             <div class="field captcha no-label"
-                 data-captcha="<?php /* @escapeNotVerified */ echo $block->getFormId()?>"
-                 id="captcha-container-<?php /* @escapeNotVerified */ echo $block->getFormId()?>"
-                 data-mage-init='{"captcha":{"url": "<?php /* @escapeNotVerified */ echo $block->getRefreshUrl()?>",
-                                            "imageLoader": "<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-2.gif') ?>",
-                                             "type": "<?php /* @escapeNotVerified */ echo $block->getFormId() ?>"}}'>
+                 data-captcha="<?php echo $block->escapeHtmlAttr($block->getFormId())?>"
+                 id="captcha-container-<?php echo $block->escapeHtmlAttr($block->getFormId())?>"
+                 data-mage-init='{"captcha":{"url": "<?php echo $block->escapeUrl($block->getRefreshUrl())?>",
+                                            "imageLoader": "<?php echo $block->escapeUrl($block->getViewFileUrl('images/loader-2.gif')) ?>",
+                                             "type": "<?php echo $block->escapeHtmlAttr($block->getFormId()) ?>"}}'>
                 <div class="control captcha-image">
-                    <img alt="<?php /* @escapeNotVerified */ echo __('Please type the letters below')?>" class="captcha-img" height="<?php /* @escapeNotVerified */ echo $block->getImgHeight() ?>" src="<?php /* @escapeNotVerified */ echo $captcha->getImgSrc() ?>"/>
+                    <img alt="<?php /* @escapeNotVerified */ echo __('Please type the letters below')?>" class="captcha-img" height="<?php /* @noEscape */ echo (float) $block->getImgHeight() ?>" src="<?php echo $block->escapeUrl($captcha->getImgSrc()) ?>"/>
                     <button type="button" class="action reload captcha-reload" title="<?php /* @escapeNotVerified */ echo __('Reload captcha') ?>"><span><?php /* @escapeNotVerified */ echo __('Reload captcha') ?></span></button>
                 </div>
             </div>
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php
index 172d1cf65d2fb82d44098b78fc14a3119015ebeb..95541d864b8f76bef3e403985106ee91ae66c09f 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Widget/Chooser.php
@@ -121,7 +121,7 @@ class Chooser extends \Magento\Catalog\Block\Adminhtml\Category\Tree
                 }
             ';
         } else {
-            $chooserJsObject = $this->getId();
+            $chooserJsObject = $this->escapeJs($this->getId());
             $js = '
                 function (node, e) {
                     ' .
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php
index 7012a80ed935ac18a534086eefad427724cf1c12..ee6d75ff927a426c4f9cb0652821524bcc451b0b 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Widget/Chooser.php
@@ -202,7 +202,7 @@ class Chooser extends Extended
                 {jsObject}.categoryName = node.attributes.id != "none" ? node.text : false;
             }
         ';
-        $js = str_replace('{jsObject}', $this->getJsObjectName(), $js);
+        $js = str_replace('{jsObject}', $this->escapeJs($this->getJsObjectName()), $js);
         return $js;
     }
 
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php
index 764040e9cfeb866d1461cc876eaf9d8cdc8170e3..e4ad1959214236b77bb600b996013d91389d4ee1 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php
@@ -132,7 +132,7 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Action\Attribut
                         $attributesData[$attributeCode] = $value;
                     } elseif ($attribute->getFrontendInput() == 'multiselect') {
                         // Check if 'Change' checkbox has been checked by admin for this attribute
-                        $isChanged = (bool)$this->getRequest()->getPost($attributeCode . '_checkbox');
+                        $isChanged = (bool)$this->getRequest()->getPost('toggle_' . $attributeCode);
                         if (!$isChanged) {
                             unset($attributesData[$attributeCode]);
                             continue;
diff --git a/app/code/Magento/Catalog/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/ProductCategoryFilter.php b/app/code/Magento/Catalog/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/ProductCategoryFilter.php
new file mode 100644
index 0000000000000000000000000000000000000000..91c3d894354f0145323b3595d8212962ba6501ee
--- /dev/null
+++ b/app/code/Magento/Catalog/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/ProductCategoryFilter.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Catalog\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Catalog\Model\ResourceModel\Product\Collection;
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class ProductCategoryFilter implements CustomFilterInterface
+{
+    /**
+     * Apply category_id Filter to Product Collection
+     *
+     * @param Filter $filter
+     * @param AbstractDb $collection
+     * @return bool Whether the filter is applied
+     */
+    public function apply(Filter $filter, AbstractDb $collection)
+    {
+        $conditionType = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
+        $categoryFilter = [$conditionType => [$filter->getValue()]];
+
+        /** @var Collection $collection */
+        $collection->addCategoriesFilter($categoryFilter);
+
+        return true;
+    }
+}
diff --git a/app/code/Magento/Catalog/Model/CategoryList.php b/app/code/Magento/Catalog/Model/CategoryList.php
index b739c5bf46354ee290c481dfecf6534c832d5c11..7e701123e99a99d36d52771687a9e572935d9eeb 100644
--- a/app/code/Magento/Catalog/Model/CategoryList.php
+++ b/app/code/Magento/Catalog/Model/CategoryList.php
@@ -12,10 +12,8 @@ use Magento\Catalog\Api\Data\CategorySearchResultsInterfaceFactory;
 use Magento\Catalog\Model\ResourceModel\Category\Collection;
 use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory;
 use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface;
-use Magento\Framework\Api\Search\FilterGroup;
 use Magento\Framework\Api\SearchCriteriaInterface;
-use Magento\Framework\Api\SortOrder;
-use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 
 class CategoryList implements CategoryListInterface
 {
@@ -39,22 +37,30 @@ class CategoryList implements CategoryListInterface
      */
     private $categoryRepository;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param CollectionFactory $categoryCollectionFactory
      * @param JoinProcessorInterface $extensionAttributesJoinProcessor
      * @param CategorySearchResultsInterfaceFactory $categorySearchResultsFactory
      * @param CategoryRepositoryInterface $categoryRepository
+     * @param CollectionProcessorInterface $collectionProcessor
      */
     public function __construct(
         CollectionFactory $categoryCollectionFactory,
         JoinProcessorInterface $extensionAttributesJoinProcessor,
         CategorySearchResultsInterfaceFactory $categorySearchResultsFactory,
-        CategoryRepositoryInterface $categoryRepository
+        CategoryRepositoryInterface $categoryRepository,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->categoryCollectionFactory = $categoryCollectionFactory;
         $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
         $this->categorySearchResultsFactory = $categorySearchResultsFactory;
         $this->categoryRepository = $categoryRepository;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -66,23 +72,7 @@ class CategoryList implements CategoryListInterface
         $collection = $this->categoryCollectionFactory->create();
         $this->extensionAttributesJoinProcessor->process($collection);
 
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
-
-        /** @var SortOrder $sortOrder */
-        $sortOrders = $searchCriteria->getSortOrders();
-        if ($sortOrders) {
-            foreach ($sortOrders as $sortOrder) {
-                $collection->addOrder(
-                    $sortOrder->getField(),
-                    ($sortOrder->getDirection() === SortOrder::SORT_ASC) ? SortOrder::SORT_ASC : SortOrder::SORT_DESC
-                );
-            }
-        }
-
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
+        $this->collectionProcessor->process($searchCriteria, $collection);
 
         $items = [];
         foreach ($collection->getAllIds() as $id) {
@@ -98,22 +88,18 @@ class CategoryList implements CategoryListInterface
     }
 
     /**
-     * Add filter group to collection
+     * Retrieve collection processor
      *
-     * @param FilterGroup $filterGroup
-     * @param Collection $collection
-     * @return void
+     * @deprecated
+     * @return CollectionProcessorInterface
      */
-    private function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection)
+    private function getCollectionProcessor()
     {
-        $filters = $filterGroup->getFilters();
-        if ($filters) {
-            $fields = [];
-            foreach ($filters as $filter) {
-                $conditionType = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-                $fields[] = ['attribute' => $filter->getField(), $conditionType => $filter->getValue()];
-            }
-            $collection->addFieldToFilter($fields);
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor'
+            );
         }
+        return $this->collectionProcessor;
     }
 }
diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php
index b1fbe6aed9387455f6794d284171b7558a22afb2..603e566f14fa10c5ef39ce3ac1da20f200b791a3 100644
--- a/app/code/Magento/Catalog/Model/Product.php
+++ b/app/code/Magento/Catalog/Model/Product.php
@@ -1468,7 +1468,10 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
         if (!$this->hasData('media_gallery_images') && is_array($this->getMediaGallery('images'))) {
             $images = $this->_collectionFactory->create();
             foreach ($this->getMediaGallery('images') as $image) {
-                if ((isset($image['disabled']) && $image['disabled']) || empty($image['value_id'])) {
+                if ((isset($image['disabled']) && $image['disabled'])
+                    || empty($image['value_id'])
+                    || $images->getItemById($image['value_id']) != null
+                ) {
                     continue;
                 }
                 $image['url'] = $this->getMediaConfig()->getMediaUrl($image['file']);
diff --git a/app/code/Magento/Catalog/Model/ProductRepository.php b/app/code/Magento/Catalog/Model/ProductRepository.php
index 696f5e40443ca12a5786bb9ee56153ae8e350c61..9ceaa8bc9d0498ea6db05e4574991fc2c466c6e3 100644
--- a/app/code/Magento/Catalog/Model/ProductRepository.php
+++ b/app/code/Magento/Catalog/Model/ProductRepository.php
@@ -13,7 +13,7 @@ use Magento\Framework\Api\Data\ImageContentInterface;
 use Magento\Framework\Api\Data\ImageContentInterfaceFactory;
 use Magento\Framework\Api\ImageContentValidatorInterface;
 use Magento\Framework\Api\ImageProcessorInterface;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\DB\Adapter\ConnectionException;
 use Magento\Framework\DB\Adapter\DeadlockException;
 use Magento\Framework\DB\Adapter\LockWaitException;
@@ -135,6 +135,11 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
      */
     protected $mediaGalleryProcessor;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * ProductRepository constructor.
      * @param ProductFactory $productFactory
@@ -157,6 +162,7 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
      * @param MimeTypeExtensionMap $mimeTypeExtensionMap
      * @param ImageProcessorInterface $imageProcessor
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
@@ -180,7 +186,8 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
         ImageContentInterfaceFactory $contentFactory,
         MimeTypeExtensionMap $mimeTypeExtensionMap,
         ImageProcessorInterface $imageProcessor,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->productFactory = $productFactory;
         $this->collectionFactory = $collectionFactory;
@@ -199,6 +206,7 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
         $this->contentFactory = $contentFactory;
         $this->imageProcessor = $imageProcessor;
         $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -621,20 +629,8 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
         $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');
         $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');
 
-        //Add filters from root filter group to the collection
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
-        /** @var SortOrder $sortOrder */
-        foreach ((array)$searchCriteria->getSortOrders() as $sortOrder) {
-            $field = $sortOrder->getField();
-            $collection->addOrder(
-                $field,
-                ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-            );
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
+        $this->collectionProcessor->process($searchCriteria, $collection);
+
         $collection->load();
 
         $searchResult = $this->searchResultsFactory->create();
@@ -647,6 +643,7 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
     /**
      * Helper function that adds a FilterGroup to the collection.
      *
+     * @deprecated
      * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
@@ -698,4 +695,20 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
         }
         return $this->mediaGalleryProcessor;
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor'
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/LinkedProductSelectBuilderByIndexPrice.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/LinkedProductSelectBuilderByIndexPrice.php
index a5fd809e5cc243e5832d911ac8b0c24effe2927e..ea72691ea003939fc277299bee214da316f4f757 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/LinkedProductSelectBuilderByIndexPrice.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/LinkedProductSelectBuilderByIndexPrice.php
@@ -56,15 +56,16 @@ class LinkedProductSelectBuilderByIndexPrice implements LinkedProductSelectBuild
     public function build($productId)
     {
         $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
+        $productTable = $this->resource->getTableName('catalog_product_entity');
 
         return [$this->resource->getConnection()->select()
-            ->from(['parent' => 'catalog_product_entity'], '')
+            ->from(['parent' => $productTable], '')
             ->joinInner(
                 ['link' => $this->resource->getTableName('catalog_product_relation')],
                 "link.parent_id = parent.$linkField",
                 []
             )->joinInner(
-                ['child' => 'catalog_product_entity'],
+                ['child' => $productTable],
                 "child.entity_id = link.child_id",
                 ['entity_id']
             )->joinInner(
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByBasePrice.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByBasePrice.php
index 934c094fecb7bfff799367b5d18ddf08977103c9..d325ab1a9a08d1175c0fedb2a94c10ac5d7dc3c2 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByBasePrice.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByBasePrice.php
@@ -65,14 +65,16 @@ class LinkedProductSelectBuilderByBasePrice implements LinkedProductSelectBuilde
     {
         $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
         $priceAttribute = $this->eavConfig->getAttribute(Product::ENTITY, 'price');
+        $productTable = $this->resource->getTableName('catalog_product_entity');
+
         $priceSelect = $this->resource->getConnection()->select()
-            ->from(['parent' => 'catalog_product_entity'], '')
+            ->from(['parent' => $productTable], '')
             ->joinInner(
                 ['link' => $this->resource->getTableName('catalog_product_relation')],
                 "link.parent_id = parent.$linkField",
                 []
             )->joinInner(
-                ['child' => 'catalog_product_entity'],
+                ['child' => $productTable],
                 "child.entity_id = link.child_id",
                 ['entity_id']
             )->joinInner(
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderBySpecialPrice.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderBySpecialPrice.php
index 77c786ed185cd6deb616379507c328326fed8a65..792a8f5b86d102204a93491c0413ae2839b16a73 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderBySpecialPrice.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderBySpecialPrice.php
@@ -86,15 +86,16 @@ class LinkedProductSelectBuilderBySpecialPrice implements LinkedProductSelectBui
         $specialPriceToDate = $this->eavConfig->getAttribute(Product::ENTITY, 'special_to_date');
         $timestamp = $this->localeDate->scopeTimeStamp($this->storeManager->getStore());
         $currentDate = $this->dateTime->formatDate($timestamp, false);
+        $productTable = $this->resource->getTableName('catalog_product_entity');
 
         $specialPrice = $this->resource->getConnection()->select()
-            ->from(['parent' => 'catalog_product_entity'], '')
+            ->from(['parent' => $productTable], '')
             ->joinInner(
                 ['link' => $this->resource->getTableName('catalog_product_relation')],
                 "link.parent_id = parent.$linkField",
                 []
             )->joinInner(
-                ['child' => 'catalog_product_entity'],
+                ['child' => $productTable],
                 "child.entity_id = link.child_id",
                 ['entity_id']
             )->joinInner(
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByTierPrice.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByTierPrice.php
index 399dffe14c991ff392889e1610644480b7c105f5..d2d6d89c0a2a5828290e1191147451e4f6d20b7b 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByTierPrice.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByTierPrice.php
@@ -68,14 +68,16 @@ class LinkedProductSelectBuilderByTierPrice implements LinkedProductSelectBuilde
     public function build($productId)
     {
         $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
+        $productTable = $this->resource->getTableName('catalog_product_entity');
+
         $priceSelect = $this->resource->getConnection()->select()
-            ->from(['parent' => 'catalog_product_entity'], '')
+            ->from(['parent' => $productTable], '')
             ->joinInner(
                 ['link' => $this->resource->getTableName('catalog_product_relation')],
                 "link.parent_id = parent.$linkField",
                 []
             )->joinInner(
-                ['child' => 'catalog_product_entity'],
+                ['child' => $productTable],
                 "child.entity_id = link.child_id",
                 ['entity_id']
             )->joinInner(
diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/ProductCategoryFilterTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/ProductCategoryFilterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..86555f628a2f8b3842f92dd954a3412b5f1409e4
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/ProductCategoryFilterTest.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Catalog\Test\Unit\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Catalog\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\ProductCategoryFilter;
+use Magento\Catalog\Model\ResourceModel\Product\Collection;
+use Magento\Framework\Api\Filter;
+
+class ProductCategoryFilterTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var ProductCategoryFilter */
+    private $model;
+
+    protected function setUp()
+    {
+        $this->model = new ProductCategoryFilter();
+    }
+
+    public function testApply()
+    {
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterMock */
+        $filterMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        /** @var Collection|\PHPUnit_Framework_MockObject_MockObject $collectionMock */
+        $collectionMock = $this->getMockBuilder(Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $filterMock->expects($this->exactly(2))
+            ->method('getConditionType')
+            ->willReturn('condition');
+        $filterMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn('value');
+
+        $collectionMock->expects($this->once())
+            ->method('addCategoriesFilter')
+            ->with(['condition' => ['value']]);
+
+        $this->assertTrue($this->model->apply($filterMock, $collectionMock));
+    }
+
+    public function testApplyWithoutCondition()
+    {
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterMock */
+        $filterMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        /** @var Collection|\PHPUnit_Framework_MockObject_MockObject $collectionMock */
+        $collectionMock = $this->getMockBuilder(Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $filterMock->expects($this->once())
+            ->method('getConditionType')
+            ->willReturn(null);
+        $filterMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn('value');
+
+        $collectionMock->expects($this->once())
+            ->method('addCategoriesFilter')
+            ->with(['eq' => ['value']]);
+
+        $this->assertTrue($this->model->apply($filterMock, $collectionMock));
+    }
+}
diff --git a/app/code/Magento/Catalog/Test/Unit/Model/CategoryListTest.php b/app/code/Magento/Catalog/Test/Unit/Model/CategoryListTest.php
index 4f72f43485bc77082bdc8401235df57bf2307515..5703f6fe2dfde75c6fa4e9b8cdf5a72a9f0e7599 100644
--- a/app/code/Magento/Catalog/Test/Unit/Model/CategoryListTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Model/CategoryListTest.php
@@ -11,10 +11,8 @@ use Magento\Catalog\Model\Category;
 use Magento\Catalog\Model\CategoryList;
 use Magento\Catalog\Model\ResourceModel\Category\Collection;
 use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface;
-use Magento\Framework\Api\Filter;
-use Magento\Framework\Api\Search\FilterGroup;
 use Magento\Framework\Api\SearchCriteriaInterface;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
 use Magento\Catalog\Api\Data\CategorySearchResultsInterfaceFactory;
@@ -49,6 +47,11 @@ class CategoryListTest extends \PHPUnit_Framework_TestCase
      */
     private $categoryRepository;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessorMock;
+
     protected function setUp()
     {
         $this->categoryCollectionFactory = $this->getMockBuilder(CollectionFactory::class)
@@ -61,6 +64,8 @@ class CategoryListTest extends \PHPUnit_Framework_TestCase
             ->setMethods(['create'])
             ->getMock();
         $this->categoryRepository = $this->getMock(CategoryRepositoryInterface::class);
+        $this->collectionProcessorMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
 
         $this->model = (new ObjectManager($this))->getObject(
             CategoryList::class,
@@ -69,17 +74,13 @@ class CategoryListTest extends \PHPUnit_Framework_TestCase
                 'extensionAttributesJoinProcessor' => $this->extensionAttributesJoinProcessor,
                 'categorySearchResultsFactory' => $this->categorySearchResultsFactory,
                 'categoryRepository' => $this->categoryRepository,
+                'collectionProcessor' => $this->collectionProcessorMock,
             ]
         );
     }
 
     public function testGetList()
     {
-        $fieldName = 'field_1';
-        $value = 'value_1';
-        $conditionType = 'eq';
-        $currentPage = 2;
-        $pageSize = 1;
         $totalCount = 2;
         $categoryIdFirst = 1;
         $categoryIdSecond = 2;
@@ -87,35 +88,17 @@ class CategoryListTest extends \PHPUnit_Framework_TestCase
         $categoryFirst = $this->getMockBuilder(Category::class)->disableOriginalConstructor()->getMock();
         $categorySecond = $this->getMockBuilder(Category::class)->disableOriginalConstructor()->getMock();
 
-        $filter = $this->getMockBuilder(Filter::class)->disableOriginalConstructor()->getMock();
-        $filter->expects($this->atLeastOnce())->method('getConditionType')->willReturn($conditionType);
-        $filter->expects($this->atLeastOnce())->method('getField')->willReturn($fieldName);
-        $filter->expects($this->once())->method('getValue')->willReturn($value);
-
-        $filterGroup = $this->getMockBuilder(FilterGroup::class)->disableOriginalConstructor()->getMock();
-        $filterGroup->expects($this->once())->method('getFilters')->willReturn([$filter]);
-
-        $sortOrder = $this->getMockBuilder(SortOrder::class)->disableOriginalConstructor()->getMock();
-        $sortOrder->expects($this->once())->method('getField')->willReturn($fieldName);
-        $sortOrder->expects($this->once())->method('getDirection')->willReturn(SortOrder::SORT_ASC);
-
         /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteria */
         $searchCriteria = $this->getMock(SearchCriteriaInterface::class);
-        $searchCriteria->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroup]);
-        $searchCriteria->expects($this->once())->method('getCurrentPage')->willReturn($currentPage);
-        $searchCriteria->expects($this->once())->method('getPageSize')->willReturn($pageSize);
-        $searchCriteria->expects($this->once())->method('getSortOrders')->willReturn([$sortOrder]);
 
         $collection = $this->getMockBuilder(Collection::class)->disableOriginalConstructor()->getMock();
-        $collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->with([['attribute' => $fieldName, $conditionType => $value]]);
-        $collection->expects($this->once())->method('addOrder')->with($fieldName, SortOrder::SORT_ASC);
-        $collection->expects($this->once())->method('setCurPage')->with($currentPage);
-        $collection->expects($this->once())->method('setPageSize')->with($pageSize);
         $collection->expects($this->once())->method('getSize')->willReturn($totalCount);
         $collection->expects($this->once())->method('getAllIds')->willReturn([$categoryIdFirst, $categoryIdSecond]);
 
+        $this->collectionProcessorMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteria, $collection);
+
         $searchResult = $this->getMock(CategorySearchResultsInterface::class);
         $searchResult->expects($this->once())->method('setSearchCriteria')->with($searchCriteria);
         $searchResult->expects($this->once())->method('setItems')->with([$categoryFirst, $categorySecond]);
diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php
index 13f792b78e47afd3c5457b714345a0d00ee1a051..5042ac1b745cf07a7134687c2598694b773ff804 100644
--- a/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php
@@ -9,12 +9,11 @@
 
 namespace Magento\Catalog\Test\Unit\Model;
 
-use Magento\Catalog\Model\Layer\Filter\Dynamic\AlgorithmFactory;
+use Magento\Catalog\Api\Data\ProductAttributeInterface;
 use Magento\Framework\Api\Data\ImageContentInterface;
-use Magento\Framework\Api\SortOrder;
 use Magento\Framework\DB\Adapter\ConnectionException;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
-use Magento\Store\Model\ScopeInterface;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 
 /**
  * Class ProductRepositoryTest
@@ -142,12 +141,16 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $mediaGalleryProcessor;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessorMock;
+
     /**
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
     protected function setUp()
     {
-        $this->markTestSkipped('11111111111111111111111');
         $this->productFactoryMock = $this->getMock(
             \Magento\Catalog\Model\ProductFactory::class,
             ['create'],
@@ -291,6 +294,9 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
             false
         );
 
+        $this->collectionProcessorMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
+
         $this->model = $this->objectManager->getObject(
             \Magento\Catalog\Model\ProductRepository::class,
             [
@@ -310,7 +316,8 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
                 'linkTypeProvider' => $this->linkTypeProviderMock,
                 'imageProcessor' => $this->imageProcessorMock,
                 'storeManager' => $this->storeManagerMock,
-                'mediaGalleryProcessor' => $this->mediaGalleryProcessor
+                'mediaGalleryProcessor' => $this->mediaGalleryProcessor,
+                'collectionProcessor' => $this->collectionProcessorMock
             ]
         );
     }
@@ -372,7 +379,6 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->productFactoryMock->expects($this->once())->method('create')
             ->will($this->returnValue($this->productMock));
         $this->productMock->expects($this->once())->method('load')->with('product_id');
-        $this->productMock->expects($this->once())->method('getWebsiteIds');
         $this->productMock->expects($this->once())->method('getId')->willReturn(null);
         $this->model->getById('product_id');
     }
@@ -384,7 +390,6 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($this->productMock));
         $this->productMock->expects($this->once())->method('setData')->with('_edit_mode', true);
         $this->productMock->expects($this->once())->method('load')->with($productId);
-        $this->productMock->expects($this->once())->method('getWebsiteIds');
         $this->productMock->expects($this->once())->method('getId')->willReturn($productId);
         $this->assertEquals($this->productMock, $this->model->getById($productId, true));
     }
@@ -430,7 +435,6 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->productFactoryMock->expects($this->exactly(2))->method('create')
             ->will($this->returnValue($this->productMock));
         $this->productMock->expects($this->exactly(2))->method('load');
-        $this->productMock->expects($this->exactly(2))->method('getWebsiteIds');
         $this->productMock->expects($this->exactly(2))->method('getId')->willReturn($identifier);
         $this->assertEquals($this->productMock, $this->model->getById($identifier, $editMode, $storeId));
         //second invocation should just return from cache
@@ -454,7 +458,6 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->productFactoryMock->expects($this->exactly(2))->method('create')
             ->will($this->returnValue($this->productMock));
         $this->productMock->expects($this->exactly(2))->method('load');
-        $this->productMock->expects($this->exactly(2))->method('getWebsiteIds');
         $this->productMock->expects($this->exactly(2))->method('getId')->willReturn($sku);
         $this->resourceModelMock->expects($this->exactly(2))->method('getIdBySku')
             ->with($sku)->willReturn($id);
@@ -473,7 +476,6 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($this->productMock));
         $this->productMock->expects($this->once())->method('setData')->with('store_id', $storeId);
         $this->productMock->expects($this->once())->method('load')->with($productId);
-        $this->productMock->expects($this->once())->method('getWebsiteIds');
         $this->productMock->expects($this->once())->method('getId')->willReturn($productId);
         $this->assertEquals($this->productMock, $this->model->getById($productId, false, $storeId));
     }
@@ -485,7 +487,6 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->productFactoryMock->expects($this->once())->method('create')
             ->will($this->returnValue($this->productMock));
         $this->productMock->expects($this->once())->method('load')->with($productId);
-        $this->productMock->expects($this->once())->method('getWebsiteIds');
         $this->productMock->expects($this->once())->method('getId')->willReturn($productId);
         $this->productMock->expects($this->once())->method('getSku')->willReturn($productSku);
         $this->assertEquals($this->productMock, $this->model->getById($productId));
@@ -666,10 +667,7 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->assertTrue($this->model->deleteById($sku));
     }
 
-    /**
-     * @dataProvider fieldName
-     */
-    public function testGetList($fieldName)
+    public function testGetList()
     {
         $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class, [], [], '', false);
         $attributeCode = 'attribute_code';
@@ -681,15 +679,10 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
             false
         );
         $extendedSearchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteria::class, [], [], '', false);
-        $productAttributeSearchResultsMock = $this->getMockForAbstractClass(
-            \Magento\Catalog\Api\Data\ProductAttributeInterface::class,
-            [],
-            '',
-            false,
-            false,
-            false,
-            ['getItems']
-        );
+        $productAttributeSearchResultsMock = $this->getMockBuilder(ProductAttributeInterface::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getItems'])
+            ->getMockForAbstractClass();
         $productAttributeMock = $this->getMock(
             \Magento\Catalog\Api\Data\ProductAttributeInterface::class,
             [],
@@ -697,9 +690,6 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $filterGroupMock = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filterGroupFilterMock = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
-        $sortOrderMock = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
         $itemsMock = $this->getMock(\Magento\Framework\DataObject::class, [], [], '', false);
 
         $this->collectionFactoryMock->expects($this->once())->method('create')->willReturn($collectionMock);
@@ -715,21 +705,9 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
             ['status', 'catalog_product/status', 'entity_id', null, 'inner'],
             ['visibility', 'catalog_product/visibility', 'entity_id', null, 'inner']
         );
-        $searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroupMock]);
-        $filterGroupMock->expects($this->once())->method('getFilters')->willReturn([$filterGroupFilterMock]);
-        $filterGroupFilterMock->expects($this->exactly(2))->method('getConditionType')->willReturn('eq');
-        $filterGroupFilterMock->expects($this->atLeastOnce())->method('getField')->willReturn($fieldName);
-        $filterGroupFilterMock->expects($this->once())->method('getValue')->willReturn('value');
-        $this->expectAddToFilter($fieldName, $collectionMock);
-        $searchCriteriaMock->expects($this->once())->method('getSortOrders')->willReturn([$sortOrderMock]);
-        $sortOrderMock->expects($this->atLeastOnce())->method('getField')->willReturn($fieldName);
-        $sortOrderMock->expects($this->once())->method('getDirection')
-            ->willReturn(SortOrder::SORT_ASC);
-        $collectionMock->expects($this->once())->method('addOrder')->with($fieldName, 'ASC');
-        $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->willReturn(4);
-        $collectionMock->expects($this->once())->method('setCurPage')->with(4);
-        $searchCriteriaMock->expects($this->once())->method('getPageSize')->willReturn(42);
-        $collectionMock->expects($this->once())->method('setPageSize')->with(42);
+        $this->collectionProcessorMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
         $collectionMock->expects($this->once())->method('load');
         $collectionMock->expects($this->once())->method('getItems')->willReturn([$itemsMock]);
         $collectionMock->expects($this->once())->method('getSize')->willReturn(128);
@@ -1314,31 +1292,4 @@ class ProductRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->model->save($this->productMock);
         $this->assertEquals($expectedResult, $this->initializedProductMock->getMediaGallery('images'));
     }
-
-    /**
-     * @param $fieldName
-     * @param $collectionMock
-     * @return void
-     */
-    public function expectAddToFilter($fieldName, $collectionMock)
-    {
-        if ($fieldName == 'category_id') {
-            $collectionMock->expects($this->once())->method('addCategoriesFilter')
-                ->with(['eq' => ['value']]);
-        } else {
-            $collectionMock->expects($this->once())->method('addFieldToFilter')
-                ->with([['attribute' => $fieldName, 'eq' => 'value']]);
-        }
-    }
-
-    /**
-     * @return array
-     */
-    public function fieldName()
-    {
-        return [
-            ['category_id'],
-            ['field']
-        ];
-    }
 }
diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php
index 10bd9ddfd572aefd03204f6ae3eb1cc568a789b3..d4950d9df6de7b71d3f86e0e81ad4aa01d71fd6a 100644
--- a/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php
@@ -185,6 +185,16 @@ class ProductTest extends \PHPUnit_Framework_TestCase
      */
     private $extensionAttributesFactory;
 
+    /**
+     * @var \Magento\Framework\Filesystem
+     */
+    private $filesystemMock;
+
+    /**
+     * @var \Magento\Framework\Data\CollectionFactory
+     */
+    private $collectionFactoryMock;
+
     /**
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
@@ -374,6 +384,13 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         $this->extensionAttributesFactory = $this->getMockBuilder(ExtensionAttributesFactory::class)
             ->disableOriginalConstructor()
             ->getMock();
+        $this->filesystemMock = $this->getMockBuilder(\Magento\Framework\Filesystem::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->collectionFactoryMock = $this->getMockBuilder(\Magento\Framework\Data\CollectionFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
         $this->mediaConfig = $this->getMock(\Magento\Catalog\Model\Product\Media\Config::class, [], [], '', false);
         $this->objectManagerHelper = new ObjectManagerHelper($this);
 
@@ -402,6 +419,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
                 'mediaGalleryEntryConverterPool' => $this->mediaGalleryEntryConverterPoolMock,
                 'linkRepository' => $this->productLinkRepositoryMock,
                 'catalogProductMediaConfig' => $this->mediaConfig,
+                '_filesystem' => $this->filesystemMock,
+                '_collectionFactory' => $this->collectionFactoryMock,
                 'data' => ['id' => 1]
             ]
         );
@@ -1230,6 +1249,71 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($expectedResult, $this->model->getMediaGallery());
     }
 
+    public function testGetMediaGalleryImagesMerging()
+    {
+        $mediaEntries = [
+            'images' => [
+                [
+                    'value_id' => 1,
+                    'file' => 'imageFile.jpg',
+                    'media_type' => 'image',
+                ],
+                [
+                    'value_id' => 1,
+                    'file' => 'imageFile.jpg',
+                ],
+                [
+                    'value_id' => 2,
+                    'file' => 'smallImageFile.jpg',
+                    'media_type' => 'image',
+                ],
+            ]
+        ];
+        $expectedImageDataObject = new \Magento\Framework\DataObject([
+            'value_id' => 1,
+            'file' => 'imageFile.jpg',
+            'media_type' => 'image',
+            'url' => 'http://magento.dev/pub/imageFile.jpg',
+            'id' => 1,
+            'path' => '/var/www/html/pub/imageFile.jpg',
+        ]);
+        $expectedSmallImageDataObject = new \Magento\Framework\DataObject([
+            'value_id' => 2,
+            'file' => 'smallImageFile.jpg',
+            'media_type' => 'image',
+            'url' => 'http://magento.dev/pub/smallImageFile.jpg',
+            'id' => 2,
+            'path' => '/var/www/html/pub/smallImageFile.jpg',
+        ]);
+
+        $directoryMock = $this->getMockBuilder(\Magento\Framework\Filesystem\Directory\ReadInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->filesystemMock->expects($this->once())->method('getDirectoryRead')->willReturn($directoryMock);
+        $this->model->setData('media_gallery', $mediaEntries);
+        $imagesCollectionMock = $this->getMockBuilder(\Magento\Framework\Data\Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->collectionFactoryMock->expects($this->once())->method('create')->willReturn($imagesCollectionMock);
+        $imagesCollectionMock->expects($this->at(2))->method('getItemById')->with(1)->willReturn($expectedImageDataObject);
+        $this->mediaConfig->expects($this->at(0))
+            ->method('getMediaUrl')
+            ->willReturn('http://magento.dev/pub/imageFile.jpg');
+        $directoryMock->expects($this->at(0))
+            ->method('getAbsolutePath')
+            ->willReturn('/var/www/html/pub/imageFile.jpg');
+        $this->mediaConfig->expects($this->at(2))
+            ->method('getMediaUrl')
+            ->willReturn('http://magento.dev/pub/smallImageFile.jpg');
+        $directoryMock->expects($this->at(1))
+            ->method('getAbsolutePath')
+            ->willReturn('/var/www/html/pub/smallImageFile.jpg');
+        $imagesCollectionMock->expects($this->at(1))->method('addItem')->with($expectedImageDataObject);
+        $imagesCollectionMock->expects($this->at(4))->method('addItem')->with($expectedSmallImageDataObject);
+
+        $this->model->getMediaGalleryImages();
+    }
+
     public function testGetCustomAttributes()
     {
         $priceCode = 'price';
diff --git a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/EavTest.php b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/EavTest.php
index 10722de41c1d2abfd788e9c492fd06d29c5c3273..2deb4800bd023b7290a65f2a7375a11a8214e75b 100755
--- a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/EavTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/EavTest.php
@@ -9,6 +9,7 @@ use Magento\Catalog\Model\Product\Type;
 use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav;
 use Magento\Eav\Model\Config;
 use Magento\Framework\App\RequestInterface;
+use Magento\Framework\EntityManager\EventManager;
 use Magento\Store\Model\StoreManagerInterface;
 use Magento\Store\Api\Data\StoreInterface;
 use Magento\Ui\DataProvider\EavValidationRules;
@@ -27,11 +28,15 @@ use Magento\Framework\Api\SortOrderBuilder;
 use Magento\Catalog\Api\ProductAttributeRepositoryInterface;
 use Magento\Framework\Api\SearchResultsInterface;
 use Magento\Catalog\Api\Data\ProductAttributeInterface;
+use Magento\Framework\Api\AttributeInterface;
 use Magento\Eav\Api\Data\AttributeGroupInterface;
 use Magento\Catalog\Model\ResourceModel\Eav\Attribute;
 use Magento\Framework\Currency;
 use Magento\Framework\Locale\Currency as CurrencyLocale;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\Stdlib\ArrayManager;
+use Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory as EavAttributeFactory;
+use Magento\Framework\Event\ManagerInterface;
 
 /**
  * Class EavTest
@@ -157,6 +162,26 @@ class EavTest extends AbstractModifierTest
      */
     protected $currencyLocaleMock;
 
+    /**
+     * @var ProductAttributeInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productAttributeMock;
+
+    /**
+     * @var ArrayManager|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $arrayManagerMock;
+
+    /**
+     * @var EavAttributeFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $eavAttributeFactoryMock;
+
+    /**
+     * @var ManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $eventManagerMock;
+
     /**
      * @var ObjectManager
      */
@@ -167,6 +192,9 @@ class EavTest extends AbstractModifierTest
      */
     protected $eav;
 
+    /**
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
+     */
     protected function setUp()
     {
         parent::setUp();
@@ -228,10 +256,24 @@ class EavTest extends AbstractModifierTest
         $this->searchResultsMock = $this->getMockBuilder(SearchResultsInterface::class)
             ->getMockForAbstractClass();
         $this->eavAttributeMock = $this->getMockBuilder(Attribute::class)
-            ->setMethods(['getAttributeGroupCode', 'getApplyTo', 'getFrontendInput', 'getAttributeCode'])
+            ->setMethods(['load', 'getAttributeGroupCode', 'getApplyTo', 'getFrontendInput', 'getAttributeCode'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->productAttributeMock = $this->getMockBuilder(ProductAttributeInterface::class)
+            ->getMock();
+        $this->arrayManagerMock = $this->getMockBuilder(ArrayManager::class)
+            ->getMock();
+        $this->eavAttributeFactoryMock = $this->getMockBuilder(EavAttributeFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $this->eventManagerMock = $this->getMockBuilder(ManagerInterface::class)
             ->disableOriginalConstructor()
             ->getMock();
 
+        $this->eavAttributeFactoryMock->expects($this->any())
+            ->method('create')
+            ->willReturn($this->eavAttributeMock);
         $this->groupCollectionFactoryMock->expects($this->any())
             ->method('create')
             ->willReturn($this->groupCollectionMock);
@@ -277,6 +319,9 @@ class EavTest extends AbstractModifierTest
             ->disableOriginalConstructor()
             ->setMethods(['getCurrency'])
             ->getMock();
+        $this->eavAttributeMock->expects($this->any())
+            ->method('load')
+            ->willReturnSelf();
         
         $this->eav =$this->getModel();
         $this->objectManager->setBackwardCompatibleProperty(
@@ -304,6 +349,9 @@ class EavTest extends AbstractModifierTest
             'attributeGroupRepository' => $this->attributeGroupRepositoryMock,
             'sortOrderBuilder' => $this->sortOrderBuilderMock,
             'attributeRepository' => $this->attributeRepositoryMock,
+            'arrayManager' => $this->arrayManagerMock,
+            'eavAttributeFactory' => $this->eavAttributeFactoryMock,
+            '_eventManager' => $this->eventManagerMock
         ]);
     }
 
@@ -399,4 +447,162 @@ class EavTest extends AbstractModifierTest
 
         $this->assertEquals($sourceData, $this->eav->modifyData([]));
     }
+
+    /**
+     * @param int $productId
+     * @param bool $productRequired
+     * @param string $attrValue
+     * @param array $expected
+     * @covers \Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav::isProductExists
+     * @covers \Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav::setupAttributeMeta
+     * @dataProvider setupAttributeMetaDataProvider
+     */
+    public function testSetupAttributeMetaDefaultAttribute($productId, $productRequired, $attrValue, $expected)
+    {
+        $configPath =  'arguments/data/config';
+        $groupCode = 'product-details';
+        $sortOrder = '0';
+
+        $this->productMock->expects($this->any())
+            ->method('getId')
+            ->willReturn($productId);
+
+        $this->productAttributeMock->expects($this->any())
+            ->method('getIsRequired')
+            ->willReturn($productRequired);
+
+        $this->productAttributeMock->expects($this->any())
+            ->method('getDefaultValue')
+            ->willReturn('required_value');
+
+        $this->productAttributeMock->expects($this->any())
+            ->method('getAttributeCode')
+            ->willReturn('code');
+
+        $this->productAttributeMock->expects($this->any())
+            ->method('getValue')
+            ->willReturn('value');
+
+        $attributeMock = $this->getMockBuilder(AttributeInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $attributeMock->expects($this->any())
+            ->method('getValue')
+            ->willReturn($attrValue);
+
+        $this->productMock->expects($this->any())
+            ->method('getCustomAttribute')
+            ->willReturn($attributeMock);
+
+        $this->arrayManagerMock->expects($this->any())
+            ->method('set')
+            ->with(
+                $configPath,
+                [],
+                $expected
+            )
+            ->willReturn($expected);
+
+        $this->arrayManagerMock->expects($this->any())
+            ->method('merge')
+            ->willReturn($expected);
+
+        $this->arrayManagerMock->expects($this->any())
+            ->method('get')
+            ->willReturn([]);
+
+        $this->arrayManagerMock->expects($this->any())
+            ->method('exists');
+
+        $this->assertEquals(
+            $expected,
+            $this->eav->setupAttributeMeta($this->productAttributeMock, $groupCode, $sortOrder)
+        );
+    }
+
+    /**
+     * @return array
+     */
+    public function setupAttributeMetaDataProvider()
+    {
+        return [
+            'default_null_prod_not_new_and_required' => [
+                'productId' => 1,
+                'productRequired' => true,
+                'attrValue' => 'val',
+                'expected' => [
+                    'dataType' => null,
+                    'formElement' => null,
+                    'visible' => null,
+                    'required' => true,
+                    'notice' => null,
+                    'default' => null,
+                    'label' => null,
+                    'code' => 'code',
+                    'source' => 'product-details',
+                    'scopeLabel' => '',
+                    'globalScope' => false,
+                    'sortOrder' => 0
+                    ],
+                ],
+            'default_null_prod_not_new_and_not_required' => [
+                'productId' => 1,
+                'productRequired' => false,
+                'attrValue' => 'val',
+                'expected' => [
+                    'dataType' => null,
+                    'formElement' => null,
+                    'visible' => null,
+                    'required' => false,
+                    'notice' => null,
+                    'default' => null,
+                    'label' => null,
+                    'code' => 'code',
+                    'source' => 'product-details',
+                    'scopeLabel' => '',
+                    'globalScope' => false,
+                    'sortOrder' => 0
+                    ],
+                ],
+            'default_null_prod_new_and_not_required' => [
+                'productId' => null,
+                'productRequired' => false,
+                'attrValue' => null,
+                'expected' => [
+                    'dataType' => null,
+                    'formElement' => null,
+                    'visible' => null,
+                    'required' => false,
+                    'notice' => null,
+                    'default' => 'required_value',
+                    'label' => null,
+                    'code' => 'code',
+                    'source' => 'product-details',
+                    'scopeLabel' => '',
+                    'globalScope' => false,
+                    'sortOrder' => 0
+                ],
+            ],
+            'default_null_prod_new_and_required' => [
+                'productId' => null,
+                'productRequired' => false,
+                'attrValue' => null,
+                'expected' => [
+                    'dataType' => null,
+                    'formElement' => null,
+                    'visible' => null,
+                    'required' => false,
+                    'notice' => null,
+                    'default' => 'required_value',
+                    'label' => null,
+                    'code' => 'code',
+                    'source' => 'product-details',
+                    'scopeLabel' => '',
+                    'globalScope' => false,
+                    'sortOrder' => 0
+                ],
+            ]
+        ];
+    }
 }
diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php
index edab28873b5b79bc2112a1b7de8e1c22956168c1..1419c17e11b298d1fcdc554a3131d7b8c9b8ffe8 100755
--- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php
+++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php
@@ -522,6 +522,16 @@ class Eav extends AbstractModifier
         return $this->prevSetAttributes;
     }
 
+    /**
+     * Check is product already new or we trying to create one
+     *
+     * @return bool
+     */
+    private function isProductExists()
+    {
+        return (bool) $this->locator->getProduct()->getId();
+    }
+
     /**
      * Initial meta setup
      *
@@ -531,6 +541,7 @@ class Eav extends AbstractModifier
      * @return array
      * @throws \Magento\Framework\Exception\LocalizedException
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
+     * @SuppressWarnings(PHPMD.NPathComplexity)
      * @api
      */
     public function setupAttributeMeta(ProductAttributeInterface $attribute, $groupCode, $sortOrder)
@@ -543,7 +554,7 @@ class Eav extends AbstractModifier
             'visible' => $attribute->getIsVisible(),
             'required' => $attribute->getIsRequired(),
             'notice' => $attribute->getNote(),
-            'default' => $attribute->getDefaultValue(),
+            'default' => (!$this->isProductExists()) ? $attribute->getDefaultValue() : null,
             'label' => $attribute->getDefaultFrontendLabel(),
             'code' => $attribute->getAttributeCode(),
             'source' => $groupCode,
diff --git a/app/code/Magento/Catalog/etc/di.xml b/app/code/Magento/Catalog/etc/di.xml
index a198802a0dc25791fe23f05263bc3590772d2d88..36f072d3b0a15b358463a2715e5e214c30b51b24 100644
--- a/app/code/Magento/Catalog/etc/di.xml
+++ b/app/code/Magento/Catalog/etc/di.xml
@@ -805,4 +805,30 @@
             </argument>
         </arguments>
     </type>
+    <virtualType name="Magento\Catalog\Model\Api\SearchCriteria\CollectionProcessor\ProductFilterProcessor" type="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
+        <arguments>
+            <argument name="customFilters" xsi:type="array">
+                <item name="category_id" xsi:type="object">Magento\Catalog\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\ProductCategoryFilter</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor" type="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="filters" xsi:type="object">Magento\Catalog\Model\Api\SearchCriteria\CollectionProcessor\ProductFilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <type name="Magento\Catalog\Model\ProductRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor</argument>
+        </arguments>
+    </type>
+    <type name="\Magento\Catalog\Model\CategoryList">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor</argument>
+        </arguments>
+    </type>
 </config>
diff --git a/app/code/Magento/Catalog/i18n/en_US.csv b/app/code/Magento/Catalog/i18n/en_US.csv
index 8c412dace45354da7b6056d396c7168156f2d446..2ad2194b36466b0112afc78880ff91249a7ca6af 100644
--- a/app/code/Magento/Catalog/i18n/en_US.csv
+++ b/app/code/Magento/Catalog/i18n/en_US.csv
@@ -701,6 +701,7 @@ Image,Image
 "Allowed file types: jpeg, gif, png.","Allowed file types: jpeg, gif, png."
 "Image Opacity","Image Opacity"
 "Example format: 200x300.","Example format: 200x300."
+"This value does not follow the specified format (for example, 200X300).","This value does not follow the specified format (for example, 200X300)."
 "Image Position","Image Position"
 Small,Small
 "Attribute Label","Attribute Label"
diff --git a/app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml b/app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml
index dc8ced173bc544b9b1aa24324b1294479374805d..9852ad74121c8c30f852600783a4fb91ab84ce61 100644
--- a/app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml
+++ b/app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml
@@ -55,12 +55,13 @@
                 <field name="watermark_image_size">
                     <argument name="data" xsi:type="array">
                         <item name="config" xsi:type="array">
+                            <item name="component" xsi:type="string">Magento_Catalog/component/image-size-field</item>
                             <item name="label" xsi:type="string" translate="true">Image Size</item>
                             <item name="dataType" xsi:type="string">text</item>
                             <item name="formElement" xsi:type="string">input</item>
                             <item name="dataScope" xsi:type="string">watermark_image_size</item>
                             <item name="validation" xsi:type="array">
-                                <item name="validate-digits" xsi:type="boolean">true</item>
+                                <item name="validate-image-size-range" xsi:type="boolean">true</item>
                             </item>
                             <item name="notice" xsi:type="string" translate="true">Example format: 200x300.</item>
                         </item>
@@ -118,12 +119,13 @@
                 <field name="watermark_thumbnail_size">
                     <argument name="data" xsi:type="array">
                         <item name="config" xsi:type="array">
+                            <item name="component" xsi:type="string">Magento_Catalog/component/image-size-field</item>
                             <item name="label" xsi:type="string" translate="true">Image Size</item>
                             <item name="dataType" xsi:type="string">text</item>
                             <item name="formElement" xsi:type="string">input</item>
                             <item name="dataScope" xsi:type="string">watermark_thumbnail_size</item>
                             <item name="validation" xsi:type="array">
-                                <item name="validate-digits" xsi:type="boolean">true</item>
+                                <item name="validate-image-size-range" xsi:type="boolean">true</item>
                             </item>
                             <item name="notice" xsi:type="string" translate="true">Example format: 200x300.</item>
                         </item>
@@ -181,12 +183,13 @@
                 <field name="watermark_small_image_size">
                     <argument name="data" xsi:type="array">
                         <item name="config" xsi:type="array">
+                            <item name="component" xsi:type="string">Magento_Catalog/component/image-size-field</item>
                             <item name="label" xsi:type="string" translate="true">Image Size</item>
                             <item name="dataType" xsi:type="string">text</item>
                             <item name="formElement" xsi:type="string">input</item>
                             <item name="dataScope" xsi:type="string">watermark_small_image_size</item>
                             <item name="validation" xsi:type="array">
-                                <item name="validate-digits" xsi:type="boolean">true</item>
+                                <item name="validate-image-size-range" xsi:type="boolean">true</item>
                             </item>
                             <item name="notice" xsi:type="string" translate="true">Example format: 200x300.</item>
                         </item>
diff --git a/app/code/Magento/Catalog/view/adminhtml/web/component/image-size-field.js b/app/code/Magento/Catalog/view/adminhtml/web/component/image-size-field.js
new file mode 100644
index 0000000000000000000000000000000000000000..b330ccfd8c12531d4945fad1ea255bdee23a6404
--- /dev/null
+++ b/app/code/Magento/Catalog/view/adminhtml/web/component/image-size-field.js
@@ -0,0 +1,42 @@
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+define([
+    'jquery',
+    'Magento_Ui/js/lib/validation/utils',
+    'Magento_Ui/js/form/element/abstract',
+    'Magento_Ui/js/lib/validation/validator'
+], function ($, utils, Abstract, validator) {
+    'use strict';
+
+    validator.addRule(
+        'validate-image-size-range',
+        function (value) {
+            var dataAttrRange = /^(\d+)x(\d+)$/,
+                m;
+
+            if (utils.isEmptyNoTrim(value)) {
+                return true;
+            }
+
+            m = dataAttrRange.exec(value);
+
+            return !!(m &&  m[1] > 0 && m[2] > 0);
+        },
+        $.mage.__('This value does not follow the specified format (for example, 200X300).')
+    );
+
+    return Abstract.extend({
+
+        /**
+         * Checks for relevant value
+         *
+         * @returns {Boolean}
+         */
+        isRangeCorrect: function () {
+            return validator('validate-image-size-range', this.value()).passed;
+        }
+    });
+});
diff --git a/app/code/Magento/Catalog/view/adminhtml/web/template/form/element/action-delete.html b/app/code/Magento/Catalog/view/adminhtml/web/template/form/element/action-delete.html
index 9f223325939fb97b418f05c0f20fb8ff364e8a93..13445314101b22ea1761def9d18ffaf87845047c 100644
--- a/app/code/Magento/Catalog/view/adminhtml/web/template/form/element/action-delete.html
+++ b/app/code/Magento/Catalog/view/adminhtml/web/template/form/element/action-delete.html
@@ -12,5 +12,5 @@
                 title: $parent.deleteButtonLabel
             }
         ">
-    <span data-bind="text: $parent.deleteButtonLabel"></span>
+    <span translate="$parent.deleteButtonLabel"></span>
 </button>
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml
index f6dd2a0033fd45d7a7250aa12069dc4ae90a55aa..7de546bd8780d602760e8b94fb4c43b499b4950d 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml
@@ -40,7 +40,7 @@
 <script>
     require([
         'jquery',
-        'Magento_Catalog/js/price-box'
+        'priceBox'
     ], function($){
         var priceBoxes = $('[data-role=priceBox]');
 
diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php
index 73551f332d140e0561dc5c481e9e6b0343f90f85..02953743662ebbfe52124c2b760258361810cd6f 100644
--- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php
+++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php
@@ -1284,6 +1284,14 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
                     $row['max_characters'] = $option['max_characters'];
                 }
 
+                foreach (['file_extension', 'image_size_x', 'image_size_y'] as $fileOptionKey) {
+                    if (!isset($option[$fileOptionKey])) {
+                        continue;
+                    }
+
+                    $row[$fileOptionKey] = $option[$fileOptionKey];
+                }
+
                 $values = $option->getValues();
 
                 if ($values) {
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php
index cb4a603f54577edaa59412f89cb56298fde7350b..d78376e2d1479c336a7de99996648fdce8edd3b9 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php
@@ -105,6 +105,7 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         'radio' => true,
         'checkbox' => true,
         'multiple' => true,
+        'file' => ['sku', 'file_extension', 'image_size_x', 'image_size_y'],
     ];
 
     /**
@@ -1136,6 +1137,28 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
             $result[$this->columnMaxCharacters] = $optionRow['max_characters'];
         }
 
+        $result = $this->addFileOptions($result, $optionRow);
+
+        return $result;
+    }
+
+    /**
+     * Add file options
+     *
+     * @param array $result
+     * @param array $optionRow
+     * @return array
+     */
+    private function addFileOptions($result, $optionRow)
+    {
+        foreach (['file_extension', 'image_size_x', 'image_size_y'] as $fileOptionKey) {
+            if (!isset($optionRow[$fileOptionKey])) {
+                continue;
+            }
+
+            $result[self::COLUMN_PREFIX . $fileOptionKey] = $optionRow[$fileOptionKey];
+        }
+
         return $result;
     }
 
diff --git a/app/code/Magento/CatalogInventory/Setup/InstallSchema.php b/app/code/Magento/CatalogInventory/Setup/InstallSchema.php
index 67a126f4a20fc07f033c7ee13d243ca0cf54bd73..a19eb9d1cc57344e6f2fcce5f94b81be113cc84f 100644
--- a/app/code/Magento/CatalogInventory/Setup/InstallSchema.php
+++ b/app/code/Magento/CatalogInventory/Setup/InstallSchema.php
@@ -249,7 +249,7 @@ class InstallSchema implements InstallSchemaInterface
                 \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
                 5,
                 ['unsigned' => true, 'nullable' => false, 'default' => 0],
-                'Is Divided into Multiple Boxes for Shipping'
+                'Website ID'
             )
             ->addIndex(
                 $installer->getIdxName(
diff --git a/app/code/Magento/CatalogInventory/etc/di.xml b/app/code/Magento/CatalogInventory/etc/di.xml
index cfd47ea146697a6e2dffaf2c1342bc7374c08a33..eb97aa454f6e8c63583bfd9cd4b6fec32b6d67e1 100644
--- a/app/code/Magento/CatalogInventory/etc/di.xml
+++ b/app/code/Magento/CatalogInventory/etc/di.xml
@@ -72,6 +72,6 @@
         <plugin name="catalogInventoryAfterLoad" type="\Magento\CatalogInventory\Model\Plugin\AfterProductLoad"/>
     </type>
     <type name="Magento\Catalog\Api\ProductRepositoryInterface">
-        <plugin name="catalogInventoryAroundSave" type="\Magento\CatalogInventory\Model\Plugin\AroundProductRepositorySave"/>
+        <plugin name="catalogInventoryAroundSave" sortOrder="20" type="Magento\CatalogInventory\Model\Plugin\AroundProductRepositorySave"/>
     </type>
 </config>
diff --git a/app/code/Magento/CatalogInventory/etc/module.xml b/app/code/Magento/CatalogInventory/etc/module.xml
index 5c7ade1e83cda16993fe5ea84bbe7d956923dc3d..2224da524fccc1029bd42e588b0696c65efd0408 100644
--- a/app/code/Magento/CatalogInventory/etc/module.xml
+++ b/app/code/Magento/CatalogInventory/etc/module.xml
@@ -6,7 +6,7 @@
  */
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
-    <module name="Magento_CatalogInventory" setup_version="2.0.0">
+    <module name="Magento_CatalogInventory" setup_version="2.0.1">
         <sequence>
             <module name="Magento_Catalog"/>
         </sequence>
diff --git a/app/code/Magento/CatalogRule/Model/ResourceModel/Product/LinkedProductSelectBuilderByCatalogRulePrice.php b/app/code/Magento/CatalogRule/Model/ResourceModel/Product/LinkedProductSelectBuilderByCatalogRulePrice.php
index 737c15115c1d3e2526f45a099499b43f428a22f5..7d8d44dcbb68ad2539f0556fb7aec8eebe0caa2e 100644
--- a/app/code/Magento/CatalogRule/Model/ResourceModel/Product/LinkedProductSelectBuilderByCatalogRulePrice.php
+++ b/app/code/Magento/CatalogRule/Model/ResourceModel/Product/LinkedProductSelectBuilderByCatalogRulePrice.php
@@ -74,15 +74,16 @@ class LinkedProductSelectBuilderByCatalogRulePrice implements LinkedProductSelec
         $timestamp = $this->localeDate->scopeTimeStamp($this->storeManager->getStore());
         $currentDate = $this->dateTime->formatDate($timestamp, false);
         $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();
+        $productTable = $this->resource->getTableName('catalog_product_entity');
 
         return [$this->resource->getConnection()->select()
-                ->from(['parent' => 'catalog_product_entity'], '')
+                ->from(['parent' => $productTable], '')
                 ->joinInner(
                     ['link' => $this->resource->getTableName('catalog_product_relation')],
                     "link.parent_id = parent.$linkField",
                     []
                 )->joinInner(
-                    ['child' => 'catalog_product_entity'],
+                    ['child' => $productTable],
                     "child.entity_id = link.child_id",
                     ['entity_id']
                 )->joinInner(
diff --git a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php
index 8c30ff7902a97894a384c404aea073db75ff4515..05205f04f8b99cd903f345f8c1f7dc04384e7aee 100644
--- a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php
+++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php
@@ -179,14 +179,14 @@ class Preprocessor implements PreprocessorInterface
         $tableSuffix = $attribute->getBackendType() === 'decimal' ? '_decimal' : '';
         $table = $this->resource->getTableName("catalog_product_index_eav{$tableSuffix}");
         $select = $this->connection->select();
-        $linkIdField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
+        $entityField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getIdentifierField();
 
         $currentStoreId = $this->scopeResolver->getScope()->getId();
 
         $select->from(['e' => $this->resource->getTableName('catalog_product_entity')], ['entity_id'])
             ->join(
                 ['main_table' => $table],
-                "main_table.{$linkIdField} = e.{$linkIdField}",
+                "main_table.{$entityField} = e.{$entityField}",
                 []
             )
             ->columns([$filter->getField() => 'main_table.value'])
diff --git a/app/code/Magento/CatalogSearch/Model/Search/ReaderPlugin.php b/app/code/Magento/CatalogSearch/Model/Search/ReaderPlugin.php
index 21dd2f62495b2b7bf9b41c80beeed612a07ae47b..307b34c008fb238e6e79b87ec21a6a3a4099d431 100644
--- a/app/code/Magento/CatalogSearch/Model/Search/ReaderPlugin.php
+++ b/app/code/Magento/CatalogSearch/Model/Search/ReaderPlugin.php
@@ -24,18 +24,17 @@ class ReaderPlugin
     /**
      * Merge reader's value with generated
      *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      * @param \Magento\Framework\Config\ReaderInterface $subject
-     * @param \Closure $proceed
-     * @param string $scope
+     * @param array $result
+     * @param string|null $scope
      * @return array
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundRead(
+    public function afterRead(
         \Magento\Framework\Config\ReaderInterface $subject,
-        \Closure $proceed,
+        array $result,
         $scope = null
     ) {
-        $result = $proceed($scope);
         $result = array_merge_recursive($result, $this->requestGenerator->generate());
         return $result;
     }
diff --git a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/ReaderPluginTest.php b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/ReaderPluginTest.php
index 69644eee90222f09e7a3d9e74ee23292c4801070..afae3ccb4f4b595ed04141927b1e85279689988b 100644
--- a/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/ReaderPluginTest.php
+++ b/app/code/Magento/CatalogSearch/Test/Unit/Model/Search/ReaderPluginTest.php
@@ -29,18 +29,18 @@ class ReaderPluginTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testAroundRead()
+    public function testAfterRead()
     {
+        $readerConfig = ['test' => 'b', 'd' => 'e'];
         $this->requestGenerator->expects($this->once())
             ->method('generate')
             ->will($this->returnValue(['test' => 'a']));
 
-        $result = $this->object->aroundRead(
+        $result = $this->object->afterRead(
             $this->getMockBuilder(\Magento\Framework\Config\ReaderInterface::class)
                 ->disableOriginalConstructor()->getMock(),
-            function () {
-                return ['test' => 'b', 'd' => 'e'];
-            }
+            $readerConfig,
+            null
         );
 
         $this->assertEquals(['test' => ['b', 'a'], 'd' => 'e'], $result);
diff --git a/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Category/Move.php b/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Category/Move.php
index 1477a10655472d3e88543e0567dd2d6733af3d3c..4175a7ddb4ef9d9fd0f05d92d0d3d5bd53cfa374 100644
--- a/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Category/Move.php
+++ b/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Category/Move.php
@@ -14,6 +14,11 @@ class Move
     /** @var CategoryUrlPathGenerator */
     protected $categoryUrlPathGenerator;
 
+    /**
+     * @var ChildrenCategoriesProvider
+     */
+    private $childrenCategoriesProvider;
+
     /**
      * @param CategoryUrlPathGenerator $categoryUrlPathGenerator
      * @param ChildrenCategoriesProvider $childrenCategoriesProvider
@@ -27,22 +32,23 @@ class Move
     }
 
     /**
+     * Perform url updating for children categories
+     *
      * @param \Magento\Catalog\Model\ResourceModel\Category $subject
-     * @param callable $proceed
+     * @param \Magento\Catalog\Model\ResourceModel\Category $result
      * @param Category $category
      * @param Category $newParent
      * @param null|int $afterCategoryId
-     * @return callable
+     * @return \Magento\Catalog\Model\ResourceModel\Category
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundChangeParent(
+    public function afterChangeParent(
         \Magento\Catalog\Model\ResourceModel\Category $subject,
-        \Closure $proceed,
-        $category,
-        $newParent,
+        \Magento\Catalog\Model\ResourceModel\Category $result,
+        Category $category,
+        Category $newParent,
         $afterCategoryId
     ) {
-        $result = $proceed($category, $newParent, $afterCategoryId);
         $category->setUrlPath($this->categoryUrlPathGenerator->getUrlPath($category));
         $category->getResource()->saveAttribute($category, 'url_path');
         $this->updateUrlPathForChildren($category);
diff --git a/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Storage.php b/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Storage.php
index 768660e56daf5c25b6f8953bb2477aab97659d74..740c32762690e72eb588d7387f2a71467a15e2f7 100644
--- a/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Storage.php
+++ b/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Storage.php
@@ -33,14 +33,13 @@ class Storage
 
     /**
      * @param \Magento\UrlRewrite\Model\StorageInterface $object
-     * @param callable $proceed
-     * @param array $urls
+     * @param null $result
+     * @param \Magento\UrlRewrite\Service\V1\Data\UrlRewrite[] $urls
      * @return void
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundReplace(StorageInterface $object, \Closure $proceed, array $urls)
+    public function afterReplace(StorageInterface $object, $result, array $urls)
     {
-        $proceed($urls);
         $toSave = [];
         foreach ($this->filterUrls($urls) as $record) {
             $metadata = $record->getMetadata();
diff --git a/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/Group.php b/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/Group.php
index f3c86bad49936bc044d05a9fe5b6ca07ba293dad..1b18385d4a6fd8e9da1e693cf181fad8adfbd328 100644
--- a/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/Group.php
+++ b/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/Group.php
@@ -63,19 +63,19 @@ class Group
     }
 
     /**
-     * @param \Magento\Store\Model\ResourceModel\Group $object
-     * @param callable $proceed
+     * Perform updating url for categories and products assigned to the group
+     *
+     * @param \Magento\Store\Model\ResourceModel\Group $subject
+     * @param \Magento\Store\Model\ResourceModel\Group $result
      * @param AbstractModel $group
      * @return \Magento\Store\Model\ResourceModel\Group
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundSave(
-        \Magento\Store\Model\ResourceModel\Group $object,
-        \Closure $proceed,
+    public function afterSave(
+        \Magento\Store\Model\ResourceModel\Group $subject,
+        \Magento\Store\Model\ResourceModel\Group $result,
         AbstractModel $group
     ) {
-        $originGroup = $group;
-        $result = $proceed($originGroup);
         if (!$group->isObjectNew()
             && ($group->dataHasChangedFor('website_id')
                 || $group->dataHasChangedFor('root_category_id'))
diff --git a/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/View.php b/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/View.php
index ade02f8446921f74e34cb8bd3b58bc836575fe54..ea28b20f3f8f6d58211377bd9b16034d8f04a23c 100644
--- a/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/View.php
+++ b/app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/View.php
@@ -5,7 +5,6 @@
  */
 namespace Magento\CatalogUrlRewrite\Model\Category\Plugin\Store;
 
-use Magento\Catalog\Model\Category;
 use Magento\Catalog\Model\CategoryFactory;
 use Magento\Catalog\Model\ProductFactory;
 use Magento\CatalogUrlRewrite\Model\CategoryUrlRewriteGenerator;
@@ -53,19 +52,19 @@ class View
     }
 
     /**
-     * @param \Magento\Store\Model\ResourceModel\Store $object
-     * @param callable $proceed
+     * Perform updating url for categories and products assigned to the store view
+     *
+     * @param \Magento\Store\Model\ResourceModel\Store $subject
+     * @param \Magento\Store\Model\ResourceModel\Store $result
      * @param AbstractModel $store
      * @return \Magento\Store\Model\ResourceModel\Store
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundSave(
-        \Magento\Store\Model\ResourceModel\Store $object,
-        \Closure $proceed,
+    public function afterSave(
+        \Magento\Store\Model\ResourceModel\Store $subject,
+        \Magento\Store\Model\ResourceModel\Store $result,
         AbstractModel $store
     ) {
-        $originStore = $store;
-        $result = $proceed($originStore);
         if ($store->isObjectNew() || $store->dataHasChangedFor('group_id')) {
             if (!$store->isObjectNew()) {
                 $this->urlPersist->deleteByData([UrlRewrite::STORE_ID => $store->getId()]);
@@ -102,6 +101,7 @@ class View
             ->addCategoryIds()
             ->addAttributeToSelect(['name', 'url_path', 'url_key', 'visibility'])
             ->addWebsiteFilter($websiteIds);
+
         foreach ($collection as $product) {
             $product->setStoreId($storeId);
             /** @var \Magento\Catalog\Model\Product $product */
@@ -110,6 +110,7 @@ class View
                 $this->productUrlRewriteGenerator->generate($product)
             );
         }
+
         return $urls;
     }
 
@@ -130,23 +131,26 @@ class View
                 $this->categoryUrlRewriteGenerator->generate($category)
             );
         }
+
         return $urls;
     }
 
     /**
-     * @param \Magento\Store\Model\ResourceModel\Store $object
-     * @param callable $proceed
+     * Delete unused url rewrites
+     *
+     * @param \Magento\Store\Model\ResourceModel\Store $subject
+     * @param \Magento\Store\Model\ResourceModel\Store $result
      * @param AbstractModel $store
-     * @return mixed
+     * @return \Magento\Store\Model\ResourceModel\Store
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundDelete(
-        \Magento\Store\Model\ResourceModel\Store $object,
-        \Closure $proceed,
+    public function afterDelete(
+        \Magento\Store\Model\ResourceModel\Store $subject,
+        \Magento\Store\Model\ResourceModel\Store $result,
         AbstractModel $store
     ) {
-        $result = $proceed($store);
         $this->urlPersist->deleteByData([UrlRewrite::STORE_ID => $store->getId()]);
+
         return $result;
     }
 }
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Category/MoveTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Category/MoveTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..7fe042232b82d85146365136f54b02f1a1842818
--- /dev/null
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Category/MoveTest.php
@@ -0,0 +1,105 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\CatalogUrlRewrite\Test\Unit\Model\Category\Plugin\Category;
+
+use Magento\CatalogUrlRewrite\Model\Category\Plugin\Category\Move as CategoryMovePlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator;
+use Magento\CatalogUrlRewrite\Model\Category\ChildrenCategoriesProvider;
+use Magento\Catalog\Model\ResourceModel\Category as CategoryResourceModel;
+use Magento\Catalog\Model\Category;
+
+class MoveTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ObjectManager
+     */
+    private $objectManager;
+
+    /**
+     * @var ChildrenCategoriesProvider|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $childrenCategoriesProviderMock;
+
+    /**
+     * @var CategoryUrlPathGenerator|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $categoryUrlPathGeneratorMock;
+
+    /**
+     * @var CategoryResourceModel|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $subjectMock;
+
+    /**
+     * @var Category|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $categoryMock;
+
+    /**
+     * @var CategoryMovePlugin
+     */
+    private $plugin;
+
+    protected function setUp()
+    {
+        $this->objectManager = new ObjectManager($this);
+        $this->categoryUrlPathGeneratorMock = $this->getMockBuilder(CategoryUrlPathGenerator::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getUrlPath'])
+            ->getMock();
+        $this->childrenCategoriesProviderMock = $this->getMockBuilder(ChildrenCategoriesProvider::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getChildren'])
+            ->getMock();
+        $this->subjectMock = $this->getMockBuilder(CategoryResourceModel::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->categoryMock = $this->getMockBuilder(Category::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getResource', 'setUrlPath'])
+            ->getMock();
+        $this->plugin = $this->objectManager->getObject(
+            CategoryMovePlugin::class,
+            [
+                'categoryUrlPathGenerator' => $this->categoryUrlPathGeneratorMock,
+                'childrenCategoriesProvider' => $this->childrenCategoriesProviderMock
+            ]
+        );
+    }
+
+    public function testAfterChangeParent()
+    {
+        $urlPath = 'test/path';
+        $this->categoryMock->expects($this->once())
+            ->method('getResource')
+            ->willReturn($this->subjectMock);
+        $this->childrenCategoriesProviderMock->expects($this->once())
+            ->method('getChildren')
+            ->with($this->categoryMock, true)
+            ->willReturn([]);
+        $this->categoryUrlPathGeneratorMock->expects($this->once())
+            ->method('getUrlPath')
+            ->with($this->categoryMock)
+            ->willReturn($urlPath);
+        $this->categoryMock->expects($this->once())
+            ->method('getResource')
+            ->willReturn($this->subjectMock);
+        $this->categoryMock->expects($this->once())
+            ->method('setUrlPath')
+            ->with($urlPath);
+        $this->assertSame(
+            $this->subjectMock,
+            $this->plugin->afterChangeParent(
+                $this->subjectMock,
+                $this->subjectMock,
+                $this->categoryMock,
+                $this->categoryMock,
+                null
+            )
+        );
+    }
+}
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Category/RemoveTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Category/RemoveTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..520975871bf4b657a408b399c144b49353998959
--- /dev/null
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Category/RemoveTest.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\CatalogUrlRewrite\Test\Unit\Model\Category\Plugin\Category;
+
+use Magento\CatalogUrlRewrite\Model\Category\Plugin\Category\Remove as CategoryRemovePlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\UrlRewrite\Model\UrlPersistInterface;
+use Magento\CatalogUrlRewrite\Model\Category\ChildrenCategoriesProvider;
+use Magento\Catalog\Model\ResourceModel\Category as CategoryResourceModel;
+use Magento\Catalog\Model\Category;
+
+class RemoveTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ObjectManager
+     */
+    private $objectManager;
+
+    /**
+     * @var UrlPersistInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $urlPersistMock;
+
+    /**
+     * @var ChildrenCategoriesProvider|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $childrenCategoriesProviderMock;
+
+    /**
+     * @var CategoryResourceModel|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $subjectMock;
+
+    /**
+     * @var Category|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $objectMock;
+
+    protected function setUp()
+    {
+        $this->objectManager = new ObjectManager($this);
+        $this->urlPersistMock = $this->getMockBuilder(UrlPersistInterface::class)
+            ->getMockForAbstractClass();
+        $this->childrenCategoriesProviderMock = $this->getMockBuilder(ChildrenCategoriesProvider::class)
+            ->getMock();
+        $this->subjectMock = $this->getMockBuilder(CategoryResourceModel::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->objectMock = $this->getMockBuilder(Category::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+    }
+
+    public function testAroundDelete()
+    {
+        $closureSubject = $this->subjectMock;
+        $proceed  = function () use ($closureSubject) {
+            return $closureSubject;
+        };
+        $plugin = $this->objectManager->getObject(
+            CategoryRemovePlugin::class,
+            [
+                'urlPersist' => $this->urlPersistMock,
+                'childrenCategoriesProvider' => $this->childrenCategoriesProviderMock
+            ]
+        );
+        $this->childrenCategoriesProviderMock->expects($this->once())
+            ->method('getChildrenIds')
+            ->with($this->objectMock, true)
+            ->willReturn([]);
+        $this->objectMock->expects($this->once())
+            ->method('getId')
+            ->willReturn(1);
+        $this->urlPersistMock->expects($this->exactly(2))
+            ->method('deleteByData');
+        $this->assertSame(
+            $this->subjectMock,
+            $plugin->aroundDelete($this->subjectMock, $proceed, $this->objectMock)
+        );
+    }
+}
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/StorageTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/StorageTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..21ab961dcbdcb3b1c5eb08d5d59bd176b87c321a
--- /dev/null
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/StorageTest.php
@@ -0,0 +1,106 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\CatalogUrlRewrite\Test\Unit\Model\Category\Plugin;
+
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\CatalogUrlRewrite\Model\Category\ProductFactory;
+use Magento\UrlRewrite\Model\StorageInterface;
+use Magento\CatalogUrlRewrite\Model\Category\Plugin\Storage as CategoryStoragePlugin;
+use Magento\UrlRewrite\Service\V1\Data\UrlRewrite;
+use Magento\UrlRewrite\Model\UrlFinderInterface;
+use Magento\CatalogUrlRewrite\Model\Category\Product;
+use Magento\CatalogUrlRewrite\Model\ResourceModel\Category\Product as ProductResourceModel;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class StorageTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CategoryStoragePlugin
+     */
+    private $plugin;
+
+    /**
+     * @var ProductFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productFactory;
+
+    /**
+     * @var UrlFinderInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $urlFinder;
+
+    /**
+     * @var StorageInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $storage;
+
+    /**
+     * @var Product|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $product;
+
+    /**
+     * @var ProductResourceModel|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productResourceModel;
+
+    /**
+     * @var UrlRewrite|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $urlRewrite;
+
+    protected function setUp()
+    {
+        $this->productFactory = $this->getMockBuilder(ProductFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $this->storage = $this->getMockBuilder(StorageInterface::class)
+            ->getMockForAbstractClass();
+        $this->urlFinder = $this->getMockBuilder(UrlFinderInterface::class)
+            ->getMockForAbstractClass();
+        $this->product = $this->getMockBuilder(Product::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->productResourceModel = $this->getMockBuilder(ProductResourceModel::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->urlRewrite = $this->getMockBuilder(UrlRewrite::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getMetadata', 'getEntityType', 'getIsAutogenerated', 'getUrlRewriteId', 'getEntityId'])
+            ->getMock();
+
+        $this->plugin = (new ObjectManager($this))->getObject(
+            CategoryStoragePlugin::class,
+            [
+                'productFactory' => $this->productFactory,
+                'urlFinder' => $this->urlFinder
+            ]
+        );
+    }
+
+    public function testAfterReplace()
+    {
+        $this->urlRewrite->expects(static::any())->method('getMetadata')->willReturn(['category_id' => '5']);
+        $this->urlRewrite->expects(static::once())->method('getEntityTYpe')->willReturn('product');
+        $this->urlRewrite->expects(static::once())->method('getIsAutogenerated')->willReturn(1);
+        $this->urlRewrite->expects(static::once())->method('getUrlRewriteId')->willReturn('4');
+        $this->urlRewrite->expects(static::once())->method('getEntityId')->willReturn('2');
+        $this->urlRewrite->setData('request_path', 'test');
+        $this->urlRewrite->setData('store_id', '1');
+        $productUrls = ['targetPath' => $this->urlRewrite];
+
+        $this->urlFinder->expects(static::once())->method('findAllByData')->willReturn([$this->urlRewrite]);
+
+        $this->productFactory->expects(static::once())->method('create')->willReturn($this->product);
+        $this->product->expects(static::once())->method('getResource')->willReturn($this->productResourceModel);
+        $this->productResourceModel->expects(static::once())->method('saveMultiple')->willReturnSelf();
+
+        $this->plugin->afterReplace($this->storage, null, $productUrls);
+    }
+}
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Store/GroupTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Store/GroupTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..dc69597ef6db9ccd1299c6e7887239c890bb05e5
--- /dev/null
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Store/GroupTest.php
@@ -0,0 +1,178 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\CatalogUrlRewrite\Test\Unit\Model\Category\Plugin\Store;
+
+use Magento\CatalogUrlRewrite\Model\Category\Plugin\Store\Group as GroupPlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\Model\AbstractModel;
+use Magento\Store\Model\StoreManagerInterface;
+use Magento\Store\Model\ResourceModel\Group;
+use Magento\Catalog\Model\Category;
+use Magento\Catalog\Model\CategoryFactory;
+use Magento\Catalog\Model\ResourceModel\Product\Collection as ProductCollection;
+use Magento\Catalog\Model\Product as Product;
+use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator;
+use Magento\Catalog\Model\ProductFactory;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class GroupTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ObjectManager
+     */
+    private $objectManager;
+
+    /**
+     * @var GroupPlugin
+     */
+    private $plugin;
+
+    /**
+     * @var AbstractModel|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $abstractModelMock;
+
+    /**
+     * @var Group|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $subjectMock;
+
+    /**
+     * @var StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $storeManagerMock;
+
+    /**
+     * @var CategoryFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $categoryFactoryMock;
+
+    /**
+     * @var Category|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $categoryMock;
+
+    /**
+     * @var ProductCollection|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productCollectionMock;
+
+    /**
+     * @var Product|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productMock;
+
+    /**
+     * @var ProductFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productFactoryMock;
+
+    /**
+     * @var ProductUrlRewriteGenerator|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productUrlRewriteGeneratorMock;
+
+    protected function setUp()
+    {
+        $this->objectManager = new ObjectManager($this);
+        $this->abstractModelMock = $this->getMockBuilder(AbstractModel::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['isObjectNew', 'dataHasChangedFor', 'getStoreIds'])
+            ->getMockForAbstractClass();
+        $this->abstractModelMock->expects($this->any())
+            ->method('getStoreIds')
+            ->willReturn([]);
+        $this->subjectMock = $this->getMockBuilder(Group::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->storeManagerMock = $this->getMockBuilder(StoreManagerInterface::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['reinitStores'])
+            ->getMockForAbstractClass();
+        $this->categoryMock = $this->getMockBuilder(Category::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getCategories'])
+            ->getMock();
+        $this->categoryFactoryMock = $this->getMockBuilder(CategoryFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $this->productFactoryMock = $this->getMockBuilder(ProductFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $this->productCollectionMock = $this->getMockBuilder(ProductCollection::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['addCategoryIds', 'addAttributeToSelect', 'addWebsiteFilter', 'getIterator'])
+            ->getMock();
+        $this->productMock = $this->getMockBuilder(Product::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getCollection'])
+            ->getMock();
+        $this->productUrlRewriteGeneratorMock = $this->getMockBuilder(ProductUrlRewriteGenerator::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['generate'])
+            ->getMock();
+        $this->plugin = $this->objectManager->getObject(
+            GroupPlugin::class,
+            [
+                'storeManager' => $this->storeManagerMock,
+                'categoryFactory' => $this->categoryFactoryMock,
+                'productFactory' => $this->productFactoryMock,
+                'productUrlRewriteGenerator' => $this->productUrlRewriteGeneratorMock
+            ]
+        );
+    }
+
+    public function testAfterSave()
+    {
+        $this->abstractModelMock->expects($this->once())
+            ->method('isObjectNew')
+            ->willReturn(false);
+        $this->abstractModelMock->expects($this->once())
+            ->method('dataHasChangedFor')
+            ->with('website_id')
+            ->willReturn(true);
+        $this->storeManagerMock->expects($this->once())
+            ->method('reinitStores');
+        $this->categoryMock->expects($this->once())
+            ->method('getCategories')
+            ->willReturn([]);
+        $this->categoryFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($this->categoryMock);
+        $this->productFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($this->productMock);
+        $this->productMock->expects($this->once())
+            ->method('getCollection')
+            ->willReturn($this->productCollectionMock);
+        $this->productCollectionMock->expects($this->once())
+            ->method('addCategoryIds')
+            ->willReturn($this->productCollectionMock);
+        $this->productCollectionMock->expects($this->once())
+            ->method('addAttributeToSelect')
+            ->willReturn($this->productCollectionMock);
+        $this->productCollectionMock->expects($this->once())
+            ->method('addWebsiteFilter')
+            ->willReturn($this->productCollectionMock);
+        $iterator = new \ArrayIterator([$this->productMock]);
+        $this->productCollectionMock->expects($this->once())
+            ->method('getIterator')
+            ->willReturn($iterator);
+        $this->productUrlRewriteGeneratorMock->expects($this->once())
+            ->method('generate')
+            ->with($this->productMock)
+            ->willReturn([]);
+
+        $this->assertSame(
+            $this->subjectMock,
+            $this->plugin->afterSave($this->subjectMock, $this->subjectMock, $this->abstractModelMock)
+        );
+    }
+}
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Store/ViewTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Store/ViewTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d30c2dde6e033fd3f3d10300ed59aa7a6c249916
--- /dev/null
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/Category/Plugin/Store/ViewTest.php
@@ -0,0 +1,188 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\CatalogUrlRewrite\Test\Unit\Model\Category\Plugin\Store;
+
+use Magento\CatalogUrlRewrite\Model\Category\Plugin\Store\View as StoreViewPlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\Model\AbstractModel;
+use Magento\Store\Model\ResourceModel\Store;
+use Magento\UrlRewrite\Model\UrlPersistInterface;
+use Magento\Catalog\Model\CategoryFactory;
+use Magento\Catalog\Model\ProductFactory;
+use Magento\CatalogUrlRewrite\Model\CategoryUrlRewriteGenerator;
+use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator;
+use Magento\Catalog\Model\Category;
+use Magento\Catalog\Model\ResourceModel\Product\Collection as ProductCollection;
+use Magento\Catalog\Model\Product;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class ViewTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ObjectManager
+     */
+    private $objectManager;
+
+    /**
+     * @var StoreViewPlugin
+     */
+    private $plugin;
+
+    /**
+     * @var AbstractModel|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $abstractModelMock;
+
+    /**
+     * @var Store|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $subjectMock;
+
+    /**
+     * @var UrlPersistInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $urlPersistMock;
+
+    /**
+     * @var CategoryFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $categoryFactoryMock;
+
+    /**
+     * @var ProductFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productFactoryMock;
+
+    /**
+     * @var CategoryUrlRewriteGenerator|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $categoryUrlRewriteGeneratorMock;
+
+    /**
+     * @var ProductUrlRewriteGenerator|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productUrlRewriteGeneratorMock;
+
+    /**
+     * @var Category|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $categoryMock;
+
+    /**
+     * @var ProductCollection|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productCollectionMock;
+
+    /**
+     * @var Product|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $productMock;
+
+    protected function setUp()
+    {
+        $this->objectManager = new ObjectManager($this);
+        $this->abstractModelMock = $this->getMockBuilder(AbstractModel::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['isObjectNew'])
+            ->getMockForAbstractClass();
+        $this->subjectMock = $this->getMockBuilder(Store::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->urlPersistMock = $this->getMockBuilder(UrlPersistInterface::class)
+            ->setMethods(['deleteByData'])
+            ->getMockForAbstractClass();
+        $this->categoryMock = $this->getMockBuilder(Category::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getCategories'])
+            ->getMock();
+        $this->categoryFactoryMock = $this->getMockBuilder(CategoryFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $this->productFactoryMock = $this->getMockBuilder(ProductFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $this->categoryUrlRewriteGeneratorMock = $this->getMockBuilder(CategoryUrlRewriteGenerator::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->productUrlRewriteGeneratorMock = $this->getMockBuilder(ProductUrlRewriteGenerator::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['generate'])
+            ->getMock();
+        $this->productCollectionMock = $this->getMockBuilder(ProductCollection::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['addCategoryIds', 'addAttributeToSelect', 'addWebsiteFilter', 'getIterator'])
+            ->getMock();
+        $this->productMock = $this->getMockBuilder(Product::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getCollection'])
+            ->getMock();
+        $this->plugin = $this->objectManager->getObject(
+            StoreViewPlugin::class,
+            [
+                'urlPersist' => $this->urlPersistMock,
+                'categoryFactory' => $this->categoryFactoryMock,
+                'productFactory' => $this->productFactoryMock,
+                'categoryUrlRewriteGenerator' => $this->categoryUrlRewriteGeneratorMock,
+                'productUrlRewriteGenerator' => $this->productUrlRewriteGeneratorMock
+            ]
+        );
+    }
+
+    public function testAfterSave()
+    {
+        $this->abstractModelMock->expects($this->any())
+            ->method('isObjectNew')
+            ->willReturn(true);
+        $this->categoryMock->expects($this->once())
+            ->method('getCategories')
+            ->willReturn([]);
+        $this->categoryFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($this->categoryMock);
+        $this->productFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($this->productMock);
+        $this->productMock->expects($this->once())
+            ->method('getCollection')
+            ->willReturn($this->productCollectionMock);
+        $this->productCollectionMock->expects($this->once())
+            ->method('addCategoryIds')
+            ->willReturn($this->productCollectionMock);
+        $this->productCollectionMock->expects($this->once())
+            ->method('addAttributeToSelect')
+            ->willReturn($this->productCollectionMock);
+        $this->productCollectionMock->expects($this->once())
+            ->method('addWebsiteFilter')
+            ->willReturn($this->productCollectionMock);
+        $iterator = new \ArrayIterator([$this->productMock]);
+        $this->productCollectionMock->expects($this->once())
+            ->method('getIterator')
+            ->willReturn($iterator);
+        $this->productUrlRewriteGeneratorMock->expects($this->once())
+            ->method('generate')
+            ->with($this->productMock)
+            ->willReturn([]);
+
+        $this->assertSame(
+            $this->subjectMock,
+            $this->plugin->afterSave($this->subjectMock, $this->subjectMock, $this->abstractModelMock)
+        );
+    }
+
+    public function testAfterDelete()
+    {
+        $this->urlPersistMock->expects($this->once())
+            ->method('deleteByData');
+        $this->assertSame(
+            $this->subjectMock,
+            $this->plugin->afterDelete($this->subjectMock, $this->subjectMock, $this->abstractModelMock)
+        );
+    }
+}
diff --git a/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml b/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml
index df63335ed3c0685ec9c43d61f2e2152941630ad1..f5f2b898a97a8463d0ea161eebf5aa7d22b31cfa 100644
--- a/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml
+++ b/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml
@@ -6,16 +6,17 @@
 
 // @codingStandardsIgnoreFile
 
-?>
-<?php
+/** @var \Magento\CatalogWidget\Block\Product\Widget\Conditions $block */
+
 $element = $block->getElement();
-$fieldId = ($element->getHtmlContainerId()) ? ' id="' . $element->getHtmlContainerId() . '"' : '';
-$fieldClass = "field admin__field field-{$element->getId()} {$element->getCssClass()}";
-$fieldClass .= ($element->getRequired()) ? ' required' : '';
-$fieldAttributes = $fieldId . ' class="' . $fieldClass . '" ' . $block->getUiId('form-field', $element->getId());
+$fieldId = $element->getHtmlContainerId() ? ' id="' . $block->escapeHtmlAttr($element->getHtmlContainerId()) . '"' : '';
+$fieldClass = 'field admin__field field-' . $block->escapeHtmlAttr($element->getId()) . ' '
+    . $block->escapeHtmlAttr($element->getCssClass());
+$fieldClass .= $element->getRequired() ? ' required' : '';
+$fieldAttributes = $fieldId . ' class="' . $fieldClass . '" '
+    . $block->getUiId('form-field', $block->escapeHtmlAttr($element->getId()));
 ?>
-
-<div<?php /* @escapeNotVerified */ echo $fieldAttributes ?>>
+<div<?php /* @noEscape */ echo $fieldAttributes ?>>
     <?php echo $element->getLabelHtml() ?>
     <div class="control admin__field-control">
         <div class="rule-tree">
@@ -32,6 +33,6 @@ $fieldAttributes = $fieldId . ' class="' . $fieldClass . '" ' . $block->getUiId(
         "Magento_Rule/rules",
         "prototype"
     ], function(VarienRulesForm){
-        window.<?php echo $block->getHtmlId() ?> = new VarienRulesForm('<?php echo $block->getHtmlId() ?>', '<?php /* @escapeNotVerified */ echo $block->getNewChildUrl() ?>');
+        window.<?php echo $block->escapeJs($block->getHtmlId()) ?> = new VarienRulesForm('<?php echo $block->escapeJs($block->getHtmlId()) ?>', '<?php echo $block->escapeUrl($block->getNewChildUrl()) ?>');
     });
 </script>
diff --git a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml
index 13be83f1493644340e1ba80639bf85e35f7bbf69..080714bd228de24f0aa69cae014cb554ef814c53 100644
--- a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml
+++ b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml
@@ -6,15 +6,9 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\CatalogWidget\Block\Product\ProductsList $block */
 ?>
-<?php
-/**
- * Template for displaying products list widget
- *
- * @var $block \Magento\CatalogWidget\Block\Product\ProductsList
- */
-?>
-<?php if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())):?>
+<?php if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())): ?>
 <?php
     $type = 'widget-product-grid';
 
@@ -30,27 +24,28 @@
     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::DEFAULT_VIEW;
     $description = false;
 ?>
-    <div class="block widget block-products-list <?php /* @escapeNotVerified */ echo $mode; ?>">
-        <?php if ($title):?>
+    <div class="block widget block-products-list <?php /* @noEscape */ echo $mode; ?>">
+        <?php if ($title): ?>
         <div class="block-title">
-            <strong><?php /* @escapeNotVerified */ echo $title; ?></strong>
+            <strong><?php echo $block->escapeHtml($title); ?></strong>
         </div>
         <?php endif ?>
         <div class="block-content">
-            <?php /* @escapeNotVerified */ echo '<!-- ' . $image . '-->' ?>
-            <div class="products-<?php /* @escapeNotVerified */ echo $mode; ?> <?php /* @escapeNotVerified */ echo $mode; ?>">
-                <ol class="product-items <?php /* @escapeNotVerified */ echo $type; ?>">
+            <?php /* @noEscape */ echo '<!-- ' . $image . '-->' ?>
+            <div class="products-<?php /* @noEscape */ echo $mode; ?> <?php /* @noEscape */ echo $mode; ?>">
+                <ol class="product-items <?php /* @noEscape */ echo $type; ?>">
                     <?php $iterator = 1; ?>
                     <?php foreach ($items as $_item): ?>
-                        <?php /* @escapeNotVerified */ echo($iterator++ == 1) ? '<li class="product-item">' : '</li><li class="product-item">' ?>
+                        <?php if ($iterator++ != 1): ?></li><?php endif ?>
+                        <li class="product-item">
                         <div class="product-item-info">
-                            <a href="<?php /* @escapeNotVerified */ echo $block->getProductUrl($_item) ?>" class="product-item-photo">
+                            <a href="<?php echo $block->escapeUrl($block->getProductUrl($_item)) ?>" class="product-item-photo">
                                 <?php echo $block->getImage($_item, $image)->toHtml(); ?>
                             </a>
                             <div class="product-item-details">
                                 <strong class="product-item-name">
                                     <a title="<?php echo $block->escapeHtml($_item->getName()) ?>"
-                                       href="<?php /* @escapeNotVerified */ echo $block->getProductUrl($_item) ?>"
+                                       href="<?php echo $block->escapeUrl($block->getProductUrl($_item)) ?>"
                                        class="product-item-link">
                                         <?php echo $block->escapeHtml($_item->getName()) ?>
                                     </a>
@@ -70,7 +65,7 @@
                                                 <?php if ($_item->isSaleable()): ?>
                                                     <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
                                                         <button class="action tocart primary"
-                                                                data-mage-init='{"redirectUrl":{"url":"<?php /* @escapeNotVerified */ echo $block->getAddToCartUrl($_item) ?>"}}'
+                                                                data-mage-init='{"redirectUrl":{"url":"<?php echo $block->escapeUrl($block->getAddToCartUrl($_item)) ?>"}}'
                                                                 type="button" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>">
                                                             <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
                                                         </button>
@@ -80,7 +75,7 @@
                                                             $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
                                                         ?>
                                                         <button class="action tocart primary"
-                                                                data-post='<?php /* @escapeNotVerified */ echo $postData; ?>'
+                                                                data-post='<?php /* @noEscape */ echo $postData; ?>'
                                                                 type="button" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>">
                                                             <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
                                                         </button>
@@ -98,7 +93,7 @@
                                             <div class="actions-secondary" data-role="add-to-links">
                                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?>
                                                     <a href="#"
-                                                       data-post='<?php /* @escapeNotVerified */ echo $block->getAddToWishlistParams($_item); ?>'
+                                                       data-post='<?php /* @noEscape */ echo $block->getAddToWishlistParams($_item); ?>'
                                                        class="action towishlist" data-action="add-to-wishlist"
                                                        title="<?php /* @escapeNotVerified */ echo __('Add to Wish List') ?>">
                                                         <span><?php /* @escapeNotVerified */ echo __('Add to Wish List') ?></span>
@@ -107,7 +102,7 @@
                                                 <?php if ($block->getAddToCompareUrl() && $showCompare): ?>
                                                     <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
                                                     <a href="#" class="action tocompare"
-                                                       data-post='<?php /* @escapeNotVerified */ echo $compareHelper->getPostDataParams($_item);?>'
+                                                       data-post='<?php /* @noEscape */ echo $compareHelper->getPostDataParams($_item);?>'
                                                        title="<?php /* @escapeNotVerified */ echo __('Add to Compare') ?>">
                                                         <span><?php /* @escapeNotVerified */ echo __('Add to Compare') ?></span>
                                                     </a>
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js b/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js
index c51fa8fa16bfbddb017fcd743db580ed7587206a..e06b8922b2252fd497db66a79db35af8c543db09 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js
@@ -25,6 +25,10 @@ define([
             isMultipleCountriesAllowed: true
         },
 
+        /**
+         *
+         * @private
+         */
         _create: function () {
             this._initCountryElement();
 
@@ -43,12 +47,18 @@ define([
             }, this));
         },
 
-        _initCountryElement: function() {
+        /**
+         *
+         * @private
+         */
+        _initCountryElement: function () {
+
             if (this.options.isMultipleCountriesAllowed) {
                 this.element.parents('div.field').show();
                 this.element.on('change', $.proxy(function (e) {
                     this._updateRegion($(e.target).val());
                 }, this));
+
                 if (this.options.isCountryRequired) {
                     this.element.addClass('required-entry');
                     this.element.parents('div.field').addClass('required');
@@ -60,6 +70,7 @@ define([
 
         /**
          * Remove options from dropdown list
+         *
          * @param {Object} selectElement - jQuery object for dropdown list
          * @private
          */
@@ -113,7 +124,7 @@ define([
          * @private
          */
         _clearError: function () {
-            if (this.options.clearError && typeof (this.options.clearError) === 'function') {
+            if (this.options.clearError && typeof this.options.clearError === 'function') {
                 this.options.clearError.call(this);
             } else {
                 if (!this.options.form) {
@@ -122,12 +133,19 @@ define([
 
                 this.options.form = $(this.options.form);
 
-                this.options.form && this.options.form.data('validation') && this.options.form.validation('clearError',
+                this.options.form && this.options.form.data('validator') && this.options.form.validation('clearError',
                     this.options.regionListId, this.options.regionInputId, this.options.postcodeId);
+
+                // Clean up errors on region & zip fix
+                $(this.options.regionInputId).removeClass('mage-error').parent().find('[generated]').remove();
+                $(this.options.regionListId).removeClass('mage-error').parent().find('[generated]').remove();
+                $(this.options.postcodeId).removeClass('mage-error').parent().find('[generated]').remove();
             }
         },
+
         /**
          * Update dropdown list based on the country selected
+         *
          * @param {String} country - 2 uppercase letter for country code
          * @private
          */
@@ -182,11 +200,12 @@ define([
                     if (!this.options.optionalRegionAllowed) {
                         regionInput.attr('disabled', 'disabled');
                     }
+                    requiredLabel.removeClass('required');
+                    regionInput.removeClass('required-entry');
                 }
 
                 regionList.removeClass('required-entry').hide();
                 regionInput.show();
-                requiredLabel.removeClass('required');
                 label.attr('for', regionInput.attr('id'));
             }
 
@@ -208,10 +227,11 @@ define([
          * @private
          */
         _checkRegionRequired: function (country) {
-            this.options.isRegionRequired = false;
             var self = this;
+
+            this.options.isRegionRequired = false;
             $.each(this.options.regionJson.config.regions_required, function (index, elem) {
-                if (elem == country) {
+                if (elem === country) {
                     self.options.isRegionRequired = true;
                 }
             });
diff --git a/app/code/Magento/Cms/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/BlockStoreFilter.php b/app/code/Magento/Cms/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/BlockStoreFilter.php
new file mode 100644
index 0000000000000000000000000000000000000000..bf2a6b2a5a5c8f253450696a20d8aa3be8fb97a3
--- /dev/null
+++ b/app/code/Magento/Cms/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/BlockStoreFilter.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class BlockStoreFilter implements CustomFilterInterface
+{
+    /**
+     * Apply custom store filter to collection
+     *
+     * @param Filter $filter
+     * @param AbstractDb $collection
+     * @return bool
+     */
+    public function apply(Filter $filter, AbstractDb $collection)
+    {
+        /** @var \Magento\Cms\Model\ResourceModel\Block\Collection $collection */
+        $collection->addStoreFilter($filter->getValue(), false);
+
+        return true;
+    }
+}
diff --git a/app/code/Magento/Cms/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/PageStoreFilter.php b/app/code/Magento/Cms/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/PageStoreFilter.php
new file mode 100644
index 0000000000000000000000000000000000000000..20ad94e6975e0b41c56845dc640cff52a2c58361
--- /dev/null
+++ b/app/code/Magento/Cms/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/PageStoreFilter.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class PageStoreFilter implements CustomFilterInterface
+{
+    /**
+     * Apply custom store filter to collection
+     *
+     * @param Filter $filter
+     * @param AbstractDb $collection
+     * @return bool
+     */
+    public function apply(Filter $filter, AbstractDb $collection)
+    {
+        /** @var \Magento\Cms\Model\ResourceModel\Page\Collection $collection */
+        $collection->addStoreFilter($filter->getValue(), false);
+
+        return true;
+    }
+}
diff --git a/app/code/Magento/Cms/Model/BlockRepository.php b/app/code/Magento/Cms/Model/BlockRepository.php
index dd9e1eec77696aab3a7b66d5a2c588b9e37ed82b..5719316dc3674dc8e1d6f21fe3c1c91e658aa28a 100644
--- a/app/code/Magento/Cms/Model/BlockRepository.php
+++ b/app/code/Magento/Cms/Model/BlockRepository.php
@@ -8,7 +8,7 @@ namespace Magento\Cms\Model;
 use Magento\Cms\Api\Data;
 use Magento\Cms\Api\BlockRepositoryInterface;
 use Magento\Framework\Api\DataObjectHelper;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Exception\CouldNotDeleteException;
 use Magento\Framework\Exception\CouldNotSaveException;
 use Magento\Framework\Exception\NoSuchEntityException;
@@ -63,6 +63,11 @@ class BlockRepository implements BlockRepositoryInterface
      */
     private $storeManager;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param ResourceBlock $resource
      * @param BlockFactory $blockFactory
@@ -72,6 +77,7 @@ class BlockRepository implements BlockRepositoryInterface
      * @param DataObjectHelper $dataObjectHelper
      * @param DataObjectProcessor $dataObjectProcessor
      * @param StoreManagerInterface $storeManager
+     * @param CollectionProcessorInterface $collectionProcessor
      */
     public function __construct(
         ResourceBlock $resource,
@@ -81,7 +87,8 @@ class BlockRepository implements BlockRepositoryInterface
         Data\BlockSearchResultsInterfaceFactory $searchResultsFactory,
         DataObjectHelper $dataObjectHelper,
         DataObjectProcessor $dataObjectProcessor,
-        StoreManagerInterface $storeManager
+        StoreManagerInterface $storeManager,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->resource = $resource;
         $this->blockFactory = $blockFactory;
@@ -91,6 +98,7 @@ class BlockRepository implements BlockRepositoryInterface
         $this->dataBlockFactory = $dataBlockFactory;
         $this->dataObjectProcessor = $dataObjectProcessor;
         $this->storeManager = $storeManager;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -139,27 +147,11 @@ class BlockRepository implements BlockRepositoryInterface
      */
     public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria)
     {
-        $searchResults = $this->searchResultsFactory->create();
-        $searchResults->setSearchCriteria($criteria);
-
         /** @var \Magento\Cms\Model\ResourceModel\Block\Collection $collection */
         $collection = $this->blockCollectionFactory->create();
-        foreach ($criteria->getFilterGroups() as $filterGroup) {
-            $this->addFilterGroupToCollection($filterGroup, $collection);
-        }
 
-        $searchResults->setTotalCount($collection->getSize());
-        $sortOrders = $criteria->getSortOrders();
-        if ($sortOrders) {
-            foreach ($sortOrders as $sortOrder) {
-                $collection->addOrder(
-                    $sortOrder->getField(),
-                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-                );
-            }
-        }
-        $collection->setCurPage($criteria->getCurrentPage());
-        $collection->setPageSize($criteria->getPageSize());
+        $this->collectionProcessor->process($criteria, $collection);
+
         $blocks = [];
         /** @var Block $blockModel */
         foreach ($collection as $blockModel) {
@@ -174,7 +166,12 @@ class BlockRepository implements BlockRepositoryInterface
                 \Magento\Cms\Api\Data\BlockInterface::class
             );
         }
+
+        /** @var Data\BlockSearchResultsInterface $searchResults */
+        $searchResults = $this->searchResultsFactory->create();
+        $searchResults->setSearchCriteria($criteria);
         $searchResults->setItems($blocks);
+        $searchResults->setTotalCount($collection->getSize());
         return $searchResults;
     }
 
@@ -209,31 +206,18 @@ class BlockRepository implements BlockRepositoryInterface
     }
 
     /**
-     * Helper function that adds a FilterGroup to the collection.
+     * Retrieve collection processor
      *
-     * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
-     * @param \Magento\Cms\Model\ResourceModel\Block\Collection $collection
-     * @return void
-     * @throws \Magento\Framework\Exception\InputException
-     */
-    private function addFilterGroupToCollection(
-        \Magento\Framework\Api\Search\FilterGroup $filterGroup,
-        \Magento\Cms\Model\ResourceModel\Block\Collection $collection
-    ) {
-        $fields = [];
-        $conditions = [];
-        foreach ($filterGroup->getFilters() as $filter) {
-            if ($filter->getField() === 'store_id') {
-                $collection->addStoreFilter($filter->getValue(), false);
-                continue;
-            }
-            $condition = $filter->getConditionType() ?: 'eq';
-            $fields[] = $filter->getField();
-            $conditions[] = [$condition => $filter->getValue()];
-        }
-
-        if ($fields) {
-            $collection->addFieldToFilter($fields, $conditions);
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Cms\Model\Api\SearchCriteria\BlockCollectionProcessor'
+            );
         }
+        return $this->collectionProcessor;
     }
 }
diff --git a/app/code/Magento/Cms/Model/PageRepository.php b/app/code/Magento/Cms/Model/PageRepository.php
index cce61f343a8e15de710befaaf9c9d4363221d5b0..9ab3b03d4ae2449d6d9b9807092840538b420a52 100644
--- a/app/code/Magento/Cms/Model/PageRepository.php
+++ b/app/code/Magento/Cms/Model/PageRepository.php
@@ -8,7 +8,7 @@ namespace Magento\Cms\Model;
 use Magento\Cms\Api\Data;
 use Magento\Cms\Api\PageRepositoryInterface;
 use Magento\Framework\Api\DataObjectHelper;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Exception\CouldNotDeleteException;
 use Magento\Framework\Exception\CouldNotSaveException;
 use Magento\Framework\Exception\NoSuchEntityException;
@@ -63,6 +63,11 @@ class PageRepository implements PageRepositoryInterface
      */
     private $storeManager;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param ResourcePage $resource
      * @param PageFactory $pageFactory
@@ -72,6 +77,7 @@ class PageRepository implements PageRepositoryInterface
      * @param DataObjectHelper $dataObjectHelper
      * @param DataObjectProcessor $dataObjectProcessor
      * @param StoreManagerInterface $storeManager
+     * @param CollectionProcessorInterface $collectionProcessor
      */
     public function __construct(
         ResourcePage $resource,
@@ -81,7 +87,8 @@ class PageRepository implements PageRepositoryInterface
         Data\PageSearchResultsInterfaceFactory $searchResultsFactory,
         DataObjectHelper $dataObjectHelper,
         DataObjectProcessor $dataObjectProcessor,
-        StoreManagerInterface $storeManager
+        StoreManagerInterface $storeManager,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->resource = $resource;
         $this->pageFactory = $pageFactory;
@@ -91,6 +98,7 @@ class PageRepository implements PageRepositoryInterface
         $this->dataPageFactory = $dataPageFactory;
         $this->dataObjectProcessor = $dataObjectProcessor;
         $this->storeManager = $storeManager;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -144,28 +152,11 @@ class PageRepository implements PageRepositoryInterface
      */
     public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria)
     {
-        $searchResults = $this->searchResultsFactory->create();
-        $searchResults->setSearchCriteria($criteria);
-
         /** @var \Magento\Cms\Model\ResourceModel\Page\Collection $collection */
         $collection = $this->pageCollectionFactory->create();
-        foreach ($criteria->getFilterGroups() as $filterGroup) {
-            $this->addFilterGroupToCollection($filterGroup, $collection);
-        }
 
-        $searchResults->setTotalCount($collection->getSize());
-        $sortOrders = $criteria->getSortOrders();
-        if ($sortOrders) {
-            /** @var SortOrder $sortOrder */
-            foreach ($sortOrders as $sortOrder) {
-                $collection->addOrder(
-                    $sortOrder->getField(),
-                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-                );
-            }
-        }
-        $collection->setCurPage($criteria->getCurrentPage());
-        $collection->setPageSize($criteria->getPageSize());
+        $this->collectionProcessor->process($criteria, $collection);
+
         $pages = [];
         /** @var Page $pageModel */
         foreach ($collection as $pageModel) {
@@ -180,7 +171,12 @@ class PageRepository implements PageRepositoryInterface
                 \Magento\Cms\Api\Data\PageInterface::class
             );
         }
+
+        /** @var Data\PageSearchResultsInterface $searchResults */
+        $searchResults = $this->searchResultsFactory->create();
+        $searchResults->setSearchCriteria($criteria);
         $searchResults->setItems($pages);
+        $searchResults->setTotalCount($collection->getSize());
         return $searchResults;
     }
 
@@ -218,31 +214,18 @@ class PageRepository implements PageRepositoryInterface
     }
 
     /**
-     * Helper function that adds a FilterGroup to the collection.
+     * Retrieve collection processor
      *
-     * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
-     * @param \Magento\Cms\Model\ResourceModel\Page\Collection $collection
-     * @return void
-     * @throws \Magento\Framework\Exception\InputException
-     */
-    private function addFilterGroupToCollection(
-        \Magento\Framework\Api\Search\FilterGroup $filterGroup,
-        \Magento\Cms\Model\ResourceModel\Page\Collection $collection
-    ) {
-        $fields = [];
-        $conditions = [];
-        foreach ($filterGroup->getFilters() as $filter) {
-            if ($filter->getField() === 'store_id') {
-                $collection->addStoreFilter($filter->getValue(), false);
-                continue;
-            }
-            $condition = $filter->getConditionType() ?: 'eq';
-            $fields[] = $filter->getField();
-            $conditions[] = [$condition => $filter->getValue()];
-        }
-
-        if ($fields) {
-            $collection->addFieldToFilter($fields, $conditions);
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Cms\Model\Api\SearchCriteria\PageCollectionProcessor'
+            );
         }
+        return $this->collectionProcessor;
     }
 }
diff --git a/app/code/Magento/Cms/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/BlockStoreFilterTest.php b/app/code/Magento/Cms/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/BlockStoreFilterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..8f96abdcbab5c3aad76da8616a2dce14964f221e
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/BlockStoreFilterTest.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Cms\Test\Unit\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\BlockStoreFilter;
+
+class BlockStoreFilterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var BlockStoreFilter
+     */
+    private $filter;
+
+    protected function setUp()
+    {
+        $this->filter = new BlockStoreFilter();
+    }
+
+    public function testApply()
+    {
+        $filterValue = 'filter_value';
+
+        $filterMock = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($filterValue);
+
+        $collectionMock = $this->getMockBuilder(\Magento\Cms\Model\ResourceModel\Block\Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $collectionMock->expects($this->once())
+            ->method('addStoreFilter')
+            ->with($filterValue, false)
+            ->willReturnSelf();
+
+        $this->assertTrue($this->filter->apply($filterMock, $collectionMock));
+    }
+}
diff --git a/app/code/Magento/Cms/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/PageStoreFilterTest.php b/app/code/Magento/Cms/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/PageStoreFilterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..4d4a6ff4efa52ce82c470c6bf1e48db5a42e9784
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/PageStoreFilterTest.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Cms\Test\Unit\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\PageStoreFilter;
+
+class PageStoreFilterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PageStoreFilter
+     */
+    private $filter;
+
+    protected function setUp()
+    {
+        $this->filter = new PageStoreFilter();
+    }
+
+    public function testApply()
+    {
+        $filterValue = 'filter_value';
+
+        $filterMock = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($filterValue);
+
+        $collectionMock = $this->getMockBuilder(\Magento\Cms\Model\ResourceModel\Page\Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $collectionMock->expects($this->once())
+            ->method('addStoreFilter')
+            ->with($filterValue, false)
+            ->willReturnSelf();
+
+        $this->assertTrue($this->filter->apply($filterMock, $collectionMock));
+    }
+}
diff --git a/app/code/Magento/Cms/Test/Unit/Model/BlockRepositoryTest.php b/app/code/Magento/Cms/Test/Unit/Model/BlockRepositoryTest.php
index c6f7eb7592775c3aec8f257ebe4a395e8d1605df..3144d38a96c80465eaf7fbdb1bda21f923f889e9 100644
--- a/app/code/Magento/Cms/Test/Unit/Model/BlockRepositoryTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Model/BlockRepositoryTest.php
@@ -6,7 +6,7 @@
 namespace Magento\Cms\Test\Unit\Model;
 
 use Magento\Cms\Model\BlockRepository;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 
 /**
  * Test for Magento\Cms\Model\BlockRepository
@@ -60,6 +60,11 @@ class BlockRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     private $storeManager;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * Initialize repository
      */
@@ -131,6 +136,9 @@ class BlockRepositoryTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
+        $this->collectionProcessor = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMockForAbstractClass();
+
         $this->repository = new BlockRepository(
             $this->blockResource,
             $blockFactory,
@@ -139,7 +147,8 @@ class BlockRepositoryTest extends \PHPUnit_Framework_TestCase
             $blockSearchResultFactory,
             $this->dataHelper,
             $this->dataObjectProcessor,
-            $this->storeManager
+            $this->storeManager,
+            $this->collectionProcessor
         );
     }
 
@@ -229,54 +238,42 @@ class BlockRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetList()
     {
-        $field = 'name';
-        $value = 'magento';
-        $condition = 'eq';
         $total = 10;
-        $currentPage = 3;
-        $pageSize = 2;
-        $sortField = 'id';
-
-        $criteria = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaInterface::class)->getMock();
-        $filterGroup = $this->getMockBuilder(\Magento\Framework\Api\Search\FilterGroup::class)->getMock();
-        $filter = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)->getMock();
-        $storeFilter = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)->getMock();
-        $sortOrder = $this->getMockBuilder(\Magento\Framework\Api\SortOrder::class)->getMock();
-
-        $criteria->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroup]);
-        $criteria->expects($this->once())->method('getSortOrders')->willReturn([$sortOrder]);
-        $criteria->expects($this->once())->method('getCurrentPage')->willReturn($currentPage);
-        $criteria->expects($this->once())->method('getPageSize')->willReturn($pageSize);
-        $filterGroup->expects($this->once())->method('getFilters')->willReturn([$storeFilter, $filter]);
-        $filter->expects($this->once())->method('getConditionType')->willReturn($condition);
-        $filter->expects($this->any())->method('getField')->willReturn($field);
-        $filter->expects($this->once())->method('getValue')->willReturn($value);
-        $storeFilter->expects($this->any())->method('getField')->willReturn('store_id');
-        $storeFilter->expects($this->once())->method('getValue')->willReturn(1);
-        $sortOrder->expects($this->once())->method('getField')->willReturn($sortField);
-        $sortOrder->expects($this->once())->method('getDirection')->willReturn(SortOrder::SORT_DESC);
 
         /** @var \Magento\Framework\Api\SearchCriteriaInterface $criteria */
+        $criteria = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaInterface::class)->getMock();
 
         $this->collection->addItem($this->block);
+        $this->collection->expects($this->once())
+            ->method('getSize')
+            ->willReturn($total);
+
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($criteria, $this->collection)
+            ->willReturnSelf();
+
         $this->blockSearchResult->expects($this->once())
             ->method('setSearchCriteria')
             ->with($criteria)
             ->willReturnSelf();
-        $this->collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->with([$field], [[$condition => $value]])
+        $this->blockSearchResult->expects($this->once())
+            ->method('setTotalCount')
+            ->with($total)
+            ->willReturnSelf();
+        $this->blockSearchResult->expects($this->once())
+            ->method('setItems')
+            ->with(['someData'])
             ->willReturnSelf();
-        $this->blockSearchResult->expects($this->once())->method('setTotalCount')->with($total)->willReturnSelf();
-        $this->collection->expects($this->once())->method('getSize')->willReturn($total);
-        $this->collection->expects($this->once())->method('setCurPage')->with($currentPage)->willReturnSelf();
-        $this->collection->expects($this->once())->method('setPageSize')->with($pageSize)->willReturnSelf();
-        $this->collection->expects($this->once())->method('addOrder')->with($sortField, 'DESC')->willReturnSelf();
-        $this->block->expects($this->once())->method('getData')->willReturn(['data']);
-        $this->blockSearchResult->expects($this->once())->method('setItems')->with(['someData'])->willReturnSelf();
+
+        $this->block->expects($this->once())
+            ->method('getData')
+            ->willReturn(['data']);
+
         $this->dataHelper->expects($this->once())
             ->method('populateWithArray')
             ->with($this->blockData, ['data'], \Magento\Cms\Api\Data\BlockInterface::class);
+
         $this->dataObjectProcessor->expects($this->once())
             ->method('buildOutputDataArray')
             ->with($this->blockData, \Magento\Cms\Api\Data\BlockInterface::class)
diff --git a/app/code/Magento/Cms/Test/Unit/Model/PageRepositoryTest.php b/app/code/Magento/Cms/Test/Unit/Model/PageRepositoryTest.php
index 5a16a8c972d0ef65da17ad6dbeabf53f3954b1dc..d11126881ba225083ee2d2d6029e79f7f785fa9f 100644
--- a/app/code/Magento/Cms/Test/Unit/Model/PageRepositoryTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Model/PageRepositoryTest.php
@@ -6,7 +6,7 @@
 namespace Magento\Cms\Test\Unit\Model;
 
 use Magento\Cms\Model\PageRepository;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 
 /**
  * Test for Magento\Cms\Model\PageRepository
@@ -60,6 +60,11 @@ class PageRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     private $storeManager;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * Initialize repository
      */
@@ -103,7 +108,7 @@ class PageRepositoryTest extends \PHPUnit_Framework_TestCase
             ->getMock();
         $this->collection = $this->getMockBuilder(\Magento\Cms\Model\ResourceModel\Page\Collection::class)
             ->disableOriginalConstructor()
-            ->setMethods(['addFieldToFilter', 'getSize', 'setCurPage', 'setPageSize', 'load', 'addOrder'])
+            ->setMethods(['getSize', 'setCurPage', 'setPageSize', 'load', 'addOrder'])
             ->getMock();
 
         $pageFactory->expects($this->any())
@@ -129,6 +134,9 @@ class PageRepositoryTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
+        $this->collectionProcessor = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMockForAbstractClass();
+
         $this->repository = new PageRepository(
             $this->pageResource,
             $pageFactory,
@@ -137,7 +145,8 @@ class PageRepositoryTest extends \PHPUnit_Framework_TestCase
             $pageSearchResultFactory,
             $this->dataHelper,
             $this->dataObjectProcessor,
-            $this->storeManager
+            $this->storeManager,
+            $this->collectionProcessor
         );
     }
 
@@ -227,51 +236,42 @@ class PageRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetList()
     {
-        $field = 'name';
-        $value = 'magento';
-        $condition = 'eq';
         $total = 10;
-        $currentPage = 3;
-        $pageSize = 2;
-        $sortField = 'id';
-
-        $criteria = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaInterface::class)->getMock();
-        $filterGroup = $this->getMockBuilder(\Magento\Framework\Api\Search\FilterGroup::class)->getMock();
-        $filter = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)->getMock();
-        $storeFilter = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)->getMock();
-        $sortOrder = $this->getMockBuilder(\Magento\Framework\Api\SortOrder::class)->getMock();
-
-        $criteria->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroup]);
-        $criteria->expects($this->once())->method('getSortOrders')->willReturn([$sortOrder]);
-        $criteria->expects($this->once())->method('getCurrentPage')->willReturn($currentPage);
-        $criteria->expects($this->once())->method('getPageSize')->willReturn($pageSize);
-        $filterGroup->expects($this->once())->method('getFilters')->willReturn([$storeFilter, $filter]);
-        $filter->expects($this->once())->method('getConditionType')->willReturn($condition);
-        $filter->expects($this->any())->method('getField')->willReturn($field);
-        $filter->expects($this->once())->method('getValue')->willReturn($value);
-        $storeFilter->expects($this->any())->method('getField')->willReturn('store_id');
-        $storeFilter->expects($this->once())->method('getValue')->willReturn(1);
-        $sortOrder->expects($this->once())->method('getField')->willReturn($sortField);
-        $sortOrder->expects($this->once())->method('getDirection')->willReturn(SortOrder::SORT_DESC);
 
         /** @var \Magento\Framework\Api\SearchCriteriaInterface $criteria */
+        $criteria = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaInterface::class)->getMock();
 
         $this->collection->addItem($this->page);
-        $this->pageSearchResult->expects($this->once())->method('setSearchCriteria')->with($criteria)->willReturnSelf();
         $this->collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->with([$field], [[$condition => $value]])
+            ->method('getSize')
+            ->willReturn($total);
+
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($criteria, $this->collection)
             ->willReturnSelf();
-        $this->pageSearchResult->expects($this->once())->method('setTotalCount')->with($total)->willReturnSelf();
-        $this->collection->expects($this->once())->method('getSize')->willReturn($total);
-        $this->collection->expects($this->once())->method('setCurPage')->with($currentPage)->willReturnSelf();
-        $this->collection->expects($this->once())->method('setPageSize')->with($pageSize)->willReturnSelf();
-        $this->collection->expects($this->once())->method('addOrder')->with($sortField, 'DESC')->willReturnSelf();
-        $this->page->expects($this->once())->method('getData')->willReturn(['data']);
-        $this->pageSearchResult->expects($this->once())->method('setItems')->with(['someData'])->willReturnSelf();
+
+        $this->pageSearchResult->expects($this->once())
+            ->method('setSearchCriteria')
+            ->with($criteria)
+            ->willReturnSelf();
+        $this->pageSearchResult->expects($this->once())
+            ->method('setTotalCount')
+            ->with($total)
+            ->willReturnSelf();
+        $this->pageSearchResult->expects($this->once())
+            ->method('setItems')
+            ->with(['someData'])
+            ->willReturnSelf();
+
+        $this->page->expects($this->once())
+            ->method('getData')
+            ->willReturn(['data']);
+
         $this->dataHelper->expects($this->once())
             ->method('populateWithArray')
             ->with($this->pageData, ['data'], \Magento\Cms\Api\Data\PageInterface::class);
+
         $this->dataObjectProcessor->expects($this->once())
             ->method('buildOutputDataArray')
             ->with($this->pageData, \Magento\Cms\Api\Data\PageInterface::class)
diff --git a/app/code/Magento/Cms/etc/di.xml b/app/code/Magento/Cms/etc/di.xml
index a287d89398cda336323d04d427526104823c0b8b..cae674b4a0d3bb5cea6c1e5c530ae5376e54b258 100644
--- a/app/code/Magento/Cms/etc/di.xml
+++ b/app/code/Magento/Cms/etc/di.xml
@@ -146,4 +146,46 @@
             </argument>
         </arguments>
     </type>
+    <virtualType name="Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\PageFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
+        <arguments>
+            <argument name="customFilters" xsi:type="array">
+                <item name="store_id" xsi:type="object">Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\PageStoreFilter</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Cms\Model\Api\SearchCriteria\PageCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="filters" xsi:type="object">Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\PageFilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <type name="Magento\Cms\Model\PageRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Cms\Model\Api\SearchCriteria\PageCollectionProcessor</argument>
+        </arguments>
+    </type>
+    <virtualType name="Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\BlockFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
+        <arguments>
+            <argument name="customFilters" xsi:type="array">
+                <item name="store_id" xsi:type="object">Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\BlockStoreFilter</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Cms\Model\Api\SearchCriteria\BlockCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="filters" xsi:type="object">Magento\Cms\Model\Api\SearchCriteria\CollectionProcessor\BlockFilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <type name="Magento\Cms\Model\BlockRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Cms\Model\Api\SearchCriteria\BlockCollectionProcessor</argument>
+        </arguments>
+    </type>
 </config>
diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml
index 70a9239af58054b7f7b1d347a1da558d60100ccf..703eea1f56a76001c9249a8b7d86444475cc782c 100644
--- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content.phtml
@@ -17,7 +17,7 @@
                 <div class="insert-actions">
                     <?php echo $block->getButtonsHtml() ?>
                 </div>
-                <div class="title"><?php /* @escapeNotVerified */ echo $block->getHeaderText() ?></div>
+                <div class="title"><?php echo $block->escapeHtml($block->getHeaderText()) ?></div>
             </div>
         </div>
         <div id="error-message" data-action="show-error"></div>
diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml
index d86b39547a093ad7d8df55043ab9c2f962a646b4..a6185c454189770f39d00ae0c54c95086dc1fcf1 100644
--- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml
@@ -14,16 +14,16 @@ $_height = $block->getImagesHeight();
 ?>
 <?php if ($block->getFilesCount() > 0): ?>
     <?php foreach ($block->getFiles() as $file): ?>
-    <div data-row="file" class="filecnt" id="<?php /* @escapeNotVerified */ echo $block->getFileId($file) ?>">
-        <p class="nm" style="height:<?php /* @escapeNotVerified */ echo $_height ?>px;width:<?php /* @escapeNotVerified */ echo $_width ?>px;">
+    <div data-row="file" class="filecnt" id="<?php echo $block->escapeHtmlAttr($block->getFileId($file)) ?>">
+        <p class="nm" style="height:<?php echo $block->escapeHtmlAttr($_height) ?>px;width:<?php echo $block->escapeHtmlAttr($_width) ?>px;">
         <?php if ($block->getFileThumbUrl($file)):?>
-            <img src="<?php /* @escapeNotVerified */ echo $block->getFileThumbUrl($file) ?>" alt="<?php /* @escapeNotVerified */ echo $block->getFileName($file) ?>"/>
+            <img src="<?php echo $block->escapeHtmlAttr($block->getFileThumbUrl($file)) ?>" alt="<?php echo $block->escapeHtmlAttr($block->getFileName($file)) ?>"/>
         <?php endif; ?>
         </p>
         <?php if ($block->getFileWidth($file)): ?>
-            <small><?php /* @escapeNotVerified */ echo $block->getFileWidth($file) ?>x<?php /* @escapeNotVerified */ echo $block->getFileHeight($file) ?> <?php /* @escapeNotVerified */ echo __('px.') ?></small><br/>
+            <small><?php echo $block->escapeHtml($block->getFileWidth($file)) ?>x<?php echo $block->escapeHtml($block->getFileHeight($file)) ?> <?php /* @escapeNotVerified */ echo __('px.') ?></small><br/>
         <?php endif; ?>
-        <small><?php /* @escapeNotVerified */ echo $block->getFileShortName($file); ?></small>
+        <small><?php echo $block->escapeHtml($block->getFileShortName($file)); ?></small>
     </div>
     <?php endforeach; ?>
 <?php else: ?>
diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml
index 24482f1fb4209e04847bf9350110c3b90605baa7..8d9aea7bb20c5b9e49241a75b15ae83f9142929a 100644
--- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml
@@ -12,7 +12,7 @@
 <div id="<?php echo $block->getHtmlId() ?>" class="uploader">
     <span class="fileinput-button form-buttons">
         <span><?php /* @escapeNotVerified */ echo __('Browse Files...') ?></span>
-        <input class="fileupload" type="file" name="<?php /* @escapeNotVerified */ echo $block->getConfig()->getFileField() ?>" data-url="<?php /* @escapeNotVerified */ echo $block->getConfig()->getUrl() ?>" multiple>
+        <input class="fileupload" type="file" name="<?php echo $block->escapeHtmlAttr($block->getConfig()->getFileField()) ?>" data-url="<?php echo $block->escapeUrl($block->getConfig()->getUrl()) ?>" multiple>
     </span>
     <div class="clear"></div>
     <script type="text/x-magento-template" id="<?php echo $block->getHtmlId() ?>-template">
@@ -39,7 +39,7 @@ require([
         },
         sequentialUploads: true,
         acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
-        maxFileSize: <?php /* @escapeNotVerified */ echo $block->getFileSizeService()->getMaxFileSize() ?> ,
+        maxFileSize: <?php  echo $block->escapeJs($block->getFileSizeService()->getMaxFileSize()) ?>,
         add: function (e, data) {
             var progressTmpl = mageTemplate('#<?php echo $block->getHtmlId(); ?>-template'),
                 fileSize,
@@ -97,11 +97,11 @@ require([
         process: [{
             action: 'load',
             fileTypes: /^image\/(gif|jpeg|png)$/,
-            maxFileSize: <?php /* @escapeNotVerified */ echo $block->getFileSizeService()->getMaxFileSize() ?> * 10
+            maxFileSize: <?php echo (int) $block->getFileSizeService()->getMaxFileSize() ?> * 10
         }, {
             action: 'resize',
-            maxWidth: <?php /* @escapeNotVerified */ echo \Magento\Framework\File\Uploader::MAX_IMAGE_WIDTH ?> ,
-            maxHeight: <?php /* @escapeNotVerified */ echo \Magento\Framework\File\Uploader::MAX_IMAGE_HEIGHT ?>
+            maxWidth: <?php echo (float) \Magento\Framework\File\Uploader::MAX_IMAGE_WIDTH ?> ,
+            maxHeight: <?php echo (float) \Magento\Framework\File\Uploader::MAX_IMAGE_HEIGHT ?>
         }, {
             action: 'save'
         }]
diff --git a/app/code/Magento/Cms/view/frontend/templates/content.phtml b/app/code/Magento/Cms/view/frontend/templates/content.phtml
index 3705cc6dce823f3b2aba19c9c066413206ddfebe..29d92eb4f826ef99d141264ab074a7ed9bcc36a9 100644
--- a/app/code/Magento/Cms/view/frontend/templates/content.phtml
+++ b/app/code/Magento/Cms/view/frontend/templates/content.phtml
@@ -7,4 +7,4 @@
 // @codingStandardsIgnoreFile
 
 ?>
-<?php /* @escapeNotVerified */ echo $pageData->getPageContent(); ?>
+<?php /* @noEscape */ echo $pageData->getPageContent(); ?>
diff --git a/app/code/Magento/Cms/view/frontend/templates/meta.phtml b/app/code/Magento/Cms/view/frontend/templates/meta.phtml
index 22e81db7c148f02e7a9516eea0486a77cd150331..d6e3b81b8cbc0625cac299d7508ca65bd69117a1 100644
--- a/app/code/Magento/Cms/view/frontend/templates/meta.phtml
+++ b/app/code/Magento/Cms/view/frontend/templates/meta.phtml
@@ -8,8 +8,8 @@
 
 ?>
 <?php if ($pageData->getPageMetaKeywords()): ?>
-<meta name="keywords" content="<?php /* @escapeNotVerified */ echo $pageData->getPageMetaKeywords() ?>"/>
+    <meta name="keywords" content="<?php /* @noEscape */ echo $pageData->getPageMetaKeywords() ?>"/>
 <?php endif; ?>
 <?php if ($pageData->getPageMetaDescription()): ?>
-<meta name="description" content="<?php /* @escapeNotVerified */ echo $pageData->getPageMetaDescription() ?>"/>
+    <meta name="description" content="<?php /* @noEscape */ echo $pageData->getPageMetaDescription() ?>"/>
 <?php endif; ?>
diff --git a/app/code/Magento/Cms/view/frontend/templates/widget/static_block/default.phtml b/app/code/Magento/Cms/view/frontend/templates/widget/static_block/default.phtml
index 110e99da1b06dbb02dc493d0a34b994ed231f381..bb7d392098b14ab0dca083752f7a7339220e3a64 100644
--- a/app/code/Magento/Cms/view/frontend/templates/widget/static_block/default.phtml
+++ b/app/code/Magento/Cms/view/frontend/templates/widget/static_block/default.phtml
@@ -3,7 +3,10 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/* @var $block \Magento\Cms\Block\Widget\Block */
+
 ?>
 <div class="widget block block-static-block">
-    <?php /* @escapeNotVerified */ echo $block->getText(); ?>
+    <?php /* @noEscape */ echo $block->getText(); ?>
 </div>
diff --git a/app/code/Magento/CmsUrlRewrite/Plugin/Cms/Model/ResourceModel/Page.php b/app/code/Magento/CmsUrlRewrite/Plugin/Cms/Model/ResourceModel/Page.php
index 45579f37b0c0cdeac82c14ff40f7e81eab227c9d..c605d3977d9f2a79f1f8d9d6d5b3cd04b241d14f 100644
--- a/app/code/Magento/CmsUrlRewrite/Plugin/Cms/Model/ResourceModel/Page.php
+++ b/app/code/Magento/CmsUrlRewrite/Plugin/Cms/Model/ResourceModel/Page.php
@@ -9,6 +9,8 @@ use Magento\UrlRewrite\Model\UrlPersistInterface;
 use Magento\CmsUrlRewrite\Model\CmsPageUrlPathGenerator;
 use Magento\CmsUrlRewrite\Model\CmsPageUrlRewriteGenerator;
 use Magento\UrlRewrite\Service\V1\Data\UrlRewrite;
+use Magento\Framework\Model\AbstractModel;
+use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
 
 /**
  * Before save and around delete plugin for \Magento\Cms\Model\ResourceModel\Page:
@@ -63,18 +65,16 @@ class Page
      * On delete handler to remove related url rewrites
      *
      * @param \Magento\Cms\Model\ResourceModel\Page $subject
-     * @param \Closure $proceed
-     * @param \Magento\Framework\Model\AbstractModel $page
-     * @return \Magento\Cms\Model\ResourceModel\Page
-     *
+     * @param AbstractDb $result
+     * @param AbstractModel $page
+     * @return AbstractDb
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundDelete(
+    public function afterDelete(
         \Magento\Cms\Model\ResourceModel\Page $subject,
-        \Closure $proceed,
-        \Magento\Framework\Model\AbstractModel $page
+        AbstractDb $result,
+        AbstractModel $page
     ) {
-        $result = $proceed($page);
         if ($page->isDeleted()) {
             $this->urlPersist->deleteByData(
                 [
diff --git a/app/code/Magento/CmsUrlRewrite/Test/Unit/Plugin/Cms/Model/ResourceModel/PageTest.php b/app/code/Magento/CmsUrlRewrite/Test/Unit/Plugin/Cms/Model/ResourceModel/PageTest.php
index 42b1b42469d5e0ee748a9795b8d3ac91ab54adc9..277e36b94fc8360c1a4bd4aec192e7cea94cc58d 100644
--- a/app/code/Magento/CmsUrlRewrite/Test/Unit/Plugin/Cms/Model/ResourceModel/PageTest.php
+++ b/app/code/Magento/CmsUrlRewrite/Test/Unit/Plugin/Cms/Model/ResourceModel/PageTest.php
@@ -30,19 +30,10 @@ class PageTest extends \PHPUnit_Framework_TestCase
      */
     protected $cmsPageResourceMock;
 
-    /**
-     * @var \Closure
-     */
-    protected $closureMock;
-
     protected function setUp()
     {
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
 
-        $this->closureMock = function () {
-            return 'URL Rewrite Result';
-        };
-
         $this->urlPersistMock = $this->getMockBuilder(\Magento\UrlRewrite\Model\UrlPersistInterface::class)
             ->getMockForAbstractClass();
 
@@ -62,7 +53,7 @@ class PageTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testAroundDeletePositive()
+    public function testAfterDeletePositive()
     {
         $productId = 100;
 
@@ -83,17 +74,17 @@ class PageTest extends \PHPUnit_Framework_TestCase
                 ]
             );
 
-        $this->assertEquals(
-            'URL Rewrite Result',
-            $this->pageObject->aroundDelete(
+        $this->assertSame(
+            $this->cmsPageResourceMock,
+            $this->pageObject->afterDelete(
+                $this->cmsPageResourceMock,
                 $this->cmsPageResourceMock,
-                $this->closureMock,
                 $this->cmsPageMock
             )
         );
     }
 
-    public function testAroundDeleteNegative()
+    public function testAfterDeleteNegative()
     {
         $this->cmsPageMock->expects($this->once())
             ->method('isDeleted')
@@ -102,11 +93,11 @@ class PageTest extends \PHPUnit_Framework_TestCase
         $this->urlPersistMock->expects($this->never())
             ->method('deleteByData');
 
-        $this->assertEquals(
-            'URL Rewrite Result',
-            $this->pageObject->aroundDelete(
+        $this->assertSame(
+            $this->cmsPageResourceMock,
+            $this->pageObject->afterDelete(
+                $this->cmsPageResourceMock,
                 $this->cmsPageResourceMock,
-                $this->closureMock,
                 $this->cmsPageMock
             )
         );
diff --git a/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Builder/Plugin.php b/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Builder/Plugin.php
index ada1488e9cd9ce71e4b8b7b82afd795922845adb..354ebdb0ea7c94bcb639f0e4329d8bd2e6aa0ff7 100644
--- a/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Builder/Plugin.php
+++ b/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Builder/Plugin.php
@@ -8,6 +8,9 @@ namespace Magento\ConfigurableProduct\Controller\Adminhtml\Product\Builder;
 
 use Magento\Catalog\Model\ProductFactory;
 use Magento\ConfigurableProduct\Model\Product\Type;
+use Magento\Catalog\Model\Product;
+use Magento\Catalog\Controller\Adminhtml\Product\Builder as CatalogProductBuilder;
+use Magento\Framework\App\RequestInterface;
 
 class Plugin
 {
@@ -32,21 +35,17 @@ class Plugin
     }
 
     /**
-     * @param \Magento\Catalog\Controller\Adminhtml\Product\Builder $subject
-     * @param callable $proceed
-     * @param \Magento\Framework\App\RequestInterface $request
+     * Set type and data to configurable product
      *
-     * @return \Magento\Catalog\Model\Product
+     * @param CatalogProductBuilder $subject
+     * @param Product $product
+     * @param RequestInterface $request
+     * @return Product
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      */
-    public function aroundBuild(
-        \Magento\Catalog\Controller\Adminhtml\Product\Builder $subject,
-        \Closure $proceed,
-        \Magento\Framework\App\RequestInterface $request
-    ) {
-        $product = $proceed($request);
-
+    public function afterBuild(CatalogProductBuilder $subject, Product $product, RequestInterface $request)
+    {
         if ($request->has('attributes')) {
             $attributes = $request->getParam('attributes');
             if (!empty($attributes)) {
diff --git a/app/code/Magento/ConfigurableProduct/Model/Plugin/AroundProductRepositorySave.php b/app/code/Magento/ConfigurableProduct/Model/Plugin/ProductRepositorySave.php
similarity index 93%
rename from app/code/Magento/ConfigurableProduct/Model/Plugin/AroundProductRepositorySave.php
rename to app/code/Magento/ConfigurableProduct/Model/Plugin/ProductRepositorySave.php
index be12fc8da2904165f22a16b5750e20ac8c3ef37d..cfcb5e41799e8fda8239c32f2a67dd3dc0ebcd04 100644
--- a/app/code/Magento/ConfigurableProduct/Model/Plugin/AroundProductRepositorySave.php
+++ b/app/code/Magento/ConfigurableProduct/Model/Plugin/ProductRepositorySave.php
@@ -14,10 +14,7 @@ use Magento\ConfigurableProduct\Api\Data\OptionInterface;
 use Magento\Catalog\Api\ProductAttributeRepositoryInterface;
 use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
 
-/**
- * Class AroundProductRepositorySave
- */
-class AroundProductRepositorySave
+class ProductRepositorySave
 {
     /**
      * @var ProductAttributeRepositoryInterface
@@ -42,8 +39,10 @@ class AroundProductRepositorySave
     }
 
     /**
+     * Validate product links and reset configurable attributes to configurable product
+     *
      * @param ProductRepositoryInterface $subject
-     * @param callable $proceed
+     * @param ProductInterface $result
      * @param ProductInterface $product
      * @param bool $saveOptions
      * @return ProductInterface
@@ -52,14 +51,12 @@ class AroundProductRepositorySave
      *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundSave(
+    public function afterSave(
         ProductRepositoryInterface $subject,
-        \Closure $proceed,
+        ProductInterface $result,
         ProductInterface $product,
         $saveOptions = false
     ) {
-        /** @var ProductInterface $result */
-        $result = $proceed($product, $saveOptions);
         if ($product->getTypeId() !== Configurable::TYPE_CODE) {
             return $result;
         }
diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/Validator/Plugin.php b/app/code/Magento/ConfigurableProduct/Model/Product/Validator/Plugin.php
index c0b287214ea3d32ea80beebe2dbe4cff865812d8..b5970c902743ee8c5959dca2a2922502c169a2d2 100644
--- a/app/code/Magento/ConfigurableProduct/Model/Product/Validator/Plugin.php
+++ b/app/code/Magento/ConfigurableProduct/Model/Product/Validator/Plugin.php
@@ -5,12 +5,12 @@
  */
 namespace Magento\ConfigurableProduct\Model\Product\Validator;
 
-use Closure;
 use Magento\Catalog\Model\Product;
 use Magento\Catalog\Model\ProductFactory;
 use Magento\Framework\App\RequestInterface;
 use Magento\Framework\Event\Manager;
 use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\DataObject;
 
 /**
  * Configurable product validation
@@ -48,27 +48,44 @@ class Plugin
     }
 
     /**
-     * Validate product data
+     * Set configurable type to product
      *
      * @param Product\Validator $subject
-     * @param Closure $proceed
      * @param Product $product
      * @param RequestInterface $request
-     * @param \Magento\Framework\DataObject $response
-     * @return bool
+     * @param DataObject $response
+     * @return void
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundValidate(
+    public function beforeValidate(
         \Magento\Catalog\Model\Product\Validator $subject,
-        Closure $proceed,
         \Magento\Catalog\Model\Product $product,
-        \Magento\Framework\App\RequestInterface $request,
-        \Magento\Framework\DataObject $response
+        RequestInterface $request,
+        DataObject $response
     ) {
         if ($request->has('attributes')) {
             $product->setTypeId(\Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE);
         }
-        $result = $proceed($product, $request, $response);
+    }
+
+    /**
+     * Validate product data
+     *
+     * @param Product\Validator $subject
+     * @param bool|array $result
+     * @param Product $product
+     * @param RequestInterface $request
+     * @param \Magento\Framework\DataObject $response
+     * @return bool
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function afterValidate(
+        \Magento\Catalog\Model\Product\Validator $subject,
+        $result,
+        \Magento\Catalog\Model\Product $product,
+        RequestInterface $request,
+        DataObject $response
+    ) {
         $variationProducts = (array)$request->getPost('variations-matrix');
         if ($variationProducts) {
             $validationResult = $this->_validateProductVariations($product, $variationProducts, $request);
diff --git a/app/code/Magento/ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProduct.php b/app/code/Magento/ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProduct.php
index 73e88eb5333cb4ef62eef43e2aae5d02d9e53294..1657fb8aaae12788c217cd124a25a46d97ea3b0b 100644
--- a/app/code/Magento/ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProduct.php
+++ b/app/code/Magento/ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProduct.php
@@ -13,20 +13,19 @@ class ConfigurableProduct
      * Initialize stock item for configurable product type
      *
      * @param \Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\Option $subject
-     * @param callable $proceed
+     * @param \Magento\CatalogInventory\Model\Stock\Item $stockItem
      * @param \Magento\Quote\Model\Quote\Item\Option $option
      * @param \Magento\Quote\Model\Quote\Item $quoteItem
      *
      * @return \Magento\CatalogInventory\Api\Data\StockItemInterface
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundGetStockItem(
+    public function afterGetStockItem(
         \Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\Option $subject,
-        \Closure $proceed,
+        \Magento\CatalogInventory\Model\Stock\Item $stockItem,
         \Magento\Quote\Model\Quote\Item\Option $option,
         \Magento\Quote\Model\Quote\Item $quoteItem
     ) {
-        $stockItem = $proceed($option, $quoteItem);
         if ($quoteItem->getProductType() == \Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE) {
             $stockItem->setProductName($quoteItem->getName());
         }
diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Controller/Adminhtml/Product/Builder/PluginTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Controller/Adminhtml/Product/Builder/PluginTest.php
index 7056224cffd6843ea3dd35729cd5add8c01dc6ea..e6c13a23541fad21e5d592d4b0b9dc7bb32e7ed0 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Unit/Controller/Adminhtml/Product/Builder/PluginTest.php
+++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Controller/Adminhtml/Product/Builder/PluginTest.php
@@ -23,12 +23,12 @@ class PluginTest extends \PHPUnit_Framework_TestCase
     protected $configurableTypeMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $requestMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Catalog\Model\Product|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $productMock;
 
@@ -48,15 +48,10 @@ class PluginTest extends \PHPUnit_Framework_TestCase
     protected $frontendAttrMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Catalog\Controller\Adminhtml\Product\Builder|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $subjectMock;
 
-    /**
-     * @var \Closure
-     */
-    protected $closureMock;
-
     protected function setUp()
     {
         $this->productFactoryMock = $this->getMock(
@@ -76,7 +71,6 @@ class PluginTest extends \PHPUnit_Framework_TestCase
         $this->requestMock = $this->getMock(\Magento\Framework\App\Request\Http::class, [], [], '', false);
         $methods = ['setTypeId', 'getAttributes', 'addData', 'setWebsiteIds', '__wakeup'];
         $this->productMock = $this->getMock(\Magento\Catalog\Model\Product::class, $methods, [], '', false);
-        $product = $this->productMock;
         $attributeMethods = [
             'getId',
             'getFrontend',
@@ -124,9 +118,6 @@ class PluginTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $this->closureMock = function () use ($product) {
-            return $product;
-        };
         $this->plugin = new \Magento\ConfigurableProduct\Controller\Adminhtml\Product\Builder\Plugin(
             $this->productFactoryMock,
             $this->configurableTypeMock
@@ -137,7 +128,7 @@ class PluginTest extends \PHPUnit_Framework_TestCase
      * @return void
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
-    public function testAroundBuild()
+    public function testAfterBuild()
     {
         $this->requestMock->expects($this->once())->method('has')->with('attributes')->will($this->returnValue(true));
         $valueMap = [
@@ -256,11 +247,11 @@ class PluginTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals(
             $this->productMock,
-            $this->plugin->aroundBuild($this->subjectMock, $this->closureMock, $this->requestMock)
+            $this->plugin->afterBuild($this->subjectMock, $this->productMock, $this->requestMock)
         );
     }
 
-    public function testAroundBuildWhenProductNotHaveAttributeAndRequiredParameters()
+    public function testAfterBuildWhenProductNotHaveAttributeAndRequiredParameters()
     {
         $valueMap = [
             ['attributes', null, null],
@@ -283,11 +274,11 @@ class PluginTest extends \PHPUnit_Framework_TestCase
         $this->attributeMock->expects($this->never())->method('getAttributeCode');
         $this->assertEquals(
             $this->productMock,
-            $this->plugin->aroundBuild($this->subjectMock, $this->closureMock, $this->requestMock)
+            $this->plugin->afterBuild($this->subjectMock, $this->productMock, $this->requestMock)
         );
     }
 
-    public function testAroundBuildWhenAttributesAreEmpty()
+    public function testAfterBuildWhenAttributesAreEmpty()
     {
         $valueMap = [['popup', null, false], ['product', null, 'product'], ['id', false, false]];
         $this->requestMock->expects($this->once())->method('has')->with('attributes')->will($this->returnValue(false));
@@ -299,7 +290,7 @@ class PluginTest extends \PHPUnit_Framework_TestCase
         $this->attributeMock->expects($this->never())->method('getAttributeCode');
         $this->assertEquals(
             $this->productMock,
-            $this->plugin->aroundBuild($this->subjectMock, $this->closureMock, $this->requestMock)
+            $this->plugin->afterBuild($this->subjectMock, $this->productMock, $this->requestMock)
         );
     }
 }
diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/AroundProductRepositorySaveTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/ProductRepositorySaveTest.php
similarity index 87%
rename from app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/AroundProductRepositorySaveTest.php
rename to app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/ProductRepositorySaveTest.php
index dee340fca9d8688aee08904078039ad3f82b4849..3b2069296db9a4e20ae75c010fdca7000e53e403 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/AroundProductRepositorySaveTest.php
+++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/ProductRepositorySaveTest.php
@@ -11,16 +11,17 @@ use Magento\Catalog\Api\ProductRepositoryInterface;
 use Magento\Catalog\Model\Product;
 use Magento\Catalog\Model\ProductFactory;
 use Magento\ConfigurableProduct\Api\Data\OptionInterface;
-use Magento\ConfigurableProduct\Model\Plugin\AroundProductRepositorySave;
+use Magento\ConfigurableProduct\Model\Plugin\ProductRepositorySave;
 use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
 use Magento\ConfigurableProduct\Test\Unit\Model\Product\ProductExtensionAttributes;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
 use PHPUnit_Framework_MockObject_MockObject as MockObject;
 
 /**
- * Class AroundProductRepositorySaveTest
+ * Class ProductRepositorySaveTest
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
+class ProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * @var ProductAttributeRepositoryInterface|MockObject
@@ -32,11 +33,6 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
      */
     private $productFactory;
 
-    /**
-     * @var \Closure
-     */
-    private $closure;
-
     /**
      * @var Product|MockObject
      */
@@ -68,7 +64,7 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
     private $option;
 
     /**
-     * @var AroundProductRepositorySave
+     * @var ProductRepositorySave
      */
     private $plugin;
 
@@ -91,10 +87,6 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
             ->setMethods(['getExtensionAttributes'])
             ->getMock();
 
-        $this->closure = function () {
-            return $this->result;
-        };
-
         $this->productRepository = $this->getMockForAbstractClass(ProductRepositoryInterface::class);
 
         $this->extensionAttributes = $this->getMockBuilder(ProductExtensionAttributes::class)
@@ -106,13 +98,16 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
 
         $this->option = $this->getMockForAbstractClass(OptionInterface::class);
 
-        $this->plugin = new AroundProductRepositorySave(
-            $this->productAttributeRepository,
-            $this->productFactory
+        $this->plugin = (new ObjectManager($this))->getObject(
+            ProductRepositorySave::class,
+            [
+                'productAttributeRepository' => $this->productAttributeRepository,
+                'productFactory' => $this->productFactory
+            ]
         );
     }
 
-    public function testAroundSaveWhenProductIsSimple()
+    public function testAfterSaveWhenProductIsSimple()
     {
         $this->product->expects(static::once())
             ->method('getTypeId')
@@ -122,11 +117,11 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals(
             $this->result,
-            $this->plugin->aroundSave($this->productRepository, $this->closure, $this->product)
+            $this->plugin->afterSave($this->productRepository, $this->result, $this->product)
         );
     }
 
-    public function testAroundSaveWithoutOptions()
+    public function testAfterSaveWithoutOptions()
     {
         $this->product->expects(static::once())
             ->method('getTypeId')
@@ -148,7 +143,7 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals(
             $this->result,
-            $this->plugin->aroundSave($this->productRepository, $this->closure, $this->product)
+            $this->plugin->afterSave($this->productRepository, $this->result, $this->product)
         );
     }
 
@@ -156,7 +151,7 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
      * @expectedException \Magento\Framework\Exception\InputException
      * @expectedExceptionMessage Products "5" and "4" have the same set of attribute values.
      */
-    public function testAroundSaveWithLinks()
+    public function testAfterSaveWithLinks()
     {
         $links = [4, 5];
         $this->product->expects(static::once())
@@ -191,14 +186,14 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
         $product->expects(static::never())
             ->method('getData');
 
-        $this->plugin->aroundSave($this->productRepository, $this->closure, $this->product);
+        $this->plugin->afterSave($this->productRepository, $this->result, $this->product);
     }
 
     /**
      * @expectedException \Magento\Framework\Exception\InputException
      * @expectedExceptionMessage Product with id "4" does not contain required attribute "color".
      */
-    public function testAroundSaveWithLinksWithMissingAttribute()
+    public function testAfterSaveWithLinksWithMissingAttribute()
     {
         $simpleProductId = 4;
         $links = [$simpleProductId, 5];
@@ -248,14 +243,14 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
             ->with($attributeCode)
             ->willReturn(false);
 
-        $this->plugin->aroundSave($this->productRepository, $this->closure, $this->product);
+        $this->plugin->afterSave($this->productRepository, $this->result, $this->product);
     }
 
     /**
      * @expectedException \Magento\Framework\Exception\InputException
      * @expectedExceptionMessage Products "5" and "4" have the same set of attribute values.
      */
-    public function testAroundSaveWithLinksWithDuplicateAttributes()
+    public function testAfterSaveWithLinksWithDuplicateAttributes()
     {
         $links = [4, 5];
         $attributeCode = 'color';
@@ -303,6 +298,6 @@ class AroundProductRepositorySaveTest extends \PHPUnit_Framework_TestCase
             ->with($attributeCode)
             ->willReturn($attributeId);
 
-        $this->plugin->aroundSave($this->productRepository, $this->closure, $this->product);
+        $this->plugin->afterSave($this->productRepository, $this->result, $this->product);
     }
 }
diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Validator/PluginTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Validator/PluginTest.php
index d66e32aa0e7b04ad4c39d0e767182656dd9ff75b..65d3f42767de5e136ac33f9c95fe702619c16613 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Validator/PluginTest.php
+++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Validator/PluginTest.php
@@ -28,17 +28,17 @@ class PluginTest extends \PHPUnit_Framework_TestCase
     protected $jsonHelperMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Catalog\Model\Product|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $productMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $requestMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\DataObject|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $responseMock;
 
@@ -53,15 +53,10 @@ class PluginTest extends \PHPUnit_Framework_TestCase
     protected $proceedResult = [1, 2, 3];
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Catalog\Model\Product\Validator|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $subjectMock;
 
-    /**
-     * @var \Closure
-     */
-    protected $closureMock;
-
     protected function setUp()
     {
         $this->eventManagerMock = $this->getMock(\Magento\Framework\Event\Manager::class, [], [], '', false);
@@ -82,14 +77,14 @@ class PluginTest extends \PHPUnit_Framework_TestCase
         $this->jsonHelperMock->expects($this->any())->method('jsonDecode')->will($this->returnArgument(0));
         $this->productMock = $this->getMock(
             \Magento\Catalog\Model\Product::class,
-            ['getData', 'getAttributes'],
+            ['getData', 'getAttributes', 'setTypeId'],
             [],
             '',
             false
         );
         $this->requestMock = $this->getMock(
             \Magento\Framework\App\Request\Http::class,
-            ['getPost', 'getParam', '__wakeup'],
+            ['getPost', 'getParam', '__wakeup', 'has'],
             [],
             '',
             false
@@ -102,10 +97,7 @@ class PluginTest extends \PHPUnit_Framework_TestCase
             false
         );
         $this->arguments = [$this->productMock, $this->requestMock, $this->responseMock];
-        $proceedResult = $this->proceedResult;
-        $this->closureMock = function () use ($proceedResult) {
-            return $proceedResult;
-        };
+
         $this->subjectMock = $this->getMock(\Magento\Catalog\Model\Product\Validator::class, [], [], '', false);
         $this->plugin = new \Magento\ConfigurableProduct\Model\Product\Validator\Plugin(
             $this->eventManagerMock,
@@ -114,7 +106,20 @@ class PluginTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testAroundValidateWithVariationsValid()
+    public function testBeforeValidate()
+    {
+        $this->requestMock->expects(static::once())->method('has')->with('attributes')->willReturn(true);
+        $this->productMock->expects(static::once())->method('setTypeId')->willReturnSelf();
+
+        $this->plugin->beforeValidate(
+            $this->subjectMock,
+            $this->productMock,
+            $this->requestMock,
+            $this->responseMock
+        );
+    }
+
+    public function testAfterValidateWithVariationsValid()
     {
         $matrix = ['products'];
 
@@ -150,9 +155,9 @@ class PluginTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals(
             $this->proceedResult,
-            $plugin->aroundValidate(
+            $plugin->afterValidate(
                 $this->subjectMock,
-                $this->closureMock,
+                $this->proceedResult,
                 $this->productMock,
                 $this->requestMock,
                 $this->responseMock
@@ -160,7 +165,7 @@ class PluginTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testAroundValidateWithVariationsInvalid()
+    public function testAfterValidateWithVariationsInvalid()
     {
         $matrix = ['products'];
 
@@ -197,9 +202,9 @@ class PluginTest extends \PHPUnit_Framework_TestCase
         $this->responseMock->expects($this->once())->method('setAttributes')->will($this->returnSelf());
         $this->assertEquals(
             $this->proceedResult,
-            $plugin->aroundValidate(
+            $plugin->afterValidate(
                 $this->subjectMock,
-                $this->closureMock,
+                $this->proceedResult,
                 $this->productMock,
                 $this->requestMock,
                 $this->responseMock
@@ -207,7 +212,7 @@ class PluginTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testAroundValidateIfVariationsNotExist()
+    public function testAfterValidateIfVariationsNotExist()
     {
         $this->requestMock->expects(
             $this->once()
@@ -219,16 +224,16 @@ class PluginTest extends \PHPUnit_Framework_TestCase
             $this->returnValue(null)
         );
         $this->eventManagerMock->expects($this->never())->method('dispatch');
-        $this->plugin->aroundValidate(
+        $this->plugin->afterValidate(
             $this->subjectMock,
-            $this->closureMock,
+            $this->proceedResult,
             $this->productMock,
             $this->requestMock,
             $this->responseMock
         );
     }
 
-    public function testAroundValidateWithVariationsAndRequiredAttributes()
+    public function testAfterValidateWithVariationsAndRequiredAttributes()
     {
         $matrix = [
             ['data1', 'data2', 'configurable_attribute' => ['data1']],
@@ -313,9 +318,9 @@ class PluginTest extends \PHPUnit_Framework_TestCase
 
         $this->responseMock->expects($this->never())->method('setError');
 
-        $result = $this->plugin->aroundValidate(
+        $result = $this->plugin->afterValidate(
             $this->subjectMock,
-            $this->closureMock,
+            $this->proceedResult,
             $this->productMock,
             $this->requestMock,
             $this->responseMock
diff --git a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProductTest.php b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProductTest.php
index 7d10cb4511e13e60ff0c4d75cbf844d02c5d42ab..6b162bbde85c4ca46e2bdf27c4328b7b2deef144 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProductTest.php
+++ b/app/code/Magento/ConfigurableProduct/Test/Unit/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProductTest.php
@@ -3,20 +3,20 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
-// @codingStandardsIgnoreFile
-
 namespace Magento\ConfigurableProduct\Test\Unit\Model\Quote\Item\QuantityValidator\Initializer\Option\Plugin;
 
+use \Magento\ConfigurableProduct\Model\Quote\Item\QuantityValidator\Initializer\Option\Plugin\ConfigurableProduct
+    as InitializerOptionPlugin;
+
 class ConfigurableProductTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * @param array $data
-     * @dataProvider aroundGetStockItemDataProvider
+     * @dataProvider afterGetStockItemDataProvider
      */
-    public function testAroundGetStockItem(array $data)
+    public function testAfterGetStockItem(array $data)
     {
-        $subjectMock = $this->getMock(
+        $subjectMock = $this->getMock(
             \Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\Option::class,
             [],
             [],
@@ -24,36 +24,44 @@ class ConfigurableProductTest extends \PHPUnit_Framework_TestCase
             false
         );
 
-        $quoteItemMock = $this->getMock(
-            \Magento\Quote\Model\Quote\Item::class, ['getProductType', '__wakeup'], [], '', false
+        $quoteItemMock = $this->getMock(
+            \Magento\Quote\Model\Quote\Item::class,
+            ['getProductType', '__wakeup'],
+            [],
+            '',
+            false
         );
         $quoteItemMock->expects($this->once())
             ->method('getProductType')
             ->will($this->returnValue($data['product_type']));
 
-        $stockItemMock = $this->getMock(
-            \Magento\CatalogInventory\Model\Stock\Item::class, ['setProductName', '__wakeup'], [], '', false
+        $stockItemMock = $this->getMock(
+            \Magento\CatalogInventory\Model\Stock\Item::class,
+            ['setProductName', '__wakeup'],
+            [],
+            '',
+            false
         );
         $matcherMethod = $data['matcher_method'];
         $stockItemMock->expects($this->$matcherMethod())
             ->method('setProductName');
 
-        $optionMock = $this->getMock(
-            \Magento\Quote\Model\Quote\Item\Option::class, ['getProduct', '__wakeup'], [], '', false
+        $optionMock = $this->getMock(
+            \Magento\Quote\Model\Quote\Item\Option::class,
+            ['getProduct', '__wakeup'],
+            [],
+            '',
+            false
         );
 
-        $proceed = function () use ($stockItemMock) {
-            return $stockItemMock;
-        };
-
-        $model = new \Magento\ConfigurableProduct\Model\Quote\Item\QuantityValidator\Initializer\Option\Plugin\ConfigurableProduct();
-        $model->aroundGetStockItem($subjectMock, $proceed, $optionMock, $quoteItemMock, 0);
+        $model = new InitializerOptionPlugin();
+        $model->afterGetStockItem($subjectMock, $stockItemMock, $optionMock, $quoteItemMock, 0);
     }
 
     /**
      * @return array
      */
-    public function aroundGetStockItemDataProvider()
+    public function afterGetStockItemDataProvider()
     {
         return [
             [
diff --git a/app/code/Magento/ConfigurableProduct/etc/di.xml b/app/code/Magento/ConfigurableProduct/etc/di.xml
index e32286764f56ec959044cb11a5e65c13928f4d7c..c3be4aaea189a63edb9091df2712d063eb8e09e1 100644
--- a/app/code/Magento/ConfigurableProduct/etc/di.xml
+++ b/app/code/Magento/ConfigurableProduct/etc/di.xml
@@ -59,7 +59,7 @@
         </arguments>
     </type>
     <type name="Magento\Catalog\Api\ProductRepositoryInterface">
-        <plugin name="configurableProductSaveOptions" type="\Magento\ConfigurableProduct\Model\Plugin\AroundProductRepositorySave"/>
+        <plugin name="configurableProductSaveOptions" sortOrder="10" type="Magento\ConfigurableProduct\Model\Plugin\ProductRepositorySave"/>
     </type>
     <type name="Magento\Catalog\Model\Product">
         <plugin name="configurable_identity" type="Magento\ConfigurableProduct\Plugin\Model\Product" />
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/summary.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/summary.phtml
index 37bde42041b6dc10b0cff20137890730fd68c092..2cc92451ffbb39117e568607136050ecfc5e54fd 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/summary.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/summary.phtml
@@ -17,6 +17,7 @@
         <!-- ko if: gridNew().length -->
         <!-- ko template: {name: getGridTemplate(), data: {
             grid: gridNew,
+            paging: pagingNew,
             id: getGridId(),
             title: $t('New Product Review'),
             note: $t('Here are the products you\'re about to create.')
@@ -25,6 +26,7 @@
 
         <!-- ko if: gridExisting().length -->
         <!-- ko template: {name: getGridTemplate(), data: {
+            paging: pagingExisting,
             grid: gridExisting,
             id: getGridId(),
             title: $t('Associated Products'),
@@ -34,6 +36,7 @@
 
         <!-- ko if: gridDeleted().length -->
         <!-- ko template: {name: getGridTemplate(), data: {
+            paging: pagingDeleted,
             grid: gridDeleted,
             id: getGridId(),
             title: $t('Disassociated Products'),
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/paging/sizes.js b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/paging/sizes.js
new file mode 100644
index 0000000000000000000000000000000000000000..92a83f1bbdd49a0ac0750f1755d8391dfe182579
--- /dev/null
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/paging/sizes.js
@@ -0,0 +1,29 @@
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+define([
+    'Magento_Ui/js/grid/paging/sizes'
+], function (Sizes) {
+    'use strict';
+
+    return Sizes.extend({
+        defaults: {
+            excludedOptions: ['100', '200']
+        },
+
+        /**
+         * @override
+         */
+        initialize: function () {
+            this._super();
+
+            this.excludedOptions.forEach(function (excludedOption) {
+                delete this.options[excludedOption];
+            }, this);
+            this.updateArray();
+
+            return this;
+        }
+    });
+});
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/summary.js b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/summary.js
index de2c7aa1db53feadfb77523c073d565a71419dcd..c0d1dd642c8b96f7324430473e851243fbe16d7f 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/summary.js
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/summary.js
@@ -8,8 +8,9 @@ define([
     'jquery',
     'ko',
     'underscore',
+    'Magento_Ui/js/grid/paging/paging',
     'mage/translate'
-], function (Component, $, ko, _) {
+], function (Component, $, ko, _, paging) {
     'use strict';
 
     return Component.extend({
@@ -25,22 +26,61 @@ define([
             gridExisting: [],
             gridNew: [],
             gridDeleted: [],
+            variationsExisting: [],
+            variationsNew: [],
+            variationsDeleted: [],
+            pagingExisting: paging({
+                name: 'configurableWizard.pagingExisting',
+                sizesConfig: {
+                    component: 'Magento_ConfigurableProduct/js/variations/paging/sizes',
+                    name: 'configurableWizard.pagingExisting_sizes'
+                }
+            }),
+            pagingNew: paging({
+                name: 'configurableWizard.pagingNew',
+                sizesConfig: {
+                    component: 'Magento_ConfigurableProduct/js/variations/paging/sizes',
+                    name: 'configurableWizard.pagingNew_sizes'
+                }
+            }),
+            pagingDeleted: paging({
+                name: 'configurableWizard.pagingDeleted',
+                sizesConfig: {
+                    component: 'Magento_ConfigurableProduct/js/variations/paging/sizes',
+                    name: 'configurableWizard.pagingDeleted_sizes'
+                }
+            }),
             attributes: [],
             attributesName: [$.mage.__('Images'), $.mage.__('SKU'), $.mage.__('Quantity'), $.mage.__('Price')],
             sections: [],
             gridTemplate: 'Magento_ConfigurableProduct/variations/steps/summary-grid'
         },
         initObservable: function () {
+            var pagingObservables = {
+                currentNew: ko.getObservable(this.pagingNew, 'current'),
+                currentExisting: ko.getObservable(this.pagingExisting, 'current'),
+                currentDeleted: ko.getObservable(this.pagingDeleted, 'current'),
+                pageSizeNew: ko.getObservable(this.pagingNew, 'pageSize'),
+                pageSizeExisting: ko.getObservable(this.pagingExisting, 'pageSize'),
+                pageSizeDeleted: ko.getObservable(this.pagingDeleted, 'pageSize')
+            };
+
             this._super().observe('gridExisting gridNew gridDeleted attributes sections');
             this.gridExisting.columns = ko.observableArray();
             this.gridNew.columns = ko.observableArray();
             this.gridDeleted.columns = ko.observableArray();
 
+            _.each(pagingObservables, function (observable) {
+                observable.subscribe(function () {
+                    this.generateGrid();
+                }, this);
+            }, this);
+
             return this;
         },
         nextLabelText: $.mage.__('Generate Products'),
         variations: [],
-        generateGrid: function (variations, getSectionValue) {
+        calculate: function (variations, getSectionValue) {
             var productSku = this.variationsComponent().getProductValue('sku'),
                 productPrice = this.variationsComponent().getProductPrice(),
                 productWeight = this.variationsComponent().getProductValue('weight'),
@@ -48,8 +88,8 @@ define([
                 gridExisting = [],
                 gridNew = [],
                 gridDeleted = [];
-            this.variations = [];
 
+            this.variations = [];
             _.each(variations, function (options) {
                 var product, images, sku, quantity, price, variation,
                     productId = this.variationsComponent().getProductIdByOptions(options);
@@ -101,14 +141,6 @@ define([
                 variationsKeys.push(this.variationsComponent().getVariationKey(options));
             }, this);
 
-            this.gridExisting(gridExisting);
-            this.gridExisting.columns(this.getColumnsName(this.wizard.data.attributes));
-
-            if (gridNew.length > 0) {
-                this.gridNew(gridNew);
-                this.gridNew.columns(this.getColumnsName(this.wizard.data.attributes));
-            }
-
             _.each(_.omit(this.variationsComponent().productAttributesMap, variationsKeys), function (productId) {
                 gridDeleted.push(this.prepareRowForGrid(
                     _.findWhere(this.variationsComponent().variations, {
@@ -117,13 +149,28 @@ define([
                 ));
             }.bind(this));
 
-            if (gridDeleted.length > 0) {
-                this.gridDeleted(gridDeleted);
-                this.gridDeleted.columns(this.getColumnsName(this.variationsComponent().productAttributes));
-            }
+            this.variationsExisting = gridExisting;
+            this.variationsNew = gridNew;
+            this.variationsDeleted = gridDeleted;
+
+        },
+        generateGrid: function () {
+            var pageExisting = this.pagingExisting.pageSize * this.pagingExisting.current,
+                pageNew = this.pagingNew.pageSize * this.pagingNew.current,
+                pageDeleted = this.pagingDeleted.pageSize * this.pagingDeleted.current;
+
+            this.pagingExisting.totalRecords = this.variationsExisting.length;
+            this.gridExisting(this.variationsExisting.slice(pageExisting - this.pagingExisting.pageSize, pageExisting));
+
+            this.pagingNew.totalRecords = this.variationsNew.length;
+            this.gridNew(this.variationsNew.slice(pageNew - this.pagingNew.pageSize, pageNew));
+
+            this.pagingDeleted.totalRecords = this.variationsDeleted.length;
+            this.gridDeleted(this.variationsDeleted.slice(pageDeleted - this.pagingDeleted.pageSize, pageDeleted));
         },
         prepareRowForGrid: function (variation) {
             var row = [];
+
             row.push(_.extend({
                 images: []
             }, variation.images));
@@ -158,7 +205,11 @@ define([
             this.gridNew([]);
             this.gridExisting([]);
             this.gridDeleted([]);
-            this.generateGrid(wizard.data.variations, wizard.data.sectionHelper);
+            this.gridExisting.columns(this.getColumnsName(this.wizard.data.attributes));
+            this.gridNew.columns(this.getColumnsName(this.wizard.data.attributes));
+            this.gridDeleted.columns(this.getColumnsName(this.variationsComponent().productAttributes));
+            this.calculate(wizard.data.variations, wizard.data.sectionHelper);
+            this.generateGrid();
         },
         force: function () {
             this.variationsComponent().render(this.variations, this.attributes());
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/template/variations/steps/summary-grid.html b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/template/variations/steps/summary-grid.html
index 3c79b6555c6f27b11992d35ca7c1b0fe41741fb3..ada2e2205e9fb9d0acbfc1e73fcf6ab95dec40b1 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/web/template/variations/steps/summary-grid.html
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/web/template/variations/steps/summary-grid.html
@@ -13,6 +13,10 @@
     </div>
 
     <div class="fieldset-wrapper-content in collapse" data-collapsed="true" data-bind="attr: {id: id}">
+        <!-- ko template: {
+            name: "ui/grid/paging/paging", data: paging
+            } -->
+        <!-- /ko -->
         <div class="note" data-bind="text: note"></div>
         <table class="data-grid data-grid-configurable">
             <thead>
@@ -23,7 +27,7 @@
 
             <tbody>
             <tr repeat="foreach: grid, item: '$product'">
-                <!-- ko fastForEach: { data: $product(), as: 'property' } -->
+                <!-- ko foreach: { data: $product(), as: 'property' } -->
                 <td if="property && property.preview" class="data-grid-thumbnail-cell">
                     <div class="images-uploaded">
                         <img data-bind="attr: {src: property.preview}"/>
diff --git a/app/code/Magento/Contact/view/frontend/templates/form.phtml b/app/code/Magento/Contact/view/frontend/templates/form.phtml
index 63cf1929e38c2ff8b73a09fb82f84ffacb5e30d0..aa8d69753890faceab5314a359833966e997f801 100644
--- a/app/code/Magento/Contact/view/frontend/templates/form.phtml
+++ b/app/code/Magento/Contact/view/frontend/templates/form.phtml
@@ -7,8 +7,9 @@
 // @codingStandardsIgnoreFile
 
 ?>
+<?php /** @var $block \Magento\Contact\Block\ContactForm */ ?>
 <form class="form contact"
-      action="<?php /* @escapeNotVerified */ echo $block->getFormAction(); ?>"
+      action="<?php echo $block->escapeUrl($block->getFormAction()); ?>"
       id="contact-form"
       method="post"
       data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>"
diff --git a/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml b/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml
index 0ef6e395c03c5a49307c8611b4506794fcd50fa9..cbf1d3ad2b231633b142127bdcf90df83d9f7bcf 100644
--- a/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml
+++ b/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml
@@ -6,9 +6,9 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Cookie\Block\Html\Notices $block */
 ?>
-<?php /** @var \Magento\Cookie\Block\Html\Notices $block */ ?>
-<?php if ($this->helper('Magento\Cookie\Helper\Cookie')->isUserNotAllowSaveCookie()): ?>
+<?php if ($this->helper(\Magento\Cookie\Helper\Cookie::class)->isUserNotAllowSaveCookie()): ?>
     <div class="message global cookie" id="notice-cookie-block" style="display: none">
         <div class="content">
             <p>
@@ -27,10 +27,10 @@
             "#notice-cookie-block": {
                 "cookieNotices": {
                     "cookieAllowButtonSelector": "#btn-cookie-allow",
-                    "cookieName": "<?php /* @escapeNotVerified */ echo \Magento\Cookie\Helper\Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?>",
-                    "cookieValue": <?php /* @escapeNotVerified */ echo $this->helper('Magento\Cookie\Helper\Cookie')->getAcceptedSaveCookiesWebsiteIds() ?>,
-                    "cookieLifetime": <?php /* @escapeNotVerified */ echo $this->helper('Magento\Cookie\Helper\Cookie')->getCookieRestrictionLifetime()?>,
-                    "noCookiesUrl": "<?php /* @escapeNotVerified */ echo $block->getUrl('cookie/index/noCookies') ?>"
+                    "cookieName": "<?php /* @noEscape */ echo \Magento\Cookie\Helper\Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?>",
+                    "cookieValue": <?php /* @noEscape */ echo $this->helper(\Magento\Cookie\Helper\Cookie::class)->getAcceptedSaveCookiesWebsiteIds() ?>,
+                    "cookieLifetime": <?php /* @noEscape */ echo $this->helper(\Magento\Cookie\Helper\Cookie::class)->getCookieRestrictionLifetime()?>,
+                    "noCookiesUrl": "<?php echo $block->escapeUrl($block->getUrl('cookie/index/noCookies')) ?>"
                 }
             }
         }
diff --git a/app/code/Magento/Cookie/view/frontend/templates/require_cookie.phtml b/app/code/Magento/Cookie/view/frontend/templates/require_cookie.phtml
index dd3f56da7457eb98b654393a1ab147b251d9dd01..5d8c2e7224d9cb56ae5f0a284e5740e7d11c21d4 100644
--- a/app/code/Magento/Cookie/view/frontend/templates/require_cookie.phtml
+++ b/app/code/Magento/Cookie/view/frontend/templates/require_cookie.phtml
@@ -3,12 +3,13 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
+
 ?>
 <?php /** @var \Magento\Cookie\Block\RequireCookie $block */ ?>
 <script type="text/x-magento-init">
     {
         "body": {
-            "requireCookie": <?php /* @escapeNotVerified */ echo $block->getScriptOptions(); ?>
+            "requireCookie": <?php /* @noEscape */ echo $block->getScriptOptions(); ?>
         }
     }
 </script>
\ No newline at end of file
diff --git a/app/code/Magento/Customer/Controller/Plugin/Account.php b/app/code/Magento/Customer/Controller/Plugin/Account.php
index 0a19f87b5050c4b188be70f2f0f23850bc1bf61e..5da79b8aa46a21cb5847f1eb916994938e4698d4 100644
--- a/app/code/Magento/Customer/Controller/Plugin/Account.php
+++ b/app/code/Magento/Customer/Controller/Plugin/Account.php
@@ -8,6 +8,9 @@ namespace Magento\Customer\Controller\Plugin;
 use Magento\Customer\Model\Session;
 use Magento\Framework\App\ActionInterface;
 use Magento\Framework\App\RequestInterface;
+use Magento\Framework\App\ResponseInterface;
+use Magento\Framework\App\Action\AbstractAction;
+use Magento\Framework\Controller\ResultInterface;
 
 class Account
 {
@@ -36,16 +39,12 @@ class Account
     /**
      * Dispatch actions allowed for not authorized users
      *
-     * @param ActionInterface $subject
-     * @param \Closure $proceed
+     * @param AbstractAction $subject
      * @param RequestInterface $request
-     * @return mixed
+     * @return void
      */
-    public function aroundDispatch(
-        ActionInterface $subject,
-        \Closure $proceed,
-        RequestInterface $request
-    ) {
+    public function beforeDispatch(AbstractAction $subject, RequestInterface $request)
+    {
         $action = strtolower($request->getActionName());
         $pattern = '/^(' . implode('|', $this->allowedActions) . ')$/i';
 
@@ -56,8 +55,19 @@ class Account
         } else {
             $this->session->setNoReferer(true);
         }
+    }
 
-        $result = $proceed($request);
+    /**
+     * Remove No-referer flag from customer session
+     *
+     * @param AbstractAction $subject
+     * @param ResponseInterface|ResultInterface $result
+     * @param RequestInterface $request
+     * @return ResponseInterface|ResultInterface
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function afterDispatch(AbstractAction $subject, $result, RequestInterface $request)
+    {
         $this->session->unsNoReferer(false);
         return $result;
     }
diff --git a/app/code/Magento/Customer/Model/Address/AbstractAddress.php b/app/code/Magento/Customer/Model/Address/AbstractAddress.php
index 340ee38b8d2984ce18a6d64d3b4203a3fe74f069..7b32da94ddedb476eda579521c1a19c002618ec4 100644
--- a/app/code/Magento/Customer/Model/Address/AbstractAddress.php
+++ b/app/code/Magento/Customer/Model/Address/AbstractAddress.php
@@ -393,7 +393,6 @@ class AbstractAddress extends AbstractExtensibleModel implements AddressModelInt
         if (!$regionId) {
             if (is_numeric($region)) {
                 $this->setData('region_id', $region);
-                //@TODO method unsRegion() is neither defined in abstract model nor in it's children
                 $this->unsRegion();
             } else {
                 $regionModel = $this->_createRegionInstance()->loadByCode(
@@ -629,4 +628,13 @@ class AbstractAddress extends AbstractExtensibleModel implements AddressModelInt
     {
         return $this->_countryFactory->create();
     }
+
+    /**
+     * Unset Region from address
+     * @return $this
+     */
+    public function unsRegion()
+    {
+        return $this->unsetData("region");
+    }
 }
diff --git a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php
index f102664df537b846aa5376f198a04f8b06a2d5fe..7518c4b4783a04a488256d15fd6d107b13da2cc9 100644
--- a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php
+++ b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php
@@ -8,6 +8,10 @@ namespace Magento\Customer\Model\App\Action;
 
 use Magento\Customer\Model\Context;
 use Magento\Customer\Model\GroupManagement;
+use Magento\Framework\App\Action\AbstractAction;
+use Magento\Framework\App\RequestInterface;
+use Magento\Customer\Model\Session;
+use Magento\Framework\App\Http\Context as HttpContext;
 
 /**
  * Class ContextPlugin
@@ -15,39 +19,35 @@ use Magento\Customer\Model\GroupManagement;
 class ContextPlugin
 {
     /**
-     * @var \Magento\Customer\Model\Session
+     * @var Session
      */
     protected $customerSession;
 
     /**
-     * @var \Magento\Framework\App\Http\Context
+     * @var HttpContext
      */
     protected $httpContext;
 
     /**
-     * @param \Magento\Customer\Model\Session $customerSession
-     * @param \Magento\Framework\App\Http\Context $httpContext
+     * @param Session $customerSession
+     * @param HttpContext $httpContext
      */
-    public function __construct(
-        \Magento\Customer\Model\Session $customerSession,
-        \Magento\Framework\App\Http\Context $httpContext
-    ) {
+    public function __construct(Session $customerSession, HttpContext $httpContext)
+    {
         $this->customerSession = $customerSession;
         $this->httpContext = $httpContext;
     }
 
     /**
-     * @param \Magento\Framework\App\ActionInterface $subject
-     * @param callable $proceed
-     * @param \Magento\Framework\App\RequestInterface $request
-     * @return mixed
+     * Set customer group and customer session id to HTTP context
+     *
+     * @param AbstractAction $subject
+     * @param RequestInterface $request
+     * @return void
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundDispatch(
-        \Magento\Framework\App\ActionInterface $subject,
-        \Closure $proceed,
-        \Magento\Framework\App\RequestInterface $request
-    ) {
+    public function beforeDispatch(AbstractAction $subject, RequestInterface $request)
+    {
         $this->httpContext->setValue(
             Context::CONTEXT_GROUP,
             $this->customerSession->getCustomerGroupId(),
@@ -58,6 +58,5 @@ class ContextPlugin
             $this->customerSession->isLoggedIn(),
             false
         );
-        return $proceed($request);
     }
 }
diff --git a/app/code/Magento/Customer/Model/AttributeMetadataConverter.php b/app/code/Magento/Customer/Model/AttributeMetadataConverter.php
index 911a0626589e003490f64b1c23255489fe4c9c49..6167660854ddd5f570e64d7136ecccebbcb1c8fa 100644
--- a/app/code/Magento/Customer/Model/AttributeMetadataConverter.php
+++ b/app/code/Magento/Customer/Model/AttributeMetadataConverter.php
@@ -8,6 +8,7 @@ namespace Magento\Customer\Model;
 use Magento\Customer\Api\Data\OptionInterfaceFactory;
 use Magento\Customer\Api\Data\ValidationRuleInterfaceFactory;
 use Magento\Customer\Api\Data\AttributeMetadataInterfaceFactory;
+use Magento\Eav\Api\Data\AttributeDefaultValueInterface;
 
 /**
  * Converter for AttributeMetadata
@@ -93,7 +94,13 @@ class AttributeMetadataConverter
             $validationRules[] = $validationRule;
         }
 
-        return $this->attributeMetadataFactory->create()->setAttributeCode($attribute->getAttributeCode())
+        $attributeMetaData = $this->attributeMetadataFactory->create();
+
+        if ($attributeMetaData instanceof AttributeDefaultValueInterface) {
+            $attributeMetaData->setDefaultValue($attribute->getDefaultValue());
+        }
+
+        return $attributeMetaData->setAttributeCode($attribute->getAttributeCode())
             ->setFrontendInput($attribute->getFrontendInput())
             ->setInputFilter((string)$attribute->getInputFilter())
             ->setStoreLabel($attribute->getStoreLabel())
diff --git a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
index df55cd1c3f02facef96d7427e21e4b37988c8b5f..337cefd8b99d46064925032d21ee8aa606e660c0 100644
--- a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
+++ b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
@@ -8,6 +8,7 @@ namespace Magento\Customer\Model\Customer\Attribute\Backend;
 use Magento\Framework\Exception\LocalizedException;
 
 /**
+ * @deprecated
  * Customer password attribute backend
  */
 class Password extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
@@ -62,6 +63,7 @@ class Password extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBacke
     }
 
     /**
+     * @deprecated
      * @param \Magento\Framework\DataObject $object
      * @return bool
      */
diff --git a/app/code/Magento/Customer/Model/Data/AttributeMetadata.php b/app/code/Magento/Customer/Model/Data/AttributeMetadata.php
index 81e5f5dec321acef91e13baca71626a04026f2f3..2313909639540f770b3326666e9a32824e0964ef 100644
--- a/app/code/Magento/Customer/Model/Data/AttributeMetadata.php
+++ b/app/code/Magento/Customer/Model/Data/AttributeMetadata.php
@@ -12,7 +12,8 @@ use Magento\Customer\Api\Data\AttributeMetadataInterface;
  * Customer attribute metadata class.
  */
 class AttributeMetadata extends \Magento\Framework\Api\AbstractSimpleObject implements
-    \Magento\Customer\Api\Data\AttributeMetadataInterface
+    \Magento\Customer\Api\Data\AttributeMetadataInterface,
+    \Magento\Eav\Api\Data\AttributeDefaultValueInterface
 {
     /**
      * {@inheritdoc}
@@ -400,4 +401,20 @@ class AttributeMetadata extends \Magento\Framework\Api\AbstractSimpleObject impl
     {
         return $this->setData(self::IS_SEARCHABLE_IN_GRID, $isSearchableInGrid);
     }
+
+    /**
+     * @inheritdoc
+     */
+    public function getDefaultValue()
+    {
+        return $this->_get(self::DEFAULT_VALUE);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function setDefaultValue($defaultValue)
+    {
+        return $this->setData(self::DEFAULT_VALUE, $defaultValue);
+    }
 }
diff --git a/app/code/Magento/Customer/Model/EmailNotification.php b/app/code/Magento/Customer/Model/EmailNotification.php
index 4f362ccada6e2c8c6d9c878cb1f14042d3e0a951..1aed513ef07e210729b6d85411e6f64d46d39279 100644
--- a/app/code/Magento/Customer/Model/EmailNotification.php
+++ b/app/code/Magento/Customer/Model/EmailNotification.php
@@ -43,6 +43,23 @@ class EmailNotification implements EmailNotificationInterface
     const XML_PATH_CONFIRM_EMAIL_TEMPLATE = 'customer/create_account/email_confirmation_template';
 
     const XML_PATH_CONFIRMED_EMAIL_TEMPLATE = 'customer/create_account/email_confirmed_template';
+
+    /**
+     * self::NEW_ACCOUNT_EMAIL_REGISTERED               welcome email, when confirmation is disabled
+     *                                                  and password is set
+     * self::NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD   welcome email, when confirmation is disabled
+     *                                                  and password is not set
+     * self::NEW_ACCOUNT_EMAIL_CONFIRMED                welcome email, when confirmation is enabled
+     *                                                  and password is set
+     * self::NEW_ACCOUNT_EMAIL_CONFIRMATION             email with confirmation link
+     */
+    const TEMPLATE_TYPES = [
+        self::NEW_ACCOUNT_EMAIL_REGISTERED => self::XML_PATH_REGISTER_EMAIL_TEMPLATE,
+        self::NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD => self::XML_PATH_REGISTER_NO_PASSWORD_EMAIL_TEMPLATE,
+        self::NEW_ACCOUNT_EMAIL_CONFIRMED => self::XML_PATH_CONFIRMED_EMAIL_TEMPLATE,
+        self::NEW_ACCOUNT_EMAIL_CONFIRMATION => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE,
+    ];
+
     /**#@-*/
 
     /**
@@ -339,7 +356,7 @@ class EmailNotification implements EmailNotificationInterface
         $storeId = 0,
         $sendemailStoreId = null
     ) {
-        $types = $this->getTemplateTypes();
+        $types = self::TEMPLATE_TYPES;
 
         if (!isset($types[$type])) {
             throw new LocalizedException(__('Please correct the transactional account email type.'));
@@ -361,30 +378,4 @@ class EmailNotification implements EmailNotificationInterface
             $storeId
         );
     }
-
-    /**
-     * Get template types
-     *
-     * @return array
-     * @todo: consider eliminating method
-     */
-    private function getTemplateTypes()
-    {
-        /**
-         * self::NEW_ACCOUNT_EMAIL_REGISTERED               welcome email, when confirmation is disabled
-         *                                                  and password is set
-         * self::NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD   welcome email, when confirmation is disabled
-         *                                                  and password is not set
-         * self::NEW_ACCOUNT_EMAIL_CONFIRMED                welcome email, when confirmation is enabled
-         *                                                  and password is set
-         * self::NEW_ACCOUNT_EMAIL_CONFIRMATION             email with confirmation link
-         */
-        $types = [
-            self::NEW_ACCOUNT_EMAIL_REGISTERED => self::XML_PATH_REGISTER_EMAIL_TEMPLATE,
-            self::NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD => self::XML_PATH_REGISTER_NO_PASSWORD_EMAIL_TEMPLATE,
-            self::NEW_ACCOUNT_EMAIL_CONFIRMED => self::XML_PATH_CONFIRMED_EMAIL_TEMPLATE,
-            self::NEW_ACCOUNT_EMAIL_CONFIRMATION => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE,
-        ];
-        return $types;
-    }
 }
diff --git a/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php b/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
index 2c30425f337a22d5a6583c80fd3ae5f72d1d6747..67d4ea32369ba8a37fef329d2aec809037fcac75 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
@@ -11,8 +11,8 @@ use Magento\Customer\Model\Address as CustomerAddressModel;
 use Magento\Customer\Model\Customer as CustomerModel;
 use Magento\Customer\Model\ResourceModel\Address\Collection;
 use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Api\SearchCriteriaInterface;
-use Magento\Framework\Api\SortOrder;
 use Magento\Framework\Exception\InputException;
 
 /**
@@ -62,6 +62,11 @@ class AddressRepository implements \Magento\Customer\Api\AddressRepositoryInterf
      */
     protected $extensionAttributesJoinProcessor;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param \Magento\Customer\Model\AddressFactory $addressFactory
      * @param \Magento\Customer\Model\AddressRegistry $addressRegistry
@@ -71,6 +76,7 @@ class AddressRepository implements \Magento\Customer\Api\AddressRepositoryInterf
      * @param \Magento\Customer\Api\Data\AddressSearchResultsInterfaceFactory $addressSearchResultsFactory
      * @param \Magento\Customer\Model\ResourceModel\Address\CollectionFactory $addressCollectionFactory
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      */
     public function __construct(
         \Magento\Customer\Model\AddressFactory $addressFactory,
@@ -80,7 +86,8 @@ class AddressRepository implements \Magento\Customer\Api\AddressRepositoryInterf
         \Magento\Directory\Helper\Data $directoryData,
         \Magento\Customer\Api\Data\AddressSearchResultsInterfaceFactory $addressSearchResultsFactory,
         \Magento\Customer\Model\ResourceModel\Address\CollectionFactory $addressCollectionFactory,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->addressFactory = $addressFactory;
         $this->addressRegistry = $addressRegistry;
@@ -90,6 +97,7 @@ class AddressRepository implements \Magento\Customer\Api\AddressRepositoryInterf
         $this->addressSearchResultsFactory = $addressSearchResultsFactory;
         $this->addressCollectionFactory = $addressCollectionFactory;
         $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -164,29 +172,14 @@ class AddressRepository implements \Magento\Customer\Api\AddressRepositoryInterf
      */
     public function getList(SearchCriteriaInterface $searchCriteria)
     {
-        $searchResults = $this->addressSearchResultsFactory->create();
-
         /** @var Collection $collection */
         $collection = $this->addressCollectionFactory->create();
         $this->extensionAttributesJoinProcessor->process(
             $collection,
             \Magento\Customer\Api\Data\AddressInterface::class
         );
-        // Add filters from root filter group to the collection
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
-        $searchResults->setTotalCount($collection->getSize());
-        /** @var SortOrder $sortOrder */
-        foreach ((array)$searchCriteria->getSortOrders() as $sortOrder) {
-            $field = $sortOrder->getField();
-            $collection->addOrder(
-                $field,
-                ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-            );
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
+
+        $this->collectionProcessor->process($searchCriteria, $collection);
 
         /** @var \Magento\Customer\Api\Data\AddressInterface[] $addresses */
         $addresses = [];
@@ -194,14 +187,19 @@ class AddressRepository implements \Magento\Customer\Api\AddressRepositoryInterf
         foreach ($collection->getItems() as $address) {
             $addresses[] = $this->getById($address->getId());
         }
+
+        /** @var \Magento\Customer\Api\Data\AddressSearchResultsInterface $searchResults */
+        $searchResults = $this->addressSearchResultsFactory->create();
         $searchResults->setItems($addresses);
         $searchResults->setSearchCriteria($searchCriteria);
+        $searchResults->setTotalCount($collection->getSize());
         return $searchResults;
     }
 
     /**
      * Helper function that adds a FilterGroup to the collection.
      *
+     * @deprecated
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
@@ -320,4 +318,20 @@ class AddressRepository implements \Magento\Customer\Api\AddressRepositoryInterf
         }
         return $exception;
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor'
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php
index fa05ad3d4824e98b5ce9d575db92ed68ef16e0f6..16896063709ba7b7e56fa407bccb667682f092dd 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php
@@ -9,8 +9,8 @@ namespace Magento\Customer\Model\ResourceModel;
 use Magento\Customer\Api\CustomerMetadataInterface;
 use Magento\Framework\Api\DataObjectHelper;
 use Magento\Framework\Api\ImageProcessorInterface;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Api\SearchCriteriaInterface;
-use Magento\Framework\Api\SortOrder;
 
 /**
  * Customer repository.
@@ -83,6 +83,11 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte
      */
     protected $extensionAttributesJoinProcessor;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param \Magento\Customer\Model\Data\CustomerSecureFactory $customerSecureFactory
@@ -97,6 +102,7 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte
      * @param DataObjectHelper $dataObjectHelper
      * @param ImageProcessorInterface $imageProcessor
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -112,7 +118,8 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte
         \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter,
         DataObjectHelper $dataObjectHelper,
         ImageProcessorInterface $imageProcessor,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->customerFactory = $customerFactory;
         $this->customerSecureFactory = $customerSecureFactory;
@@ -127,6 +134,7 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte
         $this->dataObjectHelper = $dataObjectHelper;
         $this->imageProcessor = $imageProcessor;
         $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -289,23 +297,11 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte
             ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
             ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left')
             ->joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left');
-        //Add filters from root filter group to the collection
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
+
+        $this->collectionProcessor->process($searchCriteria, $collection);
+
         $searchResults->setTotalCount($collection->getSize());
-        $sortOrders = $searchCriteria->getSortOrders();
-        if ($sortOrders) {
-            /** @var SortOrder $sortOrder */
-            foreach ($searchCriteria->getSortOrders() as $sortOrder) {
-                $collection->addOrder(
-                    $sortOrder->getField(),
-                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-                );
-            }
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
+
         $customers = [];
         /** @var \Magento\Customer\Model\Customer $customerModel */
         foreach ($collection as $customerModel) {
@@ -337,6 +333,7 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte
     /**
      * Helper function that adds a FilterGroup to the collection.
      *
+     * @deprecated
      * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
      * @param \Magento\Customer\Model\ResourceModel\Customer\Collection $collection
      * @return void
@@ -355,4 +352,20 @@ class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInte
             $collection->addFieldToFilter($fields);
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor'
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Customer/Model/ResourceModel/GroupRepository.php b/app/code/Magento/Customer/Model/ResourceModel/GroupRepository.php
index 5768eb9a3a32a227f560671b67cde90d06174a86..044616f141cb14c5cea0ce4f4501bbd34590162f 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/GroupRepository.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/GroupRepository.php
@@ -10,7 +10,7 @@ use Magento\Customer\Api\Data\GroupInterface;
 use Magento\Customer\Model\ResourceModel\Group\Collection;
 use Magento\Framework\Api\Search\FilterGroup;
 use Magento\Framework\Api\SearchCriteriaInterface;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Exception\InputException;
 use Magento\Framework\Exception\State\InvalidTransitionException;
 use Magento\Tax\Api\Data\TaxClassInterface;
@@ -70,6 +70,11 @@ class GroupRepository implements \Magento\Customer\Api\GroupRepositoryInterface
      */
     protected $extensionAttributesJoinProcessor;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param \Magento\Customer\Model\GroupRegistry $groupRegistry
      * @param \Magento\Customer\Model\GroupFactory $groupFactory
@@ -79,6 +84,7 @@ class GroupRepository implements \Magento\Customer\Api\GroupRepositoryInterface
      * @param \Magento\Customer\Api\Data\GroupSearchResultsInterfaceFactory $searchResultsFactory
      * @param \Magento\Tax\Api\TaxClassRepositoryInterface $taxClassRepositoryInterface
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      */
     public function __construct(
         \Magento\Customer\Model\GroupRegistry $groupRegistry,
@@ -88,7 +94,8 @@ class GroupRepository implements \Magento\Customer\Api\GroupRepositoryInterface
         \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor,
         \Magento\Customer\Api\Data\GroupSearchResultsInterfaceFactory $searchResultsFactory,
         \Magento\Tax\Api\TaxClassRepositoryInterface $taxClassRepositoryInterface,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->groupRegistry = $groupRegistry;
         $this->groupFactory = $groupFactory;
@@ -98,6 +105,7 @@ class GroupRepository implements \Magento\Customer\Api\GroupRepositoryInterface
         $this->searchResultsFactory = $searchResultsFactory;
         $this->taxClassRepository = $taxClassRepositoryInterface;
         $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -179,29 +187,7 @@ class GroupRepository implements \Magento\Customer\Api\GroupRepositoryInterface
         $this->extensionAttributesJoinProcessor->process($collection, $groupInterfaceName);
         $collection->addTaxClass();
 
-        //Add filters from root filter group to the collection
-        /** @var FilterGroup $group */
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
-        $sortOrders = $searchCriteria->getSortOrders();
-        /** @var SortOrder $sortOrder */
-        if ($sortOrders) {
-            foreach ($searchCriteria->getSortOrders() as $sortOrder) {
-                $field = $this->translateField($sortOrder->getField());
-                $collection->addOrder(
-                    $field,
-                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-                );
-            }
-        } else {
-            // set a default sorting order since this method is used constantly in many
-            // different blocks
-            $field = $this->translateField('id');
-            $collection->addOrder($field, 'ASC');
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
+        $this->collectionProcessor->process($searchCriteria, $collection);
 
         /** @var \Magento\Customer\Api\Data\GroupInterface[] $groups */
         $groups = [];
@@ -229,6 +215,7 @@ class GroupRepository implements \Magento\Customer\Api\GroupRepositoryInterface
     /**
      * Helper function that adds a FilterGroup to the collection.
      *
+     * @deprecated
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
@@ -251,6 +238,7 @@ class GroupRepository implements \Magento\Customer\Api\GroupRepositoryInterface
     /**
      * Translates a field name to a DB column name for use in collection queries.
      *
+     * @deprecated
      * @param string $field a field name that should be translated to a DB column name.
      * @return string
      */
@@ -345,4 +333,20 @@ class GroupRepository implements \Magento\Customer\Api\GroupRepositoryInterface
             throw InputException::invalidFieldValue('taxClassId', $group->getTaxClassId());
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Customer\Model\Api\SearchCriteria\GroupCollectionProcessor'
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Plugin/AccountTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Plugin/AccountTest.php
index b175e55f1d3be90b4b6b886c3db22eb361e8e904..b9c05d4005be5e6664f9a36b76db7814140a55b8 100644
--- a/app/code/Magento/Customer/Test/Unit/Controller/Plugin/AccountTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Controller/Plugin/AccountTest.php
@@ -9,7 +9,10 @@ use Magento\Customer\Controller\Plugin\Account;
 use Magento\Customer\Model\Session;
 use Magento\Framework\App\ActionFlag;
 use Magento\Framework\App\ActionInterface;
+use Magento\Framework\App\Action\AbstractAction;
 use Magento\Framework\App\Request\Http;
+use Magento\Framework\Controller\ResultInterface;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
 
 class AccountTest extends \PHPUnit_Framework_TestCase
 {
@@ -29,12 +32,7 @@ class AccountTest extends \PHPUnit_Framework_TestCase
     protected $session;
 
     /**
-     * @var \Closure
-     */
-    protected $proceed;
-
-    /**
-     * @var ActionInterface | \PHPUnit_Framework_MockObject_MockObject
+     * @var AbstractAction | \PHPUnit_Framework_MockObject_MockObject
      */
     protected $subject;
 
@@ -48,6 +46,11 @@ class AccountTest extends \PHPUnit_Framework_TestCase
      */
     protected $actionFlag;
 
+    /**
+     * @var ResultInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $resultInterface;
+
     protected function setUp()
     {
         $this->session = $this->getMockBuilder(\Magento\Customer\Model\Session::class)
@@ -59,16 +62,13 @@ class AccountTest extends \PHPUnit_Framework_TestCase
             ])
             ->getMock();
 
-        $this->subject = $this->getMockBuilder(\Magento\Framework\App\ActionInterface::class)
+        $this->subject = $this->getMockBuilder(AbstractAction::class)
             ->setMethods([
                 'getActionFlag',
             ])
+            ->disableOriginalConstructor()
             ->getMockForAbstractClass();
 
-        $this->proceed = function () {
-            return self::EXPECTED_VALUE;
-        };
-
         $this->request = $this->getMockBuilder(\Magento\Framework\App\Request\Http::class)
             ->disableOriginalConstructor()
             ->setMethods([
@@ -76,6 +76,9 @@ class AccountTest extends \PHPUnit_Framework_TestCase
             ])
             ->getMock();
 
+        $this->resultInterface = $this->getMockBuilder(ResultInterface::class)
+            ->getMockForAbstractClass();
+
         $this->actionFlag = $this->getMockBuilder(\Magento\Framework\App\ActionFlag::class)
             ->disableOriginalConstructor()
             ->getMock();
@@ -87,9 +90,9 @@ class AccountTest extends \PHPUnit_Framework_TestCase
      * @param boolean $isActionAllowed
      * @param boolean $isAuthenticated
      *
-     * @dataProvider dataProviderAroundDispatch
+     * @dataProvider beforeDispatchDataProvider
      */
-    public function testAroundDispatch(
+    public function testBeforeDispatch(
         $action,
         $allowedActions,
         $isActionAllowed,
@@ -99,11 +102,6 @@ class AccountTest extends \PHPUnit_Framework_TestCase
             ->method('getActionName')
             ->willReturn($action);
 
-        $this->session->expects($this->once())
-            ->method('unsNoReferer')
-            ->with(false)
-            ->willReturnSelf();
-
         if ($isActionAllowed) {
             $this->session->expects($this->once())
                 ->method('setNoReferer')
@@ -126,13 +124,13 @@ class AccountTest extends \PHPUnit_Framework_TestCase
         }
 
         $plugin = new Account($this->session, $allowedActions);
-        $this->assertEquals(
-            self::EXPECTED_VALUE,
-            $plugin->aroundDispatch($this->subject, $this->proceed, $this->request)
-        );
+        $plugin->beforeDispatch($this->subject, $this->request);
     }
 
-    public function dataProviderAroundDispatch()
+    /**
+     * @return array
+     */
+    public function beforeDispatchDataProvider()
     {
         return [
             [
@@ -167,4 +165,24 @@ class AccountTest extends \PHPUnit_Framework_TestCase
             ],
         ];
     }
+
+    public function testAfterDispatch()
+    {
+        $this->session->expects($this->once())
+            ->method('unsNoReferer')
+            ->with(false)
+            ->willReturnSelf();
+
+        $plugin = (new ObjectManager($this))->getObject(
+            Account::class,
+            [
+                'session' => $this->session,
+                'allowedActions' => ['testaction']
+            ]
+        );
+        $this->assertSame(
+            $this->resultInterface,
+            $plugin->afterDispatch($this->subject, $this->resultInterface, $this->request)
+        );
+    }
 }
diff --git a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php
index c5ab448f976474dac910b7d090fe84a448f385a4..985e2ecb7efd3a25c333dc9ecd24fe7e9b1dc11d 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php
@@ -28,11 +28,6 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
      */
     protected $httpContextMock;
 
-    /**
-     * @var \Closure
-     */
-    protected $closureMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -62,9 +57,6 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $this->closureMock = function () {
-            return 'ExpectedValue';
-        };
         $this->subjectMock = $this->getMock(\Magento\Framework\App\Action\Action::class, [], [], '', false);
         $this->requestMock = $this->getMock(\Magento\Framework\App\RequestInterface::class);
         $this->plugin = new \Magento\Customer\Model\App\Action\ContextPlugin(
@@ -76,7 +68,7 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
     /**
      * Test aroundDispatch
      */
-    public function testAroundDispatch()
+    public function testBeforeDispatch()
     {
         $this->customerSessionMock->expects($this->once())
             ->method('getCustomerGroupId')
@@ -94,9 +86,6 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
                     ]
                 )
             );
-        $this->assertEquals(
-            'ExpectedValue',
-            $this->plugin->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock)
-        );
+        $this->plugin->beforeDispatch($this->subjectMock, $this->requestMock);
     }
 }
diff --git a/app/code/Magento/Customer/Test/Unit/Model/AttributeMetadatConverterTest.php b/app/code/Magento/Customer/Test/Unit/Model/AttributeMetadatConverterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..c7182a516515f381af96308e05a7f40e6b9cf07a
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Unit/Model/AttributeMetadatConverterTest.php
@@ -0,0 +1,194 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Customer\Test\Unit\Model;
+
+use Magento\Customer\Api\Data\OptionInterfaceFactory;
+use Magento\Customer\Api\Data\ValidationRuleInterfaceFactory;
+use Magento\Customer\Api\Data\AttributeMetadataInterfaceFactory;
+use Magento\Customer\Model\AttributeMetadataConverter;
+
+/**
+ * Class AttributeMetadataConverterTest
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @package Magento\Customer\Test\Unit\Model
+ */
+class AttributeMetadatConverterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var OptionInterfaceFactory | \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $optionFactory;
+
+    /**
+     * @var ValidationRuleInterfaceFactory | \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $validationRuleFactory;
+
+    /**
+     * @var AttributeMetadataInterfaceFactory | \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $attributeMetadataFactory;
+
+    /**
+     * @var \Magento\Framework\Api\DataObjectHelper | \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $dataObjectHelper;
+
+    /** @var  AttributeMetadataConverter */
+    private $model;
+
+    /** @var  \Magento\Customer\Model\Attribute | \PHPUnit_Framework_MockObject_MockObject */
+    private $attribute;
+
+    public function setUp()
+    {
+        $this->optionFactory = $this->getMockBuilder(OptionInterfaceFactory::class)
+            ->setMethods(['create'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->validationRuleFactory = $this->getMockBuilder(ValidationRuleInterfaceFactory::class)
+            ->setMethods(['create'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->attributeMetadataFactory = $this->getMockBuilder(AttributeMetadataInterfaceFactory::class)
+            ->setMethods(['create'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->dataObjectHelper =  $this->getMockBuilder(\Magento\Framework\Api\DataObjectHelper::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->attribute = $this->getMockBuilder(\Magento\Customer\Model\Attribute::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->model = new AttributeMetadataConverter(
+            $this->optionFactory,
+            $this->validationRuleFactory,
+            $this->attributeMetadataFactory,
+            $this->dataObjectHelper
+        );
+    }
+
+    /**
+     * @return array
+     */
+    private function prepareValidateRules()
+    {
+        return [
+            'one' => 'numeric',
+            'two' => 'alphanumeric'
+        ];
+    }
+
+    /**
+     * @return array
+     */
+    private function prepareOptions()
+    {
+        return [
+            [
+                'label' => 'few_values',
+                'value' => [
+                    [1], [2]
+                ]
+            ],
+            [
+                'label' => 'one_value',
+                'value' => 1
+            ]
+        ];
+    }
+
+    public function testCreateAttributeMetadataTestWithSource()
+    {
+        $validatedRules = $this->prepareValidateRules();
+        $options = $this->prepareOptions();
+        $optionDataObjectForSimpleValue1 = $this->getMockBuilder(\Magento\Customer\Model\Data\Option::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $optionDataObjectForSimpleValue2 = $this->getMockBuilder(\Magento\Customer\Model\Data\Option::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $optionObject1 = $this->getMock(\Magento\Customer\Api\Data\OptionInterface::class);
+        $optionObject2 = $this->getMock(\Magento\Customer\Api\Data\OptionInterface::class);
+        $this->optionFactory->expects($this->exactly(4))
+            ->method('create')
+            ->will(
+                $this->onConsecutiveCalls(
+                    $optionDataObjectForSimpleValue2,
+                    $optionObject1,
+                    $optionObject2,
+                    $optionDataObjectForSimpleValue1
+                )
+            );
+        $source = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute\Source\AbstractSource::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $source->expects($this->once())
+            ->method('getAllOptions')
+            ->willReturn($options);
+        $this->attribute->expects($this->once())
+            ->method('usesSource')
+            ->willReturn(true);
+        $this->attribute->expects($this->once())
+            ->method('getSource')
+            ->willReturn($source);
+        $optionDataObjectForSimpleValue1->expects($this->once())
+            ->method('setValue')
+            ->with(1);
+        $optionDataObjectForSimpleValue2->expects($this->once())
+            ->method('setLabel')
+            ->with('few_values');
+        $optionDataObjectForSimpleValue1->expects($this->once())
+            ->method('setLabel')
+            ->with('one_value');
+        $this->dataObjectHelper->expects($this->exactly(2))
+            ->method('populateWithArray')
+            ->withConsecutive(
+                [$optionObject1, ['1'], \Magento\Customer\Api\Data\OptionInterface::class],
+                [$optionObject2, ['2'], \Magento\Customer\Api\Data\OptionInterface::class]
+            );
+        $validationRule1 = $this->getMock(\Magento\Customer\Api\Data\ValidationRuleInterface::class);
+        $validationRule2 = $this->getMock(\Magento\Customer\Api\Data\ValidationRuleInterface::class);
+        $this->validationRuleFactory->expects($this->exactly(2))
+            ->method('create')
+            ->will($this->onConsecutiveCalls($validationRule1, $validationRule2));
+        $validationRule1->expects($this->once())
+            ->method('setValue')
+            ->with('numeric');
+        $validationRule1->expects($this->once())
+            ->method('setName')
+            ->with('one')
+            ->willReturnSelf();
+        $validationRule2->expects($this->once())
+            ->method('setValue')
+            ->with('alphanumeric');
+        $validationRule2->expects($this->once())
+            ->method('setName')
+            ->with('two')
+            ->willReturnSelf();
+        $attributeMetaData = $this->getMockBuilder(\Magento\Customer\Model\Data\AttributeMetadata::class)
+            ->disableOriginalConstructor()
+            ->enableProxyingToOriginalMethods()
+            ->getMock();
+        $this->attribute->expects($this->once())
+            ->method('getValidateRules')
+            ->willReturn($validatedRules);
+        $this->attributeMetadataFactory->expects($this->once())
+            ->method('create')
+            ->willReturn($attributeMetaData);
+        $frontend = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->attribute->expects($this->once())
+            ->method('getFrontend')
+            ->willReturn($frontend);
+        $optionDataObjectForSimpleValue2->expects($this->once())
+            ->method('setOptions')
+            ->with([$optionObject1, $optionObject2]);
+        $this->model->createMetadataAttribute($this->attribute);
+    }
+}
diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressRepositoryTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressRepositoryTest.php
index a6ab66c6e25dc723842885388b53643c6c39f45f..b72a5f6a417d4ab77d2c025e1f43b6e58f72ccc2 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressRepositoryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressRepositoryTest.php
@@ -5,6 +5,8 @@
  */
 namespace Magento\Customer\Test\Unit\Model\ResourceModel;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -65,6 +67,11 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $repository;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     protected function setUp()
     {
         $this->addressFactory = $this->getMock(
@@ -130,6 +137,9 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
             false
         );
 
+        $this->collectionProcessor = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMockForAbstractClass();
+
         $this->repository = new \Magento\Customer\Model\ResourceModel\AddressRepository(
             $this->addressFactory,
             $this->addressRegistry,
@@ -138,7 +148,8 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
             $this->directoryData,
             $this->addressSearchResultsFactory,
             $this->addressCollectionFactory,
-            $this->extensionAttributesJoinProcessor
+            $this->extensionAttributesJoinProcessor,
+            $this->collectionProcessor
         );
     }
 
@@ -490,8 +501,6 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
 
     public function testGetList()
     {
-        $filterGroup = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filter = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
         $collection = $this->getMock(
             \Magento\Customer\Model\ResourceModel\Address\Collection::class,
             [],
@@ -516,43 +525,16 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->extensionAttributesJoinProcessor->expects($this->once())
             ->method('process')
             ->with($collection, \Magento\Customer\Api\Data\AddressInterface::class);
-        $searchCriteria->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroup]);
-        $filterGroup->expects($this->once())->method('getFilters')->willReturn([$filter]);
-        $filter->expects($this->once())->method('getConditionType')->willReturn(false);
-        $filter->expects($this->once())->method('getField')->willReturn('Field');
-        $filter->expects($this->atLeastOnce())->method('getValue')->willReturn('Value');
-        $collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->with([['attribute' => 'Field', 'eq' => 'Value']], [['eq' => 'Value']]);
+
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteria, $collection)
+            ->willReturnSelf();
+
         $collection->expects($this->once())->method('getSize')->willReturn(23);
         $searchResults->expects($this->once())
             ->method('setTotalCount')
             ->with(23);
-        $sortOrder = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
-        $searchCriteria->expects($this->once())
-            ->method('getSortOrders')
-            ->willReturn([$sortOrder]);
-        $sortOrder->expects($this->once())
-            ->method('getField')
-            ->willReturn('Field');
-        $sortOrder->expects($this->once())
-            ->method('getDirection')
-            ->willReturn(\Magento\Framework\Api\SortOrder::SORT_ASC);
-        $collection->expects($this->once())
-            ->method('addOrder')
-            ->with('Field', 'ASC');
-        $searchCriteria->expects($this->once())
-            ->method('getCurrentPage')
-            ->willReturn(1);
-        $collection->expects($this->once())
-            ->method('setCurPage')
-            ->with(1);
-        $searchCriteria->expects($this->once())
-            ->method('getPageSize')
-            ->willReturn(10);
-        $collection->expects($this->once())
-            ->method('setPageSize')
-            ->with(10);
         $collection->expects($this->once())
             ->method('getItems')
             ->willReturn([$this->address]);
diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php
index 9de5939181c9490233e7eb9691b5d2e35cbc1b3c..426548ce83c1ef2f6112c0c101e048a614da5676 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php
@@ -7,9 +7,11 @@
 namespace Magento\Customer\Test\Unit\Model\ResourceModel;
 
 use Magento\Customer\Api\CustomerMetadataInterface;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @SuppressWarnings(PHPMD.TooManyFields)
  */
 class CustomerRepositoryTest extends \PHPUnit_Framework_TestCase
 {
@@ -83,6 +85,11 @@ class CustomerRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $customer;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessorMock;
+
     /**
      * @var \Magento\Customer\Model\ResourceModel\CustomerRepository
      */
@@ -167,6 +174,8 @@ class CustomerRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
+        $this->collectionProcessorMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
 
         $this->model = new \Magento\Customer\Model\ResourceModel\CustomerRepository(
             $this->customerFactory,
@@ -181,7 +190,8 @@ class CustomerRepositoryTest extends \PHPUnit_Framework_TestCase
             $this->extensibleDataObjectConverter,
             $this->dataObjectHelper,
             $this->imageProcessor,
-            $this->extensionAttributesJoinProcessor
+            $this->extensionAttributesJoinProcessor,
+            $this->collectionProcessorMock
         );
     }
 
@@ -665,9 +675,6 @@ class CustomerRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetList()
     {
-        $sortOrder = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
-        $filterGroup = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filter = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
         $collection = $this->getMock(
             \Magento\Customer\Model\ResourceModel\Customer\Collection::class,
             [],
@@ -763,48 +770,9 @@ class CustomerRepositoryTest extends \PHPUnit_Framework_TestCase
             ->method('joinAttribute')
             ->with('company', 'customer_address/company', 'default_billing', null, 'left')
             ->willReturnSelf();
-        $searchCriteria->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn([$filterGroup]);
-        $collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->with([['attribute' => 'Field', 'eq' => 'Value']]);
-        $filterGroup->expects($this->once())
-            ->method('getFilters')
-            ->willReturn([$filter]);
-        $filter->expects($this->once())
-            ->method('getConditionType')
-            ->willReturn(false);
-        $filter->expects($this->once())
-            ->method('getField')
-            ->willReturn('Field');
-        $filter->expects($this->atLeastOnce())
-            ->method('getValue')
-            ->willReturn('Value');
-        $collection->expects($this->once())
-            ->method('addOrder')
-            ->with('Field', 'ASC');
-        $searchCriteria->expects($this->atLeastOnce())
-            ->method('getSortOrders')
-            ->willReturn([$sortOrder]);
-        $sortOrder->expects($this->once())
-            ->method('getField')
-            ->willReturn('Field');
-        $sortOrder->expects($this->once())
-            ->method('getDirection')
-            ->willReturn(\Magento\Framework\Api\SortOrder::SORT_ASC);
-        $searchCriteria->expects($this->once())
-            ->method('getCurrentPage')
-            ->willReturn(1);
-        $collection->expects($this->once())
-            ->method('setCurPage')
-            ->with(1);
-        $searchCriteria->expects($this->once())
-            ->method('getPageSize')
-            ->willReturn(10);
-        $collection->expects($this->once())
-            ->method('setPageSize')
-            ->with(10);
+        $this->collectionProcessorMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteria, $collection);
         $collection->expects($this->once())
             ->method('getSize')
             ->willReturn(23);
diff --git a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/GroupRepositoryTest.php b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/GroupRepositoryTest.php
index 9cfeea5801eedc14aede5e6c5538f86708b56a15..1524db8ab9725d1bb71af0b23fec21a10a4a06af 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/GroupRepositoryTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/ResourceModel/GroupRepositoryTest.php
@@ -6,6 +6,8 @@
 
 namespace Magento\Customer\Test\Unit\Model\ResourceModel;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -66,12 +68,68 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $extensionAttributesJoinProcessor;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessorMock;
+
     /**
      * @var \Magento\Customer\Model\ResourceModel\GroupRepository
      */
     protected $model;
     
     protected function setUp()
+    {
+        $this->setupGroupObjects();
+        $this->dataObjectProcessor = $this->getMock(
+            \Magento\Framework\Reflection\DataObjectProcessor::class,
+            [],
+            [],
+            '',
+            false
+        );
+        $this->searchResultsFactory = $this->getMock(
+            \Magento\Customer\Api\Data\GroupSearchResultsInterfaceFactory::class,
+            ['create'],
+            [],
+            '',
+            false
+        );
+        $this->searchResults = $this->getMockForAbstractClass(
+            \Magento\Customer\Api\Data\GroupSearchResultsInterface::class,
+            [],
+            '',
+            false
+        );
+        $this->taxClassRepository = $this->getMockForAbstractClass(
+            \Magento\Tax\Api\TaxClassRepositoryInterface::class,
+            [],
+            '',
+            false
+        );
+        $this->extensionAttributesJoinProcessor = $this->getMockForAbstractClass(
+            \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface::class,
+            [],
+            '',
+            false
+        );
+        $this->collectionProcessorMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
+
+        $this->model = new \Magento\Customer\Model\ResourceModel\GroupRepository(
+            $this->groupRegistry,
+            $this->groupFactory,
+            $this->groupDataFactory,
+            $this->groupResourceModel,
+            $this->dataObjectProcessor,
+            $this->searchResultsFactory,
+            $this->taxClassRepository,
+            $this->extensionAttributesJoinProcessor,
+            $this->collectionProcessorMock
+        );
+    }
+
+    private function setupGroupObjects()
     {
         $this->groupRegistry = $this->getMock(
             \Magento\Customer\Model\GroupRegistry::class,
@@ -127,48 +185,6 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $this->dataObjectProcessor = $this->getMock(
-            \Magento\Framework\Reflection\DataObjectProcessor::class,
-            [],
-            [],
-            '',
-            false
-        );
-        $this->searchResultsFactory = $this->getMock(
-            \Magento\Customer\Api\Data\GroupSearchResultsInterfaceFactory::class,
-            ['create'],
-            [],
-            '',
-            false
-        );
-        $this->searchResults = $this->getMockForAbstractClass(
-            \Magento\Customer\Api\Data\GroupSearchResultsInterface::class,
-            [],
-            '',
-            false
-        );
-        $this->taxClassRepository = $this->getMockForAbstractClass(
-            \Magento\Tax\Api\TaxClassRepositoryInterface::class,
-            [],
-            '',
-            false
-        );
-        $this->extensionAttributesJoinProcessor = $this->getMockForAbstractClass(
-            \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface::class,
-            [],
-            '',
-            false
-        );
-        $this->model = new \Magento\Customer\Model\ResourceModel\GroupRepository(
-            $this->groupRegistry,
-            $this->groupFactory,
-            $this->groupDataFactory,
-            $this->groupResourceModel,
-            $this->dataObjectProcessor,
-            $this->searchResultsFactory,
-            $this->taxClassRepository,
-            $this->extensionAttributesJoinProcessor
-        );
     }
 
     public function testSave()
@@ -351,10 +367,7 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
         $groupId = 86;
 
         $groupExtension = $this->getMock(\Magento\Customer\Api\Data\GroupExtensionInterface::class, [], [], '', false);
-        $filterGroup = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filter = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
         $collection = $this->getMock(\Magento\Customer\Model\ResourceModel\Group\Collection::class, [], [], '', false);
-        $sortOrder = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
         $searchCriteria = $this->getMockForAbstractClass(
             \Magento\Framework\Api\SearchCriteriaInterface::class,
             [],
@@ -385,48 +398,9 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
             ->with($collection, \Magento\Customer\Api\Data\GroupInterface::class);
         $collection->expects($this->once())
             ->method('addTaxClass');
-        $searchCriteria->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn([$filterGroup]);
-        $filterGroup->expects($this->once())
-            ->method('getFilters')
-            ->willReturn([$filter]);
-        $filter->expects($this->once())
-            ->method('getConditionType')
-            ->willReturn(false);
-        $filter->expects($this->once())
-            ->method('getField')
-            ->willReturn('Field');
-        $filter->expects($this->atLeastOnce())
-            ->method('getValue')
-            ->willReturn('Value');
-        $collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->with(['Field'], [['eq' => 'Value']]);
-        $searchCriteria->expects($this->atLeastOnce())
-            ->method('getSortOrders')
-            ->willReturn([$sortOrder]);
-        $sortOrder->expects($this->once())
-            ->method('getField')
-            ->willReturn('Field');
-        $collection->expects($this->once())
-            ->method('addOrder')
-            ->with('Field', 'ASC');
-        $sortOrder->expects($this->once())
-            ->method('getDirection')
-            ->willReturn(\Magento\Framework\Api\SortOrder::SORT_ASC);
-        $searchCriteria->expects($this->once())
-            ->method('getCurrentPage')
-            ->willReturn(1);
-        $collection->expects($this->once())
-            ->method('setCurPage')
-            ->with(1);
-        $searchCriteria->expects($this->once())
-            ->method('getPageSize')
-            ->willReturn(10);
-        $collection->expects($this->once())
-            ->method('setPageSize')
-            ->with(10);
+        $this->collectionProcessorMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteria, $collection);
         $collection->expects($this->once())
             ->method('getIterator')
             ->willReturn(new \ArrayIterator([$this->groupModel]));
@@ -489,142 +463,6 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->assertSame($searchResults, $this->model->getList($searchCriteria));
     }
 
-    /**
-     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
-     */
-    public function testGetListWithoutSortOrder()
-    {
-        $groupId = 86;
-
-        $groupExtension = $this->getMock(\Magento\Customer\Api\Data\GroupExtensionInterface::class, [], [], '', false);
-        $filterGroup = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filter = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
-        $collection = $this->getMock(\Magento\Customer\Model\ResourceModel\Group\Collection::class, [], [], '', false);
-        $searchCriteria = $this->getMockForAbstractClass(
-            \Magento\Framework\Api\SearchCriteriaInterface::class,
-            [],
-            '',
-            false
-        );
-        $searchResults = $this->getMockForAbstractClass(
-            \Magento\Customer\Api\Data\AddressSearchResultsInterface::class,
-            [],
-            '',
-            false
-        );
-        $this->searchResultsFactory->expects($this->once())
-            ->method('create')
-            ->willReturn($searchResults);
-        $searchResults->expects($this->once())
-            ->method('setSearchCriteria')
-            ->with($searchCriteria);
-
-        $this->groupFactory->expects($this->once())
-            ->method('create')
-            ->willReturn($this->groupModel);
-        $this->groupModel->expects($this->once())
-            ->method('getCollection')
-            ->willReturn($collection);
-        $this->extensionAttributesJoinProcessor->expects($this->once())
-            ->method('process')
-            ->with($collection, \Magento\Customer\Api\Data\GroupInterface::class);
-        $collection->expects($this->once())
-            ->method('addTaxClass');
-        $searchCriteria->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn([$filterGroup]);
-        $filterGroup->expects($this->once())
-            ->method('getFilters')
-            ->willReturn([$filter]);
-        $filter->expects($this->once())
-            ->method('getConditionType')
-            ->willReturn(false);
-        $filter->expects($this->once())
-            ->method('getField')
-            ->willReturn('Field');
-        $filter->expects($this->atLeastOnce())
-            ->method('getValue')
-            ->willReturn('Value');
-        $collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->with(['Field'], [['eq' => 'Value']]);
-
-        $searchCriteria->expects($this->once())
-            ->method('getCurrentPage')
-            ->willReturn(1);
-        $collection->expects($this->once())
-            ->method('setCurPage')
-            ->with(1);
-        $searchCriteria->expects($this->once())
-            ->method('getPageSize')
-            ->willReturn(10);
-        $collection->expects($this->once())
-            ->method('setPageSize')
-            ->with(10);
-        $collection->expects($this->once())
-            ->method('getIterator')
-            ->willReturn(new \ArrayIterator([$this->groupModel]));
-
-        $this->groupDataFactory->expects($this->once())
-            ->method('create')
-            ->willReturn($this->group);
-
-        $this->group->expects($this->once())
-            ->method('setId')
-            ->with($groupId)
-            ->willReturnSelf();
-        $this->group->expects($this->once())
-            ->method('setCode')
-            ->with('Code')
-            ->willReturnSelf();
-        $this->group->expects($this->once())
-            ->method('setTaxClassId')
-            ->with(234)
-            ->willReturnSelf();
-        $this->group->expects($this->once())
-            ->method('setTaxClassName')
-            ->with('Tax class name')
-            ->willReturnSelf();
-
-        $this->groupModel->expects($this->atLeastOnce())
-            ->method('getId')
-            ->willReturn($groupId);
-        $this->groupModel->expects($this->atLeastOnce())
-            ->method('getCode')
-            ->willReturn('Code');
-        $this->groupModel->expects($this->atLeastOnce())
-            ->method('getTaxClassId')
-            ->willReturn(234);
-        $this->groupModel->expects($this->atLeastOnce())
-            ->method('getTaxClassName')
-            ->willReturn('Tax class name');
-        $this->groupModel->expects($this->once())
-            ->method('getData')
-            ->willReturn([]);
-        $this->extensionAttributesJoinProcessor->expects($this->once())
-            ->method('extractExtensionAttributes')
-            ->with(\Magento\Customer\Api\Data\GroupInterface::class, [])
-            ->willReturn(['extension_attributes' => $groupExtension]);
-        $this->group->expects($this->once())
-            ->method('setExtensionAttributes')
-            ->with($groupExtension);
-        $collection->expects($this->once())
-            ->method('getSize')
-            ->willReturn(9);
-        $searchResults->expects($this->once())
-            ->method('setTotalCount')
-            ->with(9);
-        $searchResults->expects($this->once())
-            ->method('setItems')
-            ->with([$this->group])
-            ->willReturnSelf();
-        $collection->expects($this->once())
-            ->method('addOrder')
-            ->with('customer_group_id', 'ASC');
-
-        $this->assertSame($searchResults, $this->model->getList($searchCriteria));
-    }
-
     public function testDeleteById()
     {
         $groupId = 6;
diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml
index bb6577470ba54d8ca95c0c5a1a80a17564d822ee..d8f320161ab060b9cce690848fb00a402f030bb4 100644
--- a/app/code/Magento/Customer/etc/di.xml
+++ b/app/code/Magento/Customer/etc/di.xml
@@ -315,4 +315,49 @@
             <argument name="cache" xsi:type="object">Magento\Customer\Model\Cache\Type\Notification</argument>
         </arguments>
     </type>
+    <type name="Magento\Customer\Model\ResourceModel\CustomerRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor</argument>
+        </arguments>
+    </type>
+    <virtualType name="Magento\Customer\Model\Api\SearchCriteria\CollectionProcessor\GroupFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
+        <arguments>
+            <argument name="fieldMapping" xsi:type="array">
+                <item name="code" xsi:type="string">customer_group_code</item>
+                <item name="id" xsi:type="string">customer_group_id</item>
+                <item name="tax_class_name" xsi:type="string">class_name</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Customer\Model\Api\SearchCriteria\CollectionProcessor\GroupSortingProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor">
+        <arguments>
+            <argument name="fieldMapping" xsi:type="array">
+                <item name="code" xsi:type="string">customer_group_code</item>
+                <item name="id" xsi:type="string">customer_group_id</item>
+                <item name="tax_class_name" xsi:type="string">class_name</item>
+            </argument>
+            <argument name="defaultOrders" xsi:type="array">
+                <item name="id" xsi:type="string">ASC</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Customer\Model\Api\SearchCriteria\GroupCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="filters" xsi:type="object">Magento\Customer\Model\Api\SearchCriteria\CollectionProcessor\GroupFilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Customer\Model\Api\SearchCriteria\CollectionProcessor\GroupSortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <type name="Magento\Customer\Model\ResourceModel\GroupRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Customer\Model\Api\SearchCriteria\GroupCollectionProcessor</argument>
+        </arguments>
+    </type>
+    <type name="Magento\Customer\Model\ResourceModel\AddressRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor</argument>
+        </arguments>
+    </type>
 </config>
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml
index 29d0d546282b85eeeda0797fc04299e1d7f17641..70896e096af6c4f1005c4805922f5427d73e1ada 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/sales/order/create/address/form/renderer/vat.phtml
@@ -6,8 +6,8 @@
 
 // @codingStandardsIgnoreFile
 
-?>
-<?php
+/** @var \Magento\Customer\Block\Adminhtml\Sales\Order\Address\Form\Renderer\Vat $block */
+
 $_element = $block->getElement();
 $_note = $_element->getNote();
 $_class = $_element->getFieldsetHtmlClass();
@@ -19,11 +19,11 @@ $_validateButton = $block->getValidateButton();
     <div class="hidden"><?php echo $_element->getElementHtml(); ?></div>
     <?php else: ?>
     <?php echo $_element->getLabelHtml(); ?>
-    <div class="admin__field-control <?php /* @escapeNotVerified */ echo $_element->hasValueClass() ? $_element->getValueClass() : 'value'; ?><?php echo $_class ? " {$_class}-value" : ''; ?>">
+    <div class="admin__field-control <?php /* @noEscape */ echo $_element->hasValueClass() ? $block->escapeHtmlAttr($_element->getValueClass()) : 'value'; ?><?php echo $_class ? $block->escapeHtmlAttr($_class) . '-value' : ''; ?>">
         <?php echo $_element->getElementHtml(); ?>
         <?php if ($_note): ?>
-            <div class="admin__field-note<?php echo $_class ? " {$_class}-note" : ''; ?>" id="note_<?php /* @escapeNotVerified */ echo $_element->getId(); ?>">
-                <span><?php /* @escapeNotVerified */ echo $_note; ?></span>
+            <div class="admin__field-note<?php echo $_class ? " {$_class}-note" : ''; ?>" id="note_<?php echo $block->escapeHtmlAttr($_element->getId()); ?>">
+                <span><?php echo $block->escapeHtml($_note); ?></span>
             </div>
         <?php endif; ?>
         <div class="actions">
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
index 0e0e1d7a49a33a83263f0b0f638fe95006210c0c..be1e66d94b753a8cbfe1396c4042336c9b3ef56a 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
@@ -6,11 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
-?>
-<?php
-/**
- * @see \Magento\Customer\Block\Adminhtml\System\Config\Validatevat
- */
+/** @var \Magento\Customer\Block\Adminhtml\System\Config\Validatevat $block */
 ?>
 <script>
 require(['prototype'], function(){
@@ -20,11 +16,11 @@ require(['prototype'], function(){
         var validationMessage = $('validation_result');
 
         params = {
-            country: $('<?php /* @escapeNotVerified */ echo $block->getMerchantCountryField(); ?>').value,
-            vat: $('<?php /* @escapeNotVerified */ echo $block->getMerchantVatNumberField(); ?>').value
+            country: $('<?php echo $block->escapeJs($block->getMerchantCountryField()); ?>').value,
+            vat: $('<?php echo $block->escapeJs($block->getMerchantVatNumberField()); ?>').value
         };
 
-        new Ajax.Request('<?php /* @escapeNotVerified */ echo $block->getAjaxUrl() ?>', {
+        new Ajax.Request('<?php echo $block->escapeUrl($block->getAjaxUrl()) ?>', {
             parameters: params,
             onSuccess: function(response) {
                 var result = '<?php /* @escapeNotVerified */ echo __('Error during VAT Number verification.') ?>';
@@ -53,7 +49,7 @@ require(['prototype'], function(){
 </script>
 <div class="actions actions-validate-vat">
     <div id="validation_result" class="message-validation hidden"></div>
-    <button onclick="javascript:validateVat(); return false;" class="action-validate-vat" type="button" id="<?php echo $block->getHtmlId() ?>">
+    <button onclick="javascript:validateVat(); return false;" class="action-validate-vat" type="button" id="<?php echo $block->escapeHtmlAttr($block->getHtmlId()) ?>">
         <span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
     </button>
 </div>
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml
index af042211d417e461cf004291bdfebd872f5127ad..f8ca555c2ada6272e1823a0e1dd6c640759d3b01 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml
@@ -6,13 +6,13 @@
 
 // @codingStandardsIgnoreFile
 
+/* @var \Magento\Customer\Block\Adminhtml\Edit\Tab\Cart $block */
 ?>
-<?php /* @var $block \Magento\Customer\Block\Adminhtml\Edit\Tab\Cart */ ?>
 <?php if ($block->getCartHeader()): ?>
 <div class="content-header skip-header">
     <table>
         <tr>
-            <td style="width:50%;"><h4><?php /* @escapeNotVerified */ echo $block->getCartHeader(); ?></h4></td>
+            <td style="width:50%;"><h4><?php echo $block->escapeHtml($block->getCartHeader()); ?></h4></td>
         </tr>
     </table>
 </div>
@@ -29,19 +29,19 @@ require([
     "Magento_Catalog/catalog/product/composite/configure"
 ], function(alert, confirm){
 
-<?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>cartControl = {
+<?php echo $block->escapeJs($block->getJsObjectName()) ?>cartControl = {
     reload: function (params) {
         if (!params) {
             params = {};
         }
-        <?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.reloadParams = params;
-        <?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.reload();
-        <?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.reloadParams = {};
+        <?php echo $block->escapeJs($block->getJsObjectName()) ?>.reloadParams = params;
+        <?php echo $block->escapeJs($block->getJsObjectName()) ?>.reload();
+        <?php echo $block->escapeJs($block->getJsObjectName()) ?>.reloadParams = {};
     },
 
     configureItem: function (itemId) {
-        productConfigure.setOnLoadIFrameCallback('<?php /* @escapeNotVerified */ echo $listType ?>', this.cbOnLoadIframe.bind(this));
-        productConfigure.showItemConfiguration('<?php /* @escapeNotVerified */ echo $listType ?>', itemId);
+        productConfigure.setOnLoadIFrameCallback('<?php echo $block->escapeJs($listType) ?>', this.cbOnLoadIframe.bind(this));
+        productConfigure.showItemConfiguration('<?php echo $block->escapeJs($listType) ?>', itemId);
         return false;
     },
 
@@ -81,10 +81,10 @@ $params = [
 ];
 ?>
 productConfigure.addListType(
-    '<?php /* @escapeNotVerified */ echo $listType ?>',
+    '<?php echo $block->escapeJs($listType) ?>',
     {
-        urlFetch: '<?php /* @escapeNotVerified */ echo $block->getUrl('customer/cart_product_composite_cart/configure', $params) ?>',
-        urlConfirm: '<?php /* @escapeNotVerified */ echo $block->getUrl('customer/cart_product_composite_cart/update', $params) ?>'
+        urlFetch: '<?php echo $block->escapeUrl($block->getUrl('customer/cart_product_composite_cart/configure', $params)) ?>',
+        urlConfirm: '<?php echo $block->escapeUrl($block->getUrl('customer/cart_product_composite_cart/update', $params)) ?>'
     }
 );
 
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/view/personal_info.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/view/personal_info.phtml
index 8296584cc16b8e4b1fe76c15fcb7e5dfa65e122d..4b77d2582a72412640d03016dfc94cc477d5a871 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/tab/view/personal_info.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/view/personal_info.phtml
@@ -6,9 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
-/**
- * @var $block \Magento\Customer\Block\Adminhtml\Edit\Tab\View\PersonalInfo
- */
+/** @var \Magento\Customer\Block\Adminhtml\Edit\Tab\View\PersonalInfo $block */
 
 $lastLoginDateAdmin = $block->getLastLoginDate();
 $lastLoginDateStore = $block->getStoreLastLoginDate();
@@ -16,7 +14,6 @@ $lastLoginDateStore = $block->getStoreLastLoginDate();
 $createDateAdmin = $block->getCreateDate();
 $createDateStore = $block->getStoreCreateDate();
 ?>
-
 <div class="fieldset-wrapper customer-information">
     <div class="fieldset-wrapper-title">
         <span class="title"><?php /* @escapeNotVerified */ echo __('Personal Information') ?></span>
@@ -26,39 +23,39 @@ $createDateStore = $block->getStoreCreateDate();
         <?php echo $block->getChildHtml(); ?>
         <tr>
             <th><?php /* @escapeNotVerified */ echo __('Last Logged In:') ?></th>
-            <td><?php /* @escapeNotVerified */ echo $lastLoginDateAdmin ?> (<?php /* @escapeNotVerified */ echo $block->getCurrentStatus() ?>)</td>
+            <td><?php echo $block->escapeHtml($lastLoginDateAdmin) ?> (<?php echo $block->escapeHtml($block->getCurrentStatus()) ?>)</td>
         </tr>
         <?php if ($lastLoginDateAdmin != $lastLoginDateStore): ?>
         <tr>
             <th><?php /* @escapeNotVerified */ echo __('Last Logged In (%1):', $block->getStoreLastLoginDateTimezone()) ?></th>
-            <td><?php /* @escapeNotVerified */ echo $lastLoginDateStore ?> (<?php /* @escapeNotVerified */ echo $block->getCurrentStatus() ?>)</td>
+            <td><?php echo $block->escapeHtml($lastLoginDateStore) ?> (<?php echo $block->escapeHtml($block->getCurrentStatus()) ?>)</td>
         </tr>
         <?php endif; ?>
         <tr>
             <th><?php /* @escapeNotVerified */ echo __('Account Lock:') ?></th>
-            <td><?php /* @escapeNotVerified */ echo $block->getAccountLock() ?></td>
+            <td><?php echo $block->escapeHtml($block->getAccountLock()) ?></td>
         </tr>
         <tr>
             <th><?php /* @escapeNotVerified */ echo __('Confirmed email:') ?></th>
-            <td><?php /* @escapeNotVerified */ echo $block->getIsConfirmedStatus() ?></td>
+            <td><?php echo $block->escapeHtml($block->getIsConfirmedStatus()) ?></td>
         </tr>
         <tr>
             <th><?php /* @escapeNotVerified */ echo __('Account Created:') ?></th>
-            <td><?php /* @escapeNotVerified */ echo $createDateAdmin ?></td>
+            <td><?php echo $block->escapeHtml($createDateAdmin) ?></td>
         </tr>
         <?php if ($createDateAdmin != $createDateStore): ?>
             <tr>
                 <th><?php /* @escapeNotVerified */ echo __('Account Created on (%1):', $block->getStoreCreateDateTimezone()) ?></th>
-                <td><?php /* @escapeNotVerified */ echo $createDateStore ?></td>
+                <td><?php echo $block->escapeHtml($createDateStore) ?></td>
             </tr>
         <?php endif; ?>
         <tr>
             <th><?php /* @escapeNotVerified */ echo __('Account Created in:') ?></th>
-            <td><?php /* @escapeNotVerified */ echo $block->getCreatedInStore() ?></td>
+            <td><?php echo $block->escapeHtml($block->getCreatedInStore()) ?></td>
         </tr>
         <tr>
             <th><?php /* @escapeNotVerified */ echo __('Customer Group:') ?></th>
-            <td><?php /* @escapeNotVerified */ echo $block->getGroupName() ?></td>
+            <td><?php echo $block->escapeHtml($block->getGroupName()) ?></td>
         </tr>
         </tbody>
     </table>
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml
index 618839a8aa3e15a2fbb67b065508f51f765500a4..4aef50934a588521b2dddf5eb4db95773ad5f708 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/view/sales.phtml
@@ -6,9 +6,10 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Sales $block */
+
+$singleStoreMode = $block->isSingleStoreMode();
 ?>
-<?php /** @var $block \Magento\Customer\Block\Adminhtml\Edit\Tab\View\Sales */ ?>
-<?php $singleStoreMode = $block->isSingleStoreMode(); ?>
 <div class="entry-edit fieldset-wrapper">
 
     <div class="fieldset-wrapper-title">
@@ -31,8 +32,8 @@
         <tfoot>
         <tr>
             <td colspan="3"><strong><?php /* @escapeNotVerified */ echo __('All Store Views') ?></strong></td>
-            <td class="emph"><strong><?php /* @escapeNotVerified */ echo $block->formatCurrency($block->getTotals()->getBaseLifetime()) ?></strong></td>
-            <td class="emph last"><strong><?php /* @escapeNotVerified */ echo $block->formatCurrency($block->getTotals()->getAvgsale()) ?></strong></td>
+            <td class="emph"><strong><?php echo $block->escapeHtml($block->formatCurrency($block->getTotals()->getBaseLifetime())) ?></strong></td>
+            <td class="emph last"><strong><?php echo $block->escapeHtml($block->formatCurrency($block->getTotals()->getAvgsale())) ?></strong></td>
         </tr>
         </tfoot>
         <?php endif; ?>
@@ -46,24 +47,24 @@
                 <?php foreach ($_stores as $_row): ?>
                     <?php if (!$singleStoreMode): ?>
                         <?php if ($_row->getStoreId() == 0): ?>
-                        <td colspan="3"><?php /* @escapeNotVerified */ echo $_row->getStoreName() ?></td>
+                        <td colspan="3"><?php echo $block->escapeHtml($_row->getStoreName()) ?></td>
                             <?php else: ?>
                     <tr<?php echo($_i++ % 2 ? ' class="even"' : '') ?>>
                             <?php if (!$_websiteRow): ?>
-                                <td rowspan="<?php /* @escapeNotVerified */ echo $block->getWebsiteCount($_websiteId) ?>"><?php /* @escapeNotVerified */ echo $_row->getWebsiteName() ?></td>
+                                <td rowspan="<?php echo $block->escapeHtmlAttr($block->getWebsiteCount($_websiteId)) ?>"><?php echo $block->escapeHtml($_row->getWebsiteName()) ?></td>
                                 <?php $_websiteRow = true; ?>
                                 <?php endif; ?>
                             <?php if (!$_groupRow): ?>
-                                <td rowspan="<?php echo count($_stores) ?>"><?php /* @escapeNotVerified */ echo $_row->getGroupName() ?></td>
+                                <td rowspan="<?php echo count($_stores) ?>"><?php echo $block->escapeHtml($_row->getGroupName()) ?></td>
                                 <?php $_groupRow = true; ?>
                                 <?php endif; ?>
-                            <td><?php /* @escapeNotVerified */ echo $_row->getStoreName() ?></td>
+                            <td><?php echo $block->escapeHtml($_row->getStoreName()) ?></td>
                             <?php endif; ?>
                         <?php else: ?>
                     <tr>
                         <?php endif; ?>
-                    <td><?php /* @escapeNotVerified */ echo $block->formatCurrency($_row->getLifetime(), $_row->getWebsiteId()) ?></td>
-                    <td><?php /* @escapeNotVerified */ echo $block->formatCurrency($_row->getAvgsale(), $_row->getWebsiteId()) ?></td>
+                    <td><?php echo $block->escapeHtml($block->formatCurrency($_row->getLifetime(), $_row->getWebsiteId())) ?></td>
+                    <td><?php echo $block->escapeHtml($block->formatCurrency($_row->getAvgsale(), $_row->getWebsiteId())) ?></td>
                     </tr>
                     <?php endforeach; ?>
                 <?php endforeach; ?>
@@ -71,7 +72,7 @@
         </tbody>
         <?php else: ?>
         <tbody>
-        <tr class="hidden"><td colspan="<?php /* @escapeNotVerified */ echo !$singleStoreMode ? '5' : '2'; ?>"></td></tr>
+        <tr class="hidden"><td colspan="<?php /* @noEscape */ echo $singleStoreMode ? 2 : 5; ?>"></td></tr>
         </tbody>
         <?php endif; ?>
     </table>
diff --git a/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml b/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
index f7330686c54c15f48e7fd3175181ebba1bbc6d53..2b62b1f6fb7aaa02f5c108fc886b97b36230ddc0 100644
--- a/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
@@ -5,20 +5,21 @@
  */
 
 // @codingStandardsIgnoreFile
-/** @var $block \Magento\Customer\Block\Account\AuthenticationPopup */
+
+/** @var \Magento\Customer\Block\Account\AuthenticationPopup $block */
 ?>
 <div id="authenticationPopup" data-bind="scope:'authenticationPopup'" style="display: none;">
     <script>
-        window.authenticationPopup = <?php /* @escapeNotVerified */ echo \Zend_Json::encode($block->getConfig()); ?>;
+        window.authenticationPopup = <?php /* @noEscape */ echo \Zend_Json::encode($block->getConfig()); ?>;
     </script>
     <!-- ko template: getTemplate() --><!-- /ko -->
     <script type="text/x-magento-init">
         {
             "#authenticationPopup": {
-                "Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?>
+                "Magento_Ui/js/core/app": <?php /* @noEscape */ echo $block->getJsLayout();?>
             },
             "*": {
-                "Magento_Ui/js/block-loader": "<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>"
+                "Magento_Ui/js/block-loader": "<?php echo $block->escapeUrl($block->getViewFileUrl('images/loader-1.gif')); ?>"
             }
         }
     </script>
diff --git a/app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml
index 7bfd6c2b9b98e886208f5604b98a23f957424454..ed6f2a835cf0ac63b9cb49eee81b532e15ee37c0 100644
--- a/app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/address.phtml
@@ -11,7 +11,7 @@
 <div class="block block-dashboard-addresses">
     <div class="block-title">
         <strong><?php /* @escapeNotVerified */ echo __('Address Book') ?></strong>
-        <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getAddressBookUrl() ?>"><span><?php /* @escapeNotVerified */ echo __('Manage Addresses') ?></span></a>
+        <a class="action edit" href="<?php echo $block->escapeUrl($block->getAddressBookUrl()) ?>"><span><?php /* @escapeNotVerified */ echo __('Manage Addresses') ?></span></a>
     </div>
     <div class="block-content">
         <div class="box box-billing-address">
@@ -24,7 +24,7 @@
                 </address>
             </div>
             <div class="box-actions">
-                <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getPrimaryBillingAddressEditUrl() ?>" data-ui-id="default-billing-edit-link"><span><?php /* @escapeNotVerified */ echo __('Edit Address') ?></span></a>
+                <a class="action edit" href="<?php echo $block->escapeUrl($block->getPrimaryBillingAddressEditUrl()) ?>" data-ui-id="default-billing-edit-link"><span><?php /* @escapeNotVerified */ echo __('Edit Address') ?></span></a>
             </div>
         </div>
         <div class="box box-shipping-address">
@@ -37,7 +37,7 @@
                 </address>
             </div>
             <div class="box-actions">
-                <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getPrimaryShippingAddressEditUrl() ?>" data-ui-id="default-shipping-edit-link"><span><?php /* @escapeNotVerified */ echo __('Edit Address') ?></span></a>
+                <a class="action edit" href="<?php echo $block->escapeUrl($block->getPrimaryShippingAddressEditUrl()) ?>" data-ui-id="default-shipping-edit-link"><span><?php /* @escapeNotVerified */ echo __('Edit Address') ?></span></a>
             </div>
         </div>
     </div>
diff --git a/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml
index f4f3a5174041d1bae08ba7762bf80e9f4e0c6cb3..7eb24b1ffe85b6b9ca9c8ff8663125ff10f06064 100644
--- a/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml
@@ -22,10 +22,10 @@
                 </p>
             </div>
             <div class="box-actions">
-                <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getUrl('customer/account/edit') ?>">
+                <a class="action edit" href="<?php echo $block->escapeUrl($block->getUrl('customer/account/edit')) ?>">
                     <span><?php /* @escapeNotVerified */ echo __('Edit') ?></span>
                 </a>
-                <a href="<?php /* @escapeNotVerified */ echo $block->getChangePasswordUrl() ?>" class="action change-password">
+                <a href="<?php echo $block->escapeUrl($block->getChangePasswordUrl()) ?>" class="action change-password">
                     <?php /* @escapeNotVerified */ echo __('Change Password') ?>
                 </a>
             </div>
@@ -47,7 +47,7 @@
                     <?php echo $block->getChildHtml('customer.account.dashboard.info.extra')?>
                 </div>
                 <div class="box-actions">
-                    <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getUrl('newsletter/manage') ?>"><span><?php /* @escapeNotVerified */ echo __('Edit') ?></span></a>
+                    <a class="action edit" href="<?php echo $block->escapeUrl($block->getUrl('newsletter/manage')) ?>"><span><?php /* @escapeNotVerified */ echo __('Edit') ?></span></a>
                 </div>
             </div>
         <?php endif; ?>
diff --git a/app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml b/app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml
index edd44e34a02b926c9e17c22d21de804b313f89a4..a6962c20717ccc6e4d1e22c23f1234a674e8372c 100644
--- a/app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml
@@ -6,14 +6,15 @@
 
 // @codingStandardsIgnoreFile
 
-/** @var $block \Magento\Customer\Block\Account\AuthorizationLink */
+/** @var \Magento\Customer\Block\Account\AuthorizationLink $block */
+
 $dataPostParam = '';
 if ($block->isLoggedIn()) {
     $dataPostParam = sprintf(" data-post='%s'", $block->getPostParams());
 }
 ?>
 <li class="authorization-link" data-label="<?php echo $block->escapeHtml(__('or')); ?>">
-    <a <?php /* @escapeNotVerified */ echo $block->getLinkAttributes(); ?><?php /* @escapeNotVerified */ echo $dataPostParam; ?>>
+    <a <?php /* @noEscape */ echo $block->getLinkAttributes(); ?><?php /* @noEscape */ echo $dataPostParam; ?>>
         <?php echo $block->escapeHtml($block->getLabel()); ?>
     </a>
 </li>
diff --git a/app/code/Magento/Customer/view/frontend/templates/address/book.phtml b/app/code/Magento/Customer/view/frontend/templates/address/book.phtml
index d2ba98781c34c61a3aa74b26a64f5cd5eb1a1f16..a642f8b5293dc2ce81e2ca0c77c602dee878596a 100644
--- a/app/code/Magento/Customer/view/frontend/templates/address/book.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/address/book.phtml
@@ -6,12 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
-?>
-<?php
-/**
- * Temlate for \Magento\Customer\Block\Address\Book block
- * @var $block \Magento\Customer\Block\Address\Book
- */
+/** @var \Magento\Customer\Block\Address\Book $block */
 ?>
 <div class="block block-addresses-default">
     <div class="block-title"><strong><?php /* @escapeNotVerified */ echo __('Default Addresses') ?></strong></div>
@@ -27,7 +22,7 @@
                     </address>
                 </div>
                 <div class="box-actions">
-                    <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getAddressEditUrl($_pAddsses) ?>">
+                    <a class="action edit" href="<?php echo $block->escapeUrl($block->getAddressEditUrl($_pAddsses)) ?>">
                         <span><?php /* @escapeNotVerified */ echo __('Change Billing Address') ?></span>
                     </a>
                 </div>
@@ -52,7 +47,7 @@
                     </address>
                 </div>
                 <div class="box-actions">
-                    <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getAddressEditUrl($_pAddsses) ?>">
+                    <a class="action edit" href="<?php echo $block->escapeUrl($block->getAddressEditUrl($_pAddsses)) ?>">
                         <span><?php /* @escapeNotVerified */ echo __('Change Shipping Address') ?></span>
                     </a>
                 </div>
@@ -79,8 +74,8 @@
                             <?php echo $block->getAddressHtml($_address) ?><br />
                         </address>
                         <div class="item actions">
-                            <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getUrl('customer/address/edit', ['id' => $_address->getId()]) ?>"><span><?php /* @escapeNotVerified */ echo __('Edit Address') ?></span></a>
-                            <a class="action delete" href="#" role="delete-address" data-address="<?php /* @escapeNotVerified */ echo $_address->getId() ?>"><span><?php /* @escapeNotVerified */ echo __('Delete Address') ?></span></a>
+                            <a class="action edit" href="<?php echo $block->escapeUrl($block->getUrl('customer/address/edit', ['id' => $_address->getId()])) ?>"><span><?php /* @escapeNotVerified */ echo __('Edit Address') ?></span></a>
+                            <a class="action delete" href="#" role="delete-address" data-address="<?php echo $block->escapeHtmlAttr($_address->getId()) ?>"><span><?php /* @escapeNotVerified */ echo __('Delete Address') ?></span></a>
                         </div>
                     </li>
                 <?php endforeach; ?>
@@ -104,9 +99,9 @@
         ".page-main": {
             "address": {
                 "deleteAddress": "li.item a[role='delete-address']",
-                "deleteUrlPrefix": "<?php /* @escapeNotVerified */ echo $block->getDeleteUrl() ?>id/",
+                "deleteUrlPrefix": "<?php echo $block->escapeUrl($block->getDeleteUrl()) ?>id/",
                 "addAddress": "button[role='add-address']",
-                "addAddressLocation": "<?php /* @escapeNotVerified */ echo $block->getAddAddressUrl() ?>"
+                "addAddressLocation": "<?php echo $block->escapeUrl($block->getAddAddressUrl()) ?>"
             }
         }
     }
diff --git a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml
index ab0c209971bb11b706501036291ff1e21ff02fce..f9bdeba5036eee969b78c3a55b14458d7099f3ea 100644
--- a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml
@@ -6,16 +6,10 @@
 
 // @codingStandardsIgnoreFile
 
-?>
-<?php
-/**
- * Edit customer address template
- *
- * @var $block \Magento\Customer\Block\Address\Edit
- */
+/** @var \Magento\Customer\Block\Address\Edit $block */
 ?>
 <form class="form-address-edit"
-      action="<?php /* @escapeNotVerified */ echo $block->getSaveUrl() ?>"
+      action="<?php echo $block->escapeUrl($block->getSaveUrl()) ?>"
       method="post"
       id="form-validate"
       enctype="multipart/form-data"
@@ -23,8 +17,8 @@
     <fieldset class="fieldset">
         <legend class="legend"><span><?php /* @escapeNotVerified */ echo __('Contact Information') ?></span></legend><br>
         <?php echo $block->getBlockHtml('formkey')?>
-        <input type="hidden" name="success_url" value="<?php /* @escapeNotVerified */ echo $block->getSuccessUrl() ?>">
-        <input type="hidden" name="error_url" value="<?php /* @escapeNotVerified */ echo $block->getErrorUrl() ?>">
+        <input type="hidden" name="success_url" value="<?php echo $block->escapeUrl($block->getSuccessUrl()) ?>">
+        <input type="hidden" name="error_url" value="<?php echo $block->escapeUrl($block->getErrorUrl()) ?>">
         <?php echo $block->getNameBlockHtml() ?>
         <div class="field company">
             <label class="label" for="company"><span><?php /* @escapeNotVerified */ echo __('Company') ?></span></label>
@@ -33,8 +27,8 @@
                        name="company"
                        id="company"
                        title="<?php /* @escapeNotVerified */ echo __('Company') ?>"
-                       value="<?php echo $block->escapeHtml($block->getAddress()->getCompany()) ?>"
-                       class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>">
+                       value="<?php echo $block->escapeHtmlAttr($block->getAddress()->getCompany()) ?>"
+                       class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company')) ?>">
             </div>
         </div>
         <div class="field telephone required">
@@ -44,9 +38,9 @@
             <div class="control">
                 <input type="text"
                        name="telephone"
-                       value="<?php echo $block->escapeHtml($block->getAddress()->getTelephone()) ?>"
+                       value="<?php echo $block->escapeHtmlAttr($block->getAddress()->getTelephone()) ?>"
                        title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>"
-                       class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>"
+                       class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone')) ?>"
                        id="telephone">
             </div>
         </div>
@@ -57,8 +51,8 @@
                        name="fax"
                        id="fax"
                        title="<?php /* @escapeNotVerified */ echo __('Fax') ?>"
-                       value="<?php echo $block->escapeHtml($block->getAddress()->getFax()) ?>"
-                       class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax') ?>">
+                       value="<?php echo $block->escapeHtmlAttr($block->getAddress()->getFax()) ?>"
+                       class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('fax')) ?>">
             </div>
         </div>
     </fieldset>
@@ -72,23 +66,23 @@
             <div class="control">
                 <input type="text"
                        name="street[]"
-                       value="<?php echo $block->escapeHtml($block->getStreetLine(1)) ?>"
+                       value="<?php echo $block->escapeHtmlAttr($block->getStreetLine(1)) ?>"
                        title="<?php /* @escapeNotVerified */ echo __('Street Address') ?>"
                        id="street_1"
-                       class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>"/>
+                       class="input-text <?php echo $block->escapeHtmlAttr($_streetValidationClass) ?>"/>
                 <div class="nested">
                     <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
                     <?php for ($_i = 1, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i < $_n; $_i++): ?>
                         <div class="field additional">
-                            <label class="label" for="street_<?php /* @escapeNotVerified */ echo $_i + 1 ?>">
+                            <label class="label" for="street_<?php /* @noEscape */ echo $_i + 1 ?>">
                                 <span><?php /* @escapeNotVerified */ echo __('Street Address %1', $_i + 1) ?></span>
                             </label>
                             <div class="control">
                                 <input type="text" name="street[]"
-                                       value="<?php echo $block->escapeHtml($block->getStreetLine($_i + 1)) ?>"
+                                       value="<?php echo $block->escapeHtmlAttr($block->getStreetLine($_i + 1)) ?>"
                                        title="<?php /* @escapeNotVerified */ echo __('Street Address %1', $_i + 1) ?>"
-                                       id="street_<?php /* @escapeNotVerified */ echo $_i + 1 ?>"
-                                       class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
+                                       id="street_<?php /* @noEscape */ echo $_i + 1 ?>"
+                                       class="input-text <?php echo $block->escapeHtmlAttr($_streetValidationClass) ?>">
                             </div>
                         </div>
                     <?php endfor; ?>
@@ -104,9 +98,9 @@
                 <div class="control">
                     <input type="text"
                            name="vat_id"
-                           value="<?php echo $block->escapeHtml($block->getAddress()->getVatId()) ?>"
+                           value="<?php echo $block->escapeHtmlAttr($block->getAddress()->getVatId()) ?>"
                            title="<?php /* @escapeNotVerified */ echo __('VAT Number') ?>"
-                           class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id') ?>"
+                           class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id')) ?>"
                            id="vat_id">
                 </div>
             </div>
@@ -116,9 +110,9 @@
             <div class="control">
                 <input type="text"
                        name="city"
-                       value="<?php echo $block->escapeHtml($block->getAddress()->getCity()) ?>"
+                       value="<?php echo $block->escapeHtmlAttr($block->getAddress()->getCity()) ?>"
                        title="<?php /* @escapeNotVerified */ echo __('City') ?>"
-                       class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>"
+                       class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city')) ?>"
                        id="city">
             </div>
         </div>
@@ -129,15 +123,15 @@
             <div class="control">
                 <select id="region_id" name="region_id"
                         title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>"
-                        class="validate-select" <?php echo (!$block->getConfig('general/region/display_all')) ? ' disabled="disabled"' : ''; ?>>
+                        class="validate-select" <?php /* @noEscape */ echo !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : ''; ?>>
                     <option value=""><?php /* @escapeNotVerified */ echo __('Please select a region, state or province.') ?></option>
                 </select>
                 <input type="text"
                        id="region"
                        name="region"
-                       value="<?php echo $block->escapeHtml($block->getRegion()) ?>"
+                       value="<?php echo $block->escapeHtmlAttr($block->getRegion()) ?>"
                        title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>"
-                       class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>"<?php echo (!$block->getConfig('general/region/display_all')) ? ' disabled="disabled"' : ''; ?>/>
+                       class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region')) ?>"<?php echo !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : ''; ?>/>
             </div>
         </div>
         <div class="field zip required">
@@ -147,10 +141,10 @@
             <div class="control">
                 <input type="text"
                        name="postcode"
-                       value="<?php echo $block->escapeHtml($block->getAddress()->getPostcode()) ?>"
+                       value="<?php echo $block->escapeHtmlAttr($block->getAddress()->getPostcode()) ?>"
                        title="<?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?>"
                        id="zip"
-                       class="input-text validate-zip-international <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>">
+                       class="input-text validate-zip-international <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode')) ?>">
             </div>
         </div>
         <div class="field country required">
@@ -213,14 +207,14 @@
         },
         "#country": {
             "regionUpdater": {
-                "optionalRegionAllowed": <?php /* @escapeNotVerified */ echo($block->getConfig('general/region/display_all') ? 'true' : 'false'); ?>,
+                "optionalRegionAllowed": <?php /* @noEscape */ echo $block->getConfig('general/region/display_all') ? 'true' : 'false'; ?>,
                 "regionListId": "#region_id",
                 "regionInputId": "#region",
                 "postcodeId": "#zip",
                 "form": "#form-validate",
-                "regionJson": <?php /* @escapeNotVerified */ echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>,
-                "defaultRegion": "<?php /* @escapeNotVerified */ echo $block->getRegionId() ?>",
-                "countriesWithOptionalZip": <?php /* @escapeNotVerified */ echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?>
+                "regionJson": <?php /* @noEscape */ echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>,
+                "defaultRegion": "<?php echo $block->escapeJs($block->getRegionId()) ?>",
+                "countriesWithOptionalZip": <?php /* @noEscape */ echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?>
             }
         }
     }
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml b/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml
index f7775ec3f140bc0268741a8928a7cfe789064785..2dfcd7f5dd43f3ea43616968d5cff44fd664788b 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/confirmation.phtml
@@ -6,6 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Framework\View\Element\Template $block */
 ?>
 <form action="" method="post" id="form-validate" class="form send confirmation" data-mage-init='{"validation":{}}'>
     <fieldset class="fieldset" data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>">
@@ -13,7 +14,7 @@
         <div class="field email required">
             <label for="email_address" class="label"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
             <div class="control">
-                <input type="email" name="email" id="email_address" class="input-text" value="<?php echo $block->escapeHtml($block->getEmail()) ?>" data-validate="{required:true, 'validate-email':true}">
+                <input type="email" name="email" id="email_address" class="input-text" value="<?php echo $block->escapeHtmlAttr($block->getEmail()) ?>" data-validate="{required:true, 'validate-email':true}">
             </div>
         </div>
     </fieldset>
@@ -22,7 +23,7 @@
             <button type="submit" class="action send primary"><span><?php /* @escapeNotVerified */ echo __('Send confirmation link') ?></span></button>
         </div>
         <div class="secondary">
-            <a href="<?php /* @escapeNotVerified */ echo $block->getLoginUrl() ?>" class="action back"><span><?php /* @escapeNotVerified */ echo __('Back to Sign In') ?></span></a>
+            <a href="<?php echo $block->escapeUrl($block->getLoginUrl()) ?>" class="action back"><span><?php /* @escapeNotVerified */ echo __('Back to Sign In') ?></span></a>
         </div>
     </div>
 </form>
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml
index 669cba366f2651d98b009e04baa76f0c8785f3e2..89219df0e78e372d0d229837e9cd273e53bd106a 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml
@@ -8,7 +8,7 @@
 
 /** @var \Magento\Customer\Block\Form\Edit $block */
 ?>
-<form class="form form-edit-account" action="<?php /* @escapeNotVerified */ echo $block->getUrl('customer/account/editPost') ?>" method="post" id="form-validate" enctype="multipart/form-data" data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>" autocomplete="off">
+<form class="form form-edit-account" action="<?php echo $block->escapeUrl($block->getUrl('customer/account/editPost')) ?>" method="post" id="form-validate" enctype="multipart/form-data" data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>" autocomplete="off">
     <fieldset class="fieldset info">
         <?php echo $block->getBlockHtml('formkey')?>
         <legend class="legend"><span><?php /* @escapeNotVerified */ echo __('Account Information') ?></span></legend><br>
@@ -41,7 +41,7 @@
         <div class="field email required" data-container="change-email">
             <label class="label" for="email"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
             <div class="control">
-                <input type="email" name="email" id="email" autocomplete="email" data-input="change-email" value="<?php echo $block->escapeHtml($block->getCustomer()->getEmail()) ?>" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}" />
+                <input type="email" name="email" id="email" autocomplete="email" data-input="change-email" value="<?php echo $block->escapeHtmlAttr($block->getCustomer()->getEmail()) ?>" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}" />
             </div>
         </div>
         <div class="field password current required">
@@ -94,7 +94,7 @@
         "mage/mage"
     ], function($){
         var dataForm = $('#form-validate');
-        var ignore = <?php /* @escapeNotVerified */ echo $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null'; ?>;
+        var ignore = <?php /* @noEscape */ echo $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null'; ?>;
         
         dataForm.mage('validation', {
         <?php if ($_dob->isEnabled()): ?>
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml
index 0b91f6db8ccbd935d0407158963f4303866c9c3c..f7f1ac86007a061c7c66049eafe206d1d9231e19 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml
@@ -8,9 +8,10 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Customer\Block\Account\Forgotpassword $block */
 ?>
 <form class="form password forget"
-      action="<?php /* @escapeNotVerified */ echo $block->getUrl('*/*/forgotpasswordpost') ?>"
+      action="<?php echo $block->escapeUrl($block->getUrl('*/*/forgotpasswordpost')) ?>"
       method="post"
       id="form-validate"
       data-mage-init='{"validation":{}}'>
@@ -19,7 +20,7 @@
         <div class="field email required">
             <label for="email_address" class="label"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
             <div class="control">
-                <input type="email" name="email" alt="email" id="email_address" class="input-text" value="<?php echo $block->escapeHtml($block->getEmailValue()) ?>" data-validate="{required:true, 'validate-email':true}">
+                <input type="email" name="email" alt="email" id="email_address" class="input-text" value="<?php echo $block->escapeHtmlAttr($block->getEmailValue()) ?>" data-validate="{required:true, 'validate-email':true}">
             </div>
         </div>
         <?php echo $block->getChildHtml('form_additional_info'); ?>
@@ -29,7 +30,7 @@
             <button type="submit" class="action submit primary"><span><?php /* @escapeNotVerified */ echo __('Reset My Password') ?></span></button>
         </div>
         <div class="secondary">
-            <a class="action back" href="<?php /* @escapeNotVerified */ echo $block->getLoginUrl() ?>"><span><?php /* @escapeNotVerified */ echo __('Go back') ?></span></a>
+            <a class="action back" href="<?php echo $block->escapeUrl($block->getLoginUrl()) ?>"><span><?php /* @escapeNotVerified */ echo __('Go back') ?></span></a>
         </div>
     </div>
 </form>
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/login.phtml b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml
index f746af89c669937bb3b15549370daf9428b00c6a..77335cdff76f900a14e38bedb4d7102f42b54ebb 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/login.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/login.phtml
@@ -8,21 +8,13 @@
 
 /** @var \Magento\Customer\Block\Form\Login $block */
 ?>
-<?php
-/**
- * Customer login form template
- *
- * @see \Magento\Customer\Block\Form\Login
- * @var $block \Magento\Customer\Block\Form\Login
- */
-?>
 <div class="block block-customer-login">
     <div class="block-title">
         <strong id="block-customer-login-heading" role="heading" aria-level="2"><?php /* @escapeNotVerified */ echo __('Registered Customers') ?></strong>
     </div>
     <div class="block-content" aria-labelledby="block-customer-login-heading">
         <form class="form form-login"
-              action="<?php /* @escapeNotVerified */ echo $block->getPostActionUrl() ?>"
+              action="<?php echo $block->escapeUrl($block->getPostActionUrl()) ?>"
               method="post"
               id="login-form"
               data-mage-init='{"validation":{}}'>
@@ -32,19 +24,19 @@
                 <div class="field email required">
                     <label class="label" for="email"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
                     <div class="control">
-                        <input name="login[username]" value="<?php echo $block->escapeHtml($block->getUsername()) ?>" <?php if ($block->isAutocompleteDisabled()) :?> autocomplete="off"<?php endif; ?> id="email" type="email" class="input-text" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" data-validate="{required:true, 'validate-email':true}">
+                        <input name="login[username]" value="<?php echo $block->escapeHtmlAttr($block->getUsername()) ?>" <?php if ($block->isAutocompleteDisabled()): ?> autocomplete="off"<?php endif; ?> id="email" type="email" class="input-text" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" data-validate="{required:true, 'validate-email':true}">
                     </div>
                 </div>
                 <div class="field password required">
                     <label for="pass" class="label"><span><?php /* @escapeNotVerified */ echo __('Password') ?></span></label>
                     <div class="control">
-                        <input name="login[password]" type="password" <?php if ($block->isAutocompleteDisabled()) :?> autocomplete="off"<?php endif; ?> class="input-text" id="pass" title="<?php /* @escapeNotVerified */ echo __('Password') ?>" data-validate="{required:true}">
+                        <input name="login[password]" type="password" <?php if ($block->isAutocompleteDisabled()): ?> autocomplete="off"<?php endif; ?> class="input-text" id="pass" title="<?php /* @escapeNotVerified */ echo __('Password') ?>" data-validate="{required:true}">
                     </div>
                 </div>
                 <?php echo $block->getChildHtml('form_additional_info'); ?>
                 <div class="actions-toolbar">
                     <div class="primary"><button type="submit" class="action login primary" name="send" id="send2"><span><?php /* @escapeNotVerified */ echo __('Sign In') ?></span></button></div>
-                    <div class="secondary"><a class="action remind" href="<?php /* @escapeNotVerified */ echo $block->getForgotPasswordUrl() ?>"><span><?php /* @escapeNotVerified */ echo __('Forgot Your Password?') ?></span></a></div>
+                    <div class="secondary"><a class="action remind" href="<?php echo $block->escapeUrl($block->getForgotPasswordUrl()) ?>"><span><?php /* @escapeNotVerified */ echo __('Forgot Your Password?') ?></span></a></div>
                 </div>
             </fieldset>
         </form>
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml b/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml
index c8a77322bcd156ca484cd0c43e63f33b105dd4a1..51d975fc474fbad111c4e011b77c4fc708a456b2 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/newsletter.phtml
@@ -6,9 +6,10 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Customer\Block\Newsletter $block */
 ?>
 <?php echo $block->getChildHtml('form_before')?>
-    <form class="form form-newsletter-manage" action="<?php /* @escapeNotVerified */ echo $block->getAction() ?>" method="post" id="form-validate">
+    <form class="form form-newsletter-manage" action="<?php echo $block->escapeUrl($block->getAction()) ?>" method="post" id="form-validate">
         <fieldset class="fieldset">
             <?php echo $block->getBlockHtml('formkey')?>
             <legend class="legend"><span><?php /* @escapeNotVerified */ echo __('Subscription option') ?></span></legend><br>
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
index 264a3acefd94807c3ee66f48988596a2d597ec7a..b35727b26fbd67b3882fa722a927412746e5729a 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
@@ -6,22 +6,16 @@
 
 // @codingStandardsIgnoreFile
 
-?>
-<?php
-/**
- * Create account form template
- *
- * @var $block \Magento\Customer\Block\Form\Register
- */
+/** @var \Magento\Customer\Block\Form\Register $block */
 ?>
 <?php echo $block->getChildHtml('form_fields_before')?>
 <?php /* Extensions placeholder */ ?>
 <?php echo $block->getChildHtml('customer.form.register.extra')?>
-<form class="form create account form-create-account" action="<?php /* @escapeNotVerified */ echo $block->getPostActionUrl() ?>" method="post" id="form-validate" enctype="multipart/form-data" autocomplete="off">
+<form class="form create account form-create-account" action="<?php echo $block->escapeUrl($block->getPostActionUrl()) ?>" method="post" id="form-validate" enctype="multipart/form-data" autocomplete="off">
     <fieldset class="fieldset create info">
         <legend class="legend"><span><?php /* @escapeNotVerified */ echo __('Personal Information') ?></span></legend><br>
-        <input type="hidden" name="success_url" value="<?php /* @escapeNotVerified */ echo $block->getSuccessUrl() ?>">
-        <input type="hidden" name="error_url" value="<?php /* @escapeNotVerified */ echo $block->getErrorUrl() ?>">
+        <input type="hidden" name="success_url" value="<?php echo $block->escapeUrl($block->getSuccessUrl()) ?>">
+        <input type="hidden" name="error_url" value="<?php echo $block->escapeUrl($block->getErrorUrl()) ?>">
         <?php echo $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($block->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
         <?php if ($block->isNewsletterEnabled()): ?>
             <div class="field choice newsletter">
@@ -54,13 +48,13 @@
             <div class="field company">
                 <label for="company" class="label"><span><?php /* @escapeNotVerified */ echo __('Company') ?></span></label>
                 <div class="control">
-                    <input type="text" name="company" id="company" value="<?php echo $block->escapeHtml($block->getFormData()->getCompany()) ?>" title="<?php /* @escapeNotVerified */ echo __('Company') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company') ?>">
+                    <input type="text" name="company" id="company" value="<?php echo $block->escapeHtmlAttr($block->getFormData()->getCompany()) ?>" title="<?php /* @escapeNotVerified */ echo __('Company') ?>" class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('company')) ?>">
                 </div>
             </div>
             <div class="field telephone">
                 <label for="telephone" class="label"><span><?php /* @escapeNotVerified */ echo __('Phone Number') ?></span></label>
                 <div class="control">
-                    <input type="text" name="telephone" id="telephone" value="<?php echo $block->escapeHtml($block->getFormData()->getTelephone()) ?>" title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone') ?>">
+                    <input type="text" name="telephone" id="telephone" value="<?php echo $block->escapeHtmlAttr($block->getFormData()->getTelephone()) ?>" title="<?php /* @escapeNotVerified */ echo __('Phone Number') ?>" class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('telephone')) ?>">
                 </div>
             </div>
 
@@ -69,16 +63,16 @@
             <div class="field street required">
                 <label for="street_1" class="label"><span><?php /* @escapeNotVerified */ echo __('Street Address') ?></span></label>
                 <div class="control">
-                    <input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreet(0)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address') ?>" id="street_1" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
+                    <input type="text" name="street[]" value="<?php echo $block->escapeHtmlAttr($block->getFormData()->getStreet(0)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address') ?>" id="street_1" class="input-text <?php echo $block->escapeHtmlAttr($_streetValidationClass) ?>">
                     <div class="nested">
                         <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
                         <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?>
                             <div class="field additional">
-                                <label class="label" for="street_<?php /* @escapeNotVerified */ echo $_i ?>">
+                                <label class="label" for="street_<?php /* @noEscape */ echo $_i ?>">
                                     <span><?php /* @escapeNotVerified */ echo __('Address') ?></span>
                                 </label>
                                 <div class="control">
-                                    <input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreetLine($_i - 1)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address %1', $_i) ?>" id="street_<?php /* @escapeNotVerified */ echo $_i ?>" class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
+                                    <input type="text" name="street[]" value="<?php echo $block->escapeHtml($block->getFormData()->getStreetLine($_i - 1)) ?>" title="<?php /* @escapeNotVerified */ echo __('Street Address %1', $_i) ?>" id="street_<?php /* @noEscape */ echo $_i ?>" class="input-text <?php echo $block->escapeHtmlAttr($_streetValidationClass) ?>">
                                 </div>
                             </div>
                         <?php endfor; ?>
@@ -89,7 +83,7 @@
             <div class="field required">
                 <label for="city" class="label"><span><?php /* @escapeNotVerified */ echo __('City') ?></span></label>
                 <div class="control">
-                    <input type="text" name="city" value="<?php echo $block->escapeHtml($block->getFormData()->getCity()) ?>" title="<?php /* @escapeNotVerified */ echo __('City') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city') ?>" id="city">
+                    <input type="text" name="city" value="<?php echo $block->escapeHtmlAttr($block->getFormData()->getCity()) ?>" title="<?php /* @escapeNotVerified */ echo __('City') ?>" class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city')) ?>" id="city">
                 </div>
             </div>
 
@@ -99,14 +93,14 @@
                     <select id="region_id" name="region_id" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="validate-select" style="display:none;">
                         <option value=""><?php /* @escapeNotVerified */ echo __('Please select a region, state or province.') ?></option>
                     </select>
-                    <input type="text" id="region" name="region" value="<?php echo $block->escapeHtml($block->getRegion()) ?>" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region') ?>" style="display:none;">
+                    <input type="text" id="region" name="region" value="<?php echo $block->escapeHtml($block->getRegion()) ?>" title="<?php /* @escapeNotVerified */ echo __('State/Province') ?>" class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region')) ?>" style="display:none;">
                 </div>
             </div>
 
             <div class="field zip required">
                 <label for="zip" class="label"><span><?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?></span></label>
                 <div class="control">
-                    <input type="text" name="postcode" value="<?php echo $block->escapeHtml($block->getFormData()->getPostcode()) ?>" title="<?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>">
+                    <input type="text" name="postcode" value="<?php echo $block->escapeHtmlAttr($block->getFormData()->getPostcode()) ?>" title="<?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode')) ?>">
                 </div>
             </div>
 
@@ -133,7 +127,7 @@
         <div class="field required">
             <label for="email_address" class="label"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
             <div class="control">
-                <input type="email" name="email" autocomplete="email" id="email_address" value="<?php echo $block->escapeHtml($block->getFormData()->getEmail()) ?>" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}">
+                <input type="email" name="email" autocomplete="email" id="email_address" value="<?php echo $block->escapeHtmlAttr($block->getFormData()->getEmail()) ?>" title="<?php /* @escapeNotVerified */ echo __('Email') ?>" class="input-text" data-validate="{required:true, 'validate-email':true}">
             </div>
         </div>
         <div class="field password required" data-mage-init='{"passwordStrengthIndicator": {}}'>
@@ -142,8 +136,8 @@
                 <input type="password" name="password" id="password"
                        title="<?php /* @escapeNotVerified */ echo __('Password') ?>"
                        class="input-text"
-                       data-password-min-length="<?php echo $block->escapeHtml($block->getMinimumPasswordLength()) ?>"
-                       data-password-min-character-sets="<?php echo $block->escapeHtml($block->getRequiredCharacterClassesNumber()) ?>"
+                       data-password-min-length="<?php echo $block->escapeHtmlAttr($block->getMinimumPasswordLength()) ?>"
+                       data-password-min-character-sets="<?php echo $block->escapeHtmlAttr($block->getRequiredCharacterClassesNumber()) ?>"
                        data-validate="{required:true, 'validate-customer-password':true}"
                        autocomplete="off">
                 <div id="password-strength-meter-container" data-role="password-strength-meter" aria-live="polite">
@@ -181,7 +175,7 @@ require([
 ], function($){
 
     var dataForm = $('#form-validate');
-    var ignore = <?php /* @escapeNotVerified */ echo $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null'; ?>;
+    var ignore = <?php /* @noEscape */ echo $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null'; ?>;
     
     dataForm.mage('validation', {
     <?php if ($_dob->isEnabled()): ?>
@@ -210,14 +204,14 @@ require([
     {
         "#country": {
             "regionUpdater": {
-                "optionalRegionAllowed": <?php /* @escapeNotVerified */ echo($block->getConfig('general/region/display_all') ? 'true' : 'false'); ?>,
+                "optionalRegionAllowed": <?php /* @noEscape */ echo $block->getConfig('general/region/display_all') ? 'true' : 'false'; ?>,
                 "regionListId": "#region_id",
                 "regionInputId": "#region",
                 "postcodeId": "#zip",
                 "form": "#form-validate",
-                "regionJson": <?php /* @escapeNotVerified */ echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>,
-                "defaultRegion": "<?php /* @escapeNotVerified */ echo $block->getFormData()->getRegionId() ?>",
-                "countriesWithOptionalZip": <?php /* @escapeNotVerified */ echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?>
+                "regionJson": <?php /* @noEscape */ echo $this->helper('Magento\Directory\Helper\Data')->getRegionJson() ?>,
+                "defaultRegion": "<?php echo $block->escapeJs($block->getFormData()->getRegionId()) ?>",
+                "countriesWithOptionalZip": <?php /* @noEscape */ echo $this->helper('Magento\Directory\Helper\Data')->getCountriesWithOptionalZip(true) ?>
             }
         }
     }
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml b/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml
index 6fba6dfd9f9f2273a3f28c13752391511a6cabb3..6b3b34fc00e7beeb70fd823b598a7939e1f6eec1 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml
@@ -8,7 +8,7 @@
 
 /** @var \Magento\Customer\Block\Account\Resetpassword $block */
 ?>
-<form action="<?php /* @escapeNotVerified */ echo $block->getUrl('*/*/resetpasswordpost', ['_query' => ['id' => $block->getCustomerId(), 'token' => $block->getResetPasswordLinkToken()]]); ?>"
+<form action="<?php echo $block->escapeUrl($block->getUrl('*/*/resetpasswordpost', ['_query' => ['id' => $block->getCustomerId(), 'token' => $block->getResetPasswordLinkToken()]])); ?>"
       method="post"
       <?php if ($block->isAutocompleteDisabled()) :?> autocomplete="off"<?php endif; ?>
       id="form-validate"
@@ -19,8 +19,8 @@
             <label class="label" for="password"><span><?php /* @escapeNotVerified */ echo __('New Password'); ?></span></label>
             <div class="control">
                 <input type="password" class="input-text" name="password" id="password"
-                       data-password-min-length="<?php echo $block->escapeHtml($block->getMinimumPasswordLength()) ?>"
-                       data-password-min-character-sets="<?php echo $block->escapeHtml($block->getRequiredCharacterClassesNumber()) ?>"
+                       data-password-min-length="<?php echo $block->escapeHtmlAttr($block->getMinimumPasswordLength()) ?>"
+                       data-password-min-character-sets="<?php echo $block->escapeHtmlAttr($block->getRequiredCharacterClassesNumber()) ?>"
                        data-validate="{required:true, 'validate-customer-password':true}"
                        autocomplete="off">
                 <div id="password-strength-meter-container" data-role="password-strength-meter" aria-live="polite">
diff --git a/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml b/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml
index 373bec3601a898c56ba9fd166e47d7e11be6174f..55779df1c228d828469e97d7d6fecb33858eced8 100644
--- a/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml
@@ -3,13 +3,12 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-/**
- * @var \Magento\Customer\Block\CustomerData $block
- */
+
+/** @var \Magento\Customer\Block\CustomerData $block */
 ?>
 <script type="text/x-magento-init">
 <?php
-    /* @escapeNotVerified */ echo $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode([
+    /* @noEscape */ echo $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode([
         '*' => ['Magento_Customer/js/customer-data' => [
             'sectionLoadUrl' => $block->getCustomerDataUrl('customer/section/load'),
             'cookieLifeTime' => $block->getCookieLifeTime(),
diff --git a/app/code/Magento/Customer/view/frontend/templates/js/section-config.phtml b/app/code/Magento/Customer/view/frontend/templates/js/section-config.phtml
index 3cde7b1dade30b201d02f9c43cc579e90e4d0ede..d6986829a0c40d54be69746aa5c313e85e74abfc 100644
--- a/app/code/Magento/Customer/view/frontend/templates/js/section-config.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/js/section-config.phtml
@@ -3,13 +3,12 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-/**
- * @var \Magento\Customer\Block\SectionConfig $block
- */
+
+/** @var \Magento\Customer\Block\SectionConfig $block */
 ?>
 <script type="text/x-magento-init">
 <?php
-    /* @escapeNotVerified */ echo $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode([
+    /* @noEscape */ echo $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode([
         '*' => ['Magento_Customer/js/section-config' => [
             'sections' => $block->getSections(),
             'clientSideSections' => $block->getClientSideSections(),
diff --git a/app/code/Magento/Customer/view/frontend/templates/logout.phtml b/app/code/Magento/Customer/view/frontend/templates/logout.phtml
index 7b2c22913be87cd699346d14e86c6f126feca9ec..269048d618aaf35bc956b308eee89a1c5bab9266 100644
--- a/app/code/Magento/Customer/view/frontend/templates/logout.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/logout.phtml
@@ -3,6 +3,8 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Element\Template $block */
 ?>
 <p><?php /* @escapeNotVerified */ echo __('You have signed out and will go to our homepage in 5 seconds.') ?></p>
 <script>
@@ -11,7 +13,7 @@ require([
     "mage/mage"
 ], function($){
 
-    $($.mage.redirect("<?php /* @escapeNotVerified */ echo $block->getUrl() ?>", "assign", 5000));
+    $($.mage.redirect("<?php echo $block->escapeUrl($block->getUrl()) ?>", "assign", 5000));
 
 });
 </script>
diff --git a/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml b/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml
index d107ebdb1881173b6d1c60728f8a522d05d7f3ac..7bfa236eabb953d9d5408a17aa5612572556da09 100644
--- a/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/newcustomer.phtml
@@ -6,13 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
-?>
-<?php
-/**
- * New Customer block template
- *
- * @var $block \Magento\Customer\Block\Form\Login\Info
- */
+/** @var \Magento\Customer\Block\Form\Login\Info $block */
 ?>
 <?php if ($block->getRegistration()->isAllowed()): ?>
 <div class="block block-new-customer">
@@ -23,7 +17,7 @@
         <p><?php /* @escapeNotVerified */ echo __('Creating an account has many benefits: check out faster, keep more than one address, track orders and more.') ?></p>
         <div class="actions-toolbar">
             <div class="primary">
-                <a href="<?php /* @escapeNotVerified */ echo $block->getCreateAccountUrl() ?>" class="action create primary"><span><?php /* @escapeNotVerified */ echo __('Create an Account') ?></span></a>
+                <a href="<?php echo $block->escapeUrl($block->getCreateAccountUrl()) ?>" class="action create primary"><span><?php /* @escapeNotVerified */ echo __('Create an Account') ?></span></a>
             </div>
         </div>
     </div>
diff --git a/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml
index 4fa8cd6aeb7486819261c525a7a57d5c84a14075..727dc43750ae510ca0d86fa5443160e2ba07526d 100644
--- a/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml
@@ -6,11 +6,9 @@
 
 // @codingStandardsIgnoreFile
 
-/**
-USAGE:
-
-Simple:
+/** @var \Magento\Customer\Block\Widget\Dob $block */
 
+/*
 <?php echo $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Dob')
    ->setDate($block->getCustomer()->getDob())
    ->toHtml() ?>
@@ -23,24 +21,19 @@ For checkout/onepage/billing.phtml:
    ->setFieldNameFormat('billing[%s]')
    ->toHtml() ?>
 
-NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css
-      Alternatively we could calculate widths automatically using block input parameters.
+NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css. Alternatively we could calculate widths
+automatically using block input parameters.
 */
 
-/**
- * @see \Magento\Customer\Block\Widget\Dob
- */
-?>
-<?php
 $fieldCssClass = 'field date field-' . $block->getHtmlId();
 $fieldCssClass .= $block->isRequired() ? ' required' : '';
 ?>
-<div class="<?php /* @escapeNotVerified */ echo $fieldCssClass; ?>">
-    <label class="label" for="<?php echo $block->getHtmlId()?>"><span><?php /* @escapeNotVerified */ echo $block->getLabel() ?></span></label>
+<div class="<?php echo $block->escapeHtmlAttr($fieldCssClass); ?>">
+    <label class="label" for="<?php echo $block->escapeHtmlAttr($block->getHtmlId()) ?>"><span><?php echo $block->escapeHtml($block->getLabel()) ?></span></label>
     <div class="control customer-dob">
         <?php echo $block->getFieldHtml(); ?>
         <?php if ($_message = $block->getAdditionalDescription()) : ?>
-            <div class="note"><?php /* @escapeNotVerified */ echo $_message; ?></div>
+            <div class="note"><?php echo $block->escapeHtml($_message); ?></div>
         <?php endif; ?>
     </div>
 </div>
diff --git a/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml
index 391bd20ee8c3b48b224515a28ea9c6023c5b27d3..c05d7c7fef8df31be24025b85c9c35966770b5dd 100644
--- a/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/widget/gender.phtml
@@ -6,15 +6,16 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Customer\Block\Widget\Gender $block */
 ?>
 <div class="field gender<?php if ($block->isRequired()) echo ' required' ?>">
-    <label class="label" for="<?php /* @escapeNotVerified */ echo $block->getFieldId('gender')?>"><span><?php /* @escapeNotVerified */ echo __('Gender') ?></span></label>
+    <label class="label" for="<?php echo $block->escapeHtmlAttr($block->getFieldId('gender')) ?>"><span><?php /* @escapeNotVerified */ echo __('Gender') ?></span></label>
     <div class="control">
-        <select id="<?php /* @escapeNotVerified */ echo $block->getFieldId('gender')?>" name="<?php /* @escapeNotVerified */ echo $block->getFieldName('gender')?>" title="<?php /* @escapeNotVerified */ echo __('Gender') ?>"<?php if ($block->isRequired()):?> class="validate-select" data-validate="{required:true}"<?php endif; ?> <?php /* @escapeNotVerified */ echo $block->getFieldParams() ?>>
+        <select id="<?php echo $block->escapeHtmlAttr($block->getFieldId('gender')) ?>" name="<?php echo $block->escapeHtmlAttr($block->getFieldName('gender')) ?>" title="<?php /* @escapeNotVerified */ echo __('Gender') ?>"<?php if ($block->isRequired()):?> class="validate-select" data-validate="{required:true}"<?php endif; ?>>
             <?php $options = $block->getGenderOptions(); ?>
             <?php $value = $block->getGender();?>
             <?php foreach ($options as $option):?>
-                <option value="<?php /* @escapeNotVerified */ echo $option->getValue() ?>"<?php if ($option->getValue() == $value) echo ' selected="selected"' ?>><?php /* @escapeNotVerified */ echo __($option->getLabel()) ?></option>
+                <option value="<?php echo $block->escapeHtmlAttr($option->getValue()) ?>"<?php if ($option->getValue() == $value) echo ' selected="selected"' ?>><?php /* @escapeNotVerified */ echo __($option->getLabel()) ?></option>
             <?php endforeach;?>
         </select>
     </div>
diff --git a/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml
index f1f1416c2f4e4bedfd54db3fe4afdb5c56c5317d..57dcdbb308568062e01148cb2a325f889d7e4cb0 100644
--- a/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/widget/name.phtml
@@ -6,11 +6,9 @@
 
 // @codingStandardsIgnoreFile
 
-/**
-USAGE:
-
-Simple:
+/** @var \Magento\Customer\Block\Widget\Name $block */
 
+/*
 <?php echo $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')
    ->setObject($block->getAddress())
    ->toHtml() ?>
@@ -21,18 +19,16 @@ For checkout/onepage/shipping.phtml:
    ->setObject($block->getAddress())
    ->setFieldIdFormat('shipping:%s')
    ->setFieldNameFormat('shipping[%s]')
-   ->setFieldParams('onchange="shipping.setSameAsBilling(false);"')
    ->toHtml() ?>
 */
-/* @var $block \Magento\Customer\Block\Widget\Name */
+
 $prefix = $block->showPrefix();
 $middle = $block->showMiddlename();
 $suffix = $block->showSuffix();
 ?>
-
 <?php if (($prefix || $middle || $suffix) && !$block->getNoWrap()): ?>
-<div class="field required fullname <?php /* @escapeNotVerified */ echo $block->getContainerClassName() ?>">
-    <label for="<?php /* @escapeNotVerified */ echo $block->getFieldId('firstname') ?>" class="label">
+<div class="field required fullname <?php echo $block->escapeHtmlAttr($block->getContainerClassName()) ?>">
+    <label for="<?php echo $block->escapeHtmlAttr($block->getFieldId('firstname')) ?>" class="label">
         <span><?php /* @escapeNotVerified */ echo __('Name') ?></span>
     </label>
     <div class="control">
@@ -42,24 +38,24 @@ $suffix = $block->showSuffix();
 
     <?php if ($prefix): ?>
         <div class="field field-name-prefix<?php if ($block->isPrefixRequired()) echo ' required' ?>">
-            <label class="label" for="<?php /* @escapeNotVerified */ echo $block->getFieldId('prefix') ?>">
-                <span><?php /* @escapeNotVerified */ echo $block->getStoreLabel('prefix') ?></span>
+            <label class="label" for="<?php echo $block->escapeHtmlAttr($block->getFieldId('prefix')) ?>">
+                <span><?php echo $block->escapeHtml($block->getStoreLabel('prefix')) ?></span>
             </label>
 
             <div class="control">
                 <?php if ($block->getPrefixOptions() === false): ?>
-                    <input type="text" id="<?php /* @escapeNotVerified */ echo $block->getFieldId('prefix') ?>"
-                           name="<?php /* @escapeNotVerified */ echo $block->getFieldName('prefix') ?>"
-                           value="<?php echo $block->escapeHtml($block->getObject()->getPrefix()) ?>"
-                           title="<?php /* @escapeNotVerified */ echo $block->getStoreLabel('prefix') ?>"
-                           class="input-text <?php /* @escapeNotVerified */ echo $block->getAttributeValidationClass('prefix') ?>" <?php /* @escapeNotVerified */ echo $block->getFieldParams() ?> <?php if ($block->isPrefixRequired()) echo ' data-validate="{required:true}"' ?>>
+                    <input type="text" id="<?php echo $block->escapeHtmlAttr($block->getFieldId('prefix')) ?>"
+                           name="<?php echo $block->escapeHtmlAttr($block->getFieldName('prefix')) ?>"
+                           value="<?php echo $block->escapeHtmlAttr($block->getObject()->getPrefix()) ?>"
+                           title="<?php echo $block->escapeHtmlAttr($block->getStoreLabel('prefix')) ?>"
+                           class="input-text <?php echo $block->escapeHtmlAttr($block->getAttributeValidationClass('prefix')) ?>" <?php if ($block->isPrefixRequired()) echo ' data-validate="{required:true}"' ?>>
                 <?php else: ?>
-                    <select id="<?php /* @escapeNotVerified */ echo $block->getFieldId('prefix') ?>"
-                            name="<?php /* @escapeNotVerified */ echo $block->getFieldName('prefix') ?>"
-                            title="<?php /* @escapeNotVerified */ echo $block->getStoreLabel('prefix') ?>"
-                            class="<?php /* @escapeNotVerified */ echo $block->getAttributeValidationClass('prefix') ?>" <?php /* @escapeNotVerified */ echo $block->getFieldParams() ?> <?php if ($block->isPrefixRequired()) echo ' data-validate="{required:true}"' ?> >
+                    <select id="<?php echo $block->escapeHtmlAttr($block->getFieldId('prefix')) ?>"
+                            name="<?php echo $block->escapeHtmlAttr($block->getFieldName('prefix')) ?>"
+                            title="<?php echo $block->escapeHtmlAttr($block->getStoreLabel('prefix')) ?>"
+                            class="<?php echo $block->escapeHtmlAttr($block->getAttributeValidationClass('prefix')) ?>" <?php if ($block->isPrefixRequired()) echo ' data-validate="{required:true}"' ?> >
                         <?php foreach ($block->getPrefixOptions() as $_option): ?>
-                            <option value="<?php /* @escapeNotVerified */ echo $_option ?>"<?php if ($block->getObject()->getPrefix() == $_option): ?> selected="selected"<?php endif; ?>>
+                            <option value="<?php echo $block->escapeHtmlAttr($_option) ?>"<?php if ($block->getObject()->getPrefix() == $_option): ?> selected="selected"<?php endif; ?>>
                                 <?php /* @escapeNotVerified */ echo __($_option) ?>
                             </option>
                         <?php endforeach; ?>
@@ -69,67 +65,67 @@ $suffix = $block->showSuffix();
         </div>
     <?php endif; ?>
         <div class="field field-name-firstname required">
-            <label class="label" for="<?php /* @escapeNotVerified */ echo $block->getFieldId('firstname') ?>">
-                <span><?php /* @escapeNotVerified */ echo $block->getStoreLabel('firstname') ?></span>
+            <label class="label" for="<?php echo $block->escapeHtmlAttr($block->getFieldId('firstname')) ?>">
+                <span><?php echo $block->escapeHtml($block->getStoreLabel('firstname')) ?></span>
             </label>
 
             <div class="control">
-                <input type="text" id="<?php /* @escapeNotVerified */ echo $block->getFieldId('firstname') ?>"
-                       name="<?php /* @escapeNotVerified */ echo $block->getFieldName('firstname') ?>"
-                       value="<?php echo $block->escapeHtml($block->getObject()->getFirstname()) ?>"
-                       title="<?php /* @escapeNotVerified */ echo $block->getStoreLabel('firstname') ?>"
-                       class="input-text <?php /* @escapeNotVerified */ echo $block->getAttributeValidationClass('firstname') ?>" <?php /* @escapeNotVerified */ echo $block->getFieldParams() ?> <?php if ($block->getAttributeValidationClass('firstname') == 'required-entry') echo ' data-validate="{required:true}"' ?>>
+                <input type="text" id="<?php echo $block->escapeHtmlAttr($block->getFieldId('firstname')) ?>"
+                       name="<?php echo $block->escapeHtmlAttr($block->getFieldName('firstname')) ?>"
+                       value="<?php echo $block->escapeHtmlAttr($block->getObject()->getFirstname()) ?>"
+                       title="<?php echo $block->escapeHtmlAttr($block->getStoreLabel('firstname')) ?>"
+                       class="input-text <?php echo $block->escapeHtmlAttr($block->getAttributeValidationClass('firstname')) ?>" <?php if ($block->getAttributeValidationClass('firstname') == 'required-entry') echo ' data-validate="{required:true}"' ?>>
             </div>
         </div>
     <?php if ($middle): ?>
         <?php $isMiddlenameRequired = $block->isMiddlenameRequired(); ?>
         <div class="field field-name-middlename<?php echo $isMiddlenameRequired ? ' required' : '' ?>">
-            <label class="label" for="<?php /* @escapeNotVerified */ echo $block->getFieldId('middlename') ?>">
-                <span><?php /* @escapeNotVerified */ echo $block->getStoreLabel('middlename') ?></span>
+            <label class="label" for="<?php echo $block->escapeHtmlAttr($block->getFieldId('middlename')) ?>">
+                <span><?php echo $block->escapeHtml($block->getStoreLabel('middlename')) ?></span>
             </label>
 
             <div class="control">
-                <input type="text" id="<?php /* @escapeNotVerified */ echo $block->getFieldId('middlename') ?>"
-                       name="<?php /* @escapeNotVerified */ echo $block->getFieldName('middlename') ?>"
-                       value="<?php echo $block->escapeHtml($block->getObject()->getMiddlename()) ?>"
-                       title="<?php /* @escapeNotVerified */ echo $block->getStoreLabel('middlename') ?>"
-                       class="input-text <?php /* @escapeNotVerified */ echo $block->getAttributeValidationClass('middlename') ?>" <?php /* @escapeNotVerified */ echo $block->getFieldParams() ?> <?php echo $isMiddlenameRequired ? ' data-validate="{required:true}"' : '' ?>>
+                <input type="text" id="<?php echo $block->escapeHtmlAttr($block->getFieldId('middlename')) ?>"
+                       name="<?php echo $block->escapeHtmlAttr($block->getFieldName('middlename')) ?>"
+                       value="<?php echo $block->escapeHtmlAttr($block->getObject()->getMiddlename()) ?>"
+                       title="<?php echo $block->escapeHtmlAttr($block->getStoreLabel('middlename')) ?>"
+                       class="input-text <?php echo $block->escapeHtmlAttr($block->getAttributeValidationClass('middlename')) ?>" <?php echo $isMiddlenameRequired ? ' data-validate="{required:true}"' : '' ?>>
             </div>
         </div>
     <?php endif; ?>
         <div class="field field-name-lastname required">
-            <label class="label"  for="<?php /* @escapeNotVerified */ echo $block->getFieldId('lastname') ?>">
-                <span><?php /* @escapeNotVerified */ echo $block->getStoreLabel('lastname') ?></span>
+            <label class="label" for="<?php echo $block->escapeHtmlAttr($block->getFieldId('lastname')) ?>">
+                <span><?php echo $block->escapeHtml($block->getStoreLabel('lastname')) ?></span>
             </label>
 
             <div class="control">
-                <input type="text" id="<?php /* @escapeNotVerified */ echo $block->getFieldId('lastname') ?>"
-                       name="<?php /* @escapeNotVerified */ echo $block->getFieldName('lastname') ?>"
-                       value="<?php echo $block->escapeHtml($block->getObject()->getLastname()) ?>"
-                       title="<?php /* @escapeNotVerified */ echo $block->getStoreLabel('lastname') ?>"
-                       class="input-text <?php /* @escapeNotVerified */ echo $block->getAttributeValidationClass('lastname') ?>" <?php /* @escapeNotVerified */ echo $block->getFieldParams() ?> <?php if ($block->getAttributeValidationClass('lastname') == 'required-entry') echo ' data-validate="{required:true}"' ?>>
+                <input type="text" id="<?php echo $block->escapeHtmlAttr($block->getFieldId('lastname')) ?>"
+                       name="<?php echo $block->escapeHtmlAttr($block->getFieldName('lastname')) ?>"
+                       value="<?php echo $block->escapeHtmlAttr($block->getObject()->getLastname()) ?>"
+                       title="<?php echo $block->escapeHtmlAttr($block->getStoreLabel('lastname')) ?>"
+                       class="input-text <?php echo $block->escapeHtmlAttr($block->getAttributeValidationClass('lastname')) ?>" <?php if ($block->getAttributeValidationClass('lastname') == 'required-entry') echo ' data-validate="{required:true}"' ?>>
             </div>
         </div>
     <?php if ($suffix): ?>
         <div class="field field-name-suffix<?php if ($block->isSuffixRequired()) echo ' required' ?>">
-            <label class="label" for="<?php /* @escapeNotVerified */ echo $block->getFieldId('suffix') ?>">
-                <span><?php /* @escapeNotVerified */ echo $block->getStoreLabel('suffix') ?></span>
+            <label class="label" for="<?php echo $block->escapeHtmlAttr($block->getFieldId('suffix')) ?>">
+                <span><?php echo $block->escapeHtml($block->getStoreLabel('suffix')) ?></span>
             </label>
 
             <div class="control">
                 <?php if ($block->getSuffixOptions() === false): ?>
-                    <input type="text" id="<?php /* @escapeNotVerified */ echo $block->getFieldId('suffix') ?>"
-                           name="<?php /* @escapeNotVerified */ echo $block->getFieldName('suffix') ?>"
-                           value="<?php echo $block->escapeHtml($block->getObject()->getSuffix()) ?>"
-                           title="<?php /* @escapeNotVerified */ echo $block->getStoreLabel('suffix') ?>"
-                           class="input-text <?php /* @escapeNotVerified */ echo $block->getAttributeValidationClass('suffix') ?>" <?php /* @escapeNotVerified */ echo $block->getFieldParams() ?> <?php if ($block->isSuffixRequired()) echo ' data-validate="{required:true}"' ?>>
+                    <input type="text" id="<?php echo $block->escapeHtmlAttr($block->getFieldId('suffix')) ?>"
+                           name="<?php echo $block->escapeHtmlAttr($block->getFieldName('suffix')) ?>"
+                           value="<?php echo $block->escapeHtmlAttr($block->getObject()->getSuffix()) ?>"
+                           title="<?php echo $block->escapeHtmlAttr($block->getStoreLabel('suffix')) ?>"
+                           class="input-text <?php echo $block->escapeHtmlAttr($block->getAttributeValidationClass('suffix')) ?>" <?php if ($block->isSuffixRequired()) echo ' data-validate="{required:true}"' ?>>
                 <?php else: ?>
-                    <select id="<?php /* @escapeNotVerified */ echo $block->getFieldId('suffix') ?>"
-                            name="<?php /* @escapeNotVerified */ echo $block->getFieldName('suffix') ?>"
-                            title="<?php /* @escapeNotVerified */ echo $block->getStoreLabel('suffix') ?>"
-                            class="<?php /* @escapeNotVerified */ echo $block->getAttributeValidationClass('suffix') ?>" <?php /* @escapeNotVerified */ echo $block->getFieldParams() ?> <?php if ($block->isSuffixRequired()) echo ' data-validate="{required:true}"' ?>>
+                    <select id="<?php echo $block->escapeHtmlAttr($block->getFieldId('suffix')) ?>"
+                            name="<?php echo $block->escapeHtmlAttr($block->getFieldName('suffix')) ?>"
+                            title="<?php echo $block->escapeHtmlAttr($block->getStoreLabel('suffix')) ?>"
+                            class="<?php echo $block->escapeHtmlAttr($block->getAttributeValidationClass('suffix')) ?>" <?php if ($block->isSuffixRequired()) echo ' data-validate="{required:true}"' ?>>
                         <?php foreach ($block->getSuffixOptions() as $_option): ?>
-                            <option value="<?php /* @escapeNotVerified */ echo $_option ?>"<?php if ($block->getObject()->getSuffix() == $_option): ?> selected="selected"<?php endif; ?>>
+                            <option value="<?php echo $block->escapeHtmlAttr($_option) ?>"<?php if ($block->getObject()->getSuffix() == $_option): ?> selected="selected"<?php endif; ?>>
                                 <?php /* @escapeNotVerified */ echo __($_option) ?>
                             </option>
                         <?php endforeach; ?>
diff --git a/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml
index f9fadb3a4c206ffcdc5f0aa5a1e7a5a5fa203a02..0463d33ad6e2dd08277a28f4faba8bbf832fea1b 100644
--- a/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/widget/taxvat.phtml
@@ -6,10 +6,11 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Customer\Block\Widget\Taxvat $block */
 ?>
 <div class="field taxvat<?php if ($block->isRequired()) echo ' required'; ?>">
-    <label class="label" for="<?php /* @escapeNotVerified */ echo $block->getFieldId('taxvat')?>"><span><?php /* @escapeNotVerified */ echo __('Tax/VAT number') ?></span></label>
+    <label class="label" for="<?php echo $block->escapeHtmlAttr($block->getFieldId('taxvat')) ?>"><span><?php /* @escapeNotVerified */ echo __('Tax/VAT number') ?></span></label>
     <div class="control">
-        <input type="text" id="<?php /* @escapeNotVerified */ echo $block->getFieldId('taxvat')?>" name="<?php /* @escapeNotVerified */ echo $block->getFieldName('taxvat')?>" value="<?php echo $block->escapeHtml($block->getTaxvat()) ?>" title="<?php /* @escapeNotVerified */ echo __('Tax/VAT number') ?>" class="input-text <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('taxvat') ?>" <?php /* @escapeNotVerified */ echo $block->getFieldParams() ?> <?php if ($block->isRequired()) echo ' data-validate="{required:true}"' ?>>
+        <input type="text" id="<?php echo $block->escapeHtmlAttr($block->getFieldId('taxvat')) ?>" name="<?php echo $block->escapeHtmlAttr($block->getFieldName('taxvat')) ?>" value="<?php echo $block->escapeHtmlAttr($block->getTaxvat()) ?>" title="<?php /* @escapeNotVerified */ echo __('Tax/VAT number') ?>" class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('taxvat')) ?>" <?php if ($block->isRequired()) echo ' data-validate="{required:true}"' ?>>
     </div>
 </div>
diff --git a/app/code/Magento/Dhl/Model/Plugin/Rma/Block/Adminhtml/Rma/Edit/Tab/General/Shippingmethod.php b/app/code/Magento/Dhl/Model/Plugin/Rma/Block/Adminhtml/Rma/Edit/Tab/General/Shippingmethod.php
deleted file mode 100644
index acc859ac8c27e879201eed9565eca5e91d0541ca..0000000000000000000000000000000000000000
--- a/app/code/Magento/Dhl/Model/Plugin/Rma/Block/Adminhtml/Rma/Edit/Tab/General/Shippingmethod.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * Copyright © 2016 Magento. All rights reserved.
- * See COPYING.txt for license details.
- */
-namespace Magento\Dhl\Model\Plugin\Rma\Block\Adminhtml\Rma\Edit\Tab\General;
-
-/**
- * Checkout cart shipping block plugin
- */
-class Shippingmethod
-{
-    /**
-     * @var \Magento\Framework\App\Config\ScopeConfigInterface
-     */
-    protected $_scopeConfig;
-
-    /**
-     * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
-     */
-    public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig)
-    {
-        $this->_scopeConfig = $scopeConfig;
-    }
-
-    /**
-     * @param \Magento\Framework\DataObject $subject
-     * @param bool $result
-     * @return bool
-     */
-    public function afterCanDisplayCustomValue(\Magento\Framework\DataObject $subject, $result)
-    {
-        $carrierCode = $subject->getShipment()->getCarrierCode();
-        if (!$carrierCode) {
-            return (bool)$result || false;
-        }
-        return (bool)$result || (bool)$carrierCode == \Magento\Dhl\Model\Carrier::CODE;
-    }
-}
diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json
index cab7f39538d956a7f7359c9ef6d23bba58ddb80e..e88cd535952d628628bbc984137430d5370a6ecd 100644
--- a/app/code/Magento/Dhl/composer.json
+++ b/app/code/Magento/Dhl/composer.json
@@ -16,8 +16,7 @@
         "lib-libxml": "*"
     },
     "suggest": {
-        "magento/module-checkout": "100.2.*",
-        "magento/module-rma": "100.2.*"
+        "magento/module-checkout": "100.2.*"
     },
     "type": "magento2-module",
     "version": "100.2.0-dev",
diff --git a/app/code/Magento/Dhl/etc/di.xml b/app/code/Magento/Dhl/etc/di.xml
index 25b90ce8850d8c5b2b5e29a8c40b659ab87e92a0..a215c2e82182535e14e659d20cf1f7db2317e915 100644
--- a/app/code/Magento/Dhl/etc/di.xml
+++ b/app/code/Magento/Dhl/etc/di.xml
@@ -9,8 +9,4 @@
     <type name="Magento\Checkout\Block\Cart\LayoutProcessor">
         <plugin name="checkout_cart_shipping_dhl" type="Magento\Dhl\Model\Plugin\Checkout\Block\Cart\Shipping"/>
     </type>
-    <type name="Magento\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shippingmethod">
-        <plugin name="rma_tab_shippingmethod_dhl"
-                type="Magento\Dhl\Model\Plugin\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shippingmethod"/>
-    </type>
 </config>
diff --git a/app/code/Magento/Eav/Api/Data/AttributeDefaultValueInterface.php b/app/code/Magento/Eav/Api/Data/AttributeDefaultValueInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..e4b33833eb7757810e73bbd8be39a34ef2fdeff0
--- /dev/null
+++ b/app/code/Magento/Eav/Api/Data/AttributeDefaultValueInterface.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ *
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Api\Data;
+
+/**
+ * Interface AttributeDefaultValueInterface
+ * Allows to manage attribute default value through interface
+ * @api
+ * @package Magento\Eav\Api\Data
+ */
+interface AttributeDefaultValueInterface
+{
+    const DEFAULT_VALUE = "default_value";
+
+    /**
+     * @param string $defaultValue
+     * @return \Magento\Framework\Api\MetadataObjectInterface
+     */
+    public function setDefaultValue($defaultValue);
+
+    /**
+     * @return string
+     */
+    public function getDefaultValue();
+}
diff --git a/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php b/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php
new file mode 100644
index 0000000000000000000000000000000000000000..63c71bd1bb1bac0517bad1733c5fb12e836a942f
--- /dev/null
+++ b/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php
@@ -0,0 +1,118 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor;
+
+use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class FilterProcessor implements CollectionProcessorInterface
+{
+    /**
+     * @var CustomFilterInterface[]
+     */
+    private $customFilters;
+
+    /**
+     * @var array
+     */
+    private $fieldMapping;
+
+    /**
+     * @param CustomFilterInterface[] $customFilters
+     * @param array $fieldMapping
+     */
+    public function __construct(
+        array $customFilters = [],
+        array $fieldMapping = []
+    ) {
+        $this->customFilters = $customFilters;
+        $this->fieldMapping = $fieldMapping;
+    }
+
+    /**
+     * Apply Search Criteria Filters to collection
+     *
+     * @param SearchCriteriaInterface $searchCriteria
+     * @param AbstractDb $collection
+     * @return void
+     */
+    public function process(SearchCriteriaInterface $searchCriteria, AbstractDb $collection)
+    {
+        foreach ($searchCriteria->getFilterGroups() as $group) {
+            $this->addFilterGroupToCollection($group, $collection);
+        }
+    }
+
+    /**
+     * Add FilterGroup to the collection
+     *
+     * @param FilterGroup $filterGroup
+     * @param AbstractDb $collection
+     * @return void
+     */
+    private function addFilterGroupToCollection(
+        FilterGroup $filterGroup,
+        AbstractDb $collection
+    ) {
+        $fields = [];
+        foreach ($filterGroup->getFilters() as $filter) {
+            $isApplied = false;
+            $customFilter = $this->getCustomFilterForField($filter->getField());
+            if ($customFilter) {
+                $isApplied = $customFilter->apply($filter, $collection);
+            }
+
+            if (!$isApplied) {
+                $field = $this->getFieldMapping($filter->getField());
+                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
+                $fields[] = ['attribute' => $field, $condition => $filter->getValue()];
+            }
+        }
+
+        if ($fields) {
+            $collection->addFieldToFilter($fields);
+        }
+    }
+
+    /**
+     * Return custom filters for field if exists
+     *
+     * @param string $field
+     * @return CustomFilterInterface|null
+     * @throws \InvalidArgumentException
+     */
+    private function getCustomFilterForField($field)
+    {
+        $filter = null;
+        if (isset($this->customFilters[$field])) {
+            $filter = $this->customFilters[$field];
+            if (!($this->customFilters[$field] instanceof CustomFilterInterface)) {
+                throw new \InvalidArgumentException(
+                    sprintf(
+                        'Filter for %s must implement %s interface.',
+                        $field,
+                        CustomFilterInterface::class
+                    )
+                );
+            }
+        }
+        return $filter;
+    }
+
+    /**
+     * Return mapped field name
+     *
+     * @param string $field
+     * @return string
+     */
+    private function getFieldMapping($field)
+    {
+        return isset($this->fieldMapping[$field]) ? $this->fieldMapping[$field] : $field;
+    }
+}
diff --git a/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupAttributeSetIdFilter.php b/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupAttributeSetIdFilter.php
new file mode 100644
index 0000000000000000000000000000000000000000..f9e2e154ca54c09d5cd6278f66a2e4428f551062
--- /dev/null
+++ b/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupAttributeSetIdFilter.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class AttributeGroupAttributeSetIdFilter implements CustomFilterInterface
+{
+    /**
+     * Apply attribute set ID filter to collection
+     *
+     * @param Filter $filter
+     * @param AbstractDb $collection
+     * @return bool
+     */
+    public function apply(Filter $filter, AbstractDb $collection)
+    {
+        /** @var \Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\Collection $collection */
+        $collection->setAttributeSetFilter($filter->getValue());
+
+        return true;
+    }
+}
diff --git a/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupCodeFilter.php b/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupCodeFilter.php
new file mode 100644
index 0000000000000000000000000000000000000000..b7972fc88f9f5cda0a14e263e506727260c8ce78
--- /dev/null
+++ b/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupCodeFilter.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class AttributeGroupCodeFilter implements CustomFilterInterface
+{
+    /**
+     * Apply attribute group code filter to collection
+     *
+     * @param Filter $filter
+     * @param AbstractDb $collection
+     * @return bool
+     */
+    public function apply(Filter $filter, AbstractDb $collection)
+    {
+        $collection->addFilter('attribute_group_code', $filter->getValue());
+
+        return true;
+    }
+}
diff --git a/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeSetEntityTypeCodeFilter.php b/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeSetEntityTypeCodeFilter.php
new file mode 100644
index 0000000000000000000000000000000000000000..ac5a267ef311eb21826bc1974481a686b3173c64
--- /dev/null
+++ b/app/code/Magento/Eav/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeSetEntityTypeCodeFilter.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Eav\Model\Config;
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class AttributeSetEntityTypeCodeFilter implements CustomFilterInterface
+{
+    /**
+     * @var Config
+     */
+    private $eavConfig;
+
+    /**
+     * @param Config $eavConfig
+     */
+    public function __construct(
+        Config $eavConfig
+    ) {
+        $this->eavConfig = $eavConfig;
+    }
+
+    /**
+     * Apply entity type code filter to collection
+     *
+     * @param Filter $filter
+     * @param AbstractDb $collection
+     * @return bool
+     */
+    public function apply(Filter $filter, AbstractDb $collection)
+    {
+        $entityType = $this->eavConfig->getEntityType($filter->getValue());
+
+        /** @var \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $collection */
+        $collection->setEntityTypeFilter($entityType->getId());
+
+        return true;
+    }
+}
diff --git a/app/code/Magento/Eav/Model/Attribute/GroupRepository.php b/app/code/Magento/Eav/Model/Attribute/GroupRepository.php
index db99854c719237eb8fc4ab45b8f41cb0809f93f7..20315edfbe830e7bd57dd5348629a980a59cf486 100644
--- a/app/code/Magento/Eav/Model/Attribute/GroupRepository.php
+++ b/app/code/Magento/Eav/Model/Attribute/GroupRepository.php
@@ -1,15 +1,18 @@
 <?php
 /**
- *
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
 namespace Magento\Eav\Model\Attribute;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Exception\InputException;
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Exception\StateException;
 
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class GroupRepository implements \Magento\Eav\Api\AttributeGroupRepositoryInterface
 {
     /**
@@ -42,6 +45,11 @@ class GroupRepository implements \Magento\Eav\Api\AttributeGroupRepositoryInterf
      */
     protected $joinProcessor;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Group $groupResource
      * @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory $groupListFactory
@@ -49,6 +57,7 @@ class GroupRepository implements \Magento\Eav\Api\AttributeGroupRepositoryInterf
      * @param \Magento\Eav\Api\AttributeSetRepositoryInterface $setRepository
      * @param \Magento\Eav\Api\Data\AttributeGroupSearchResultsInterfaceFactory $searchResultsFactory
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      * @codeCoverageIgnore
      */
     public function __construct(
@@ -57,7 +66,8 @@ class GroupRepository implements \Magento\Eav\Api\AttributeGroupRepositoryInterf
         \Magento\Eav\Model\Entity\Attribute\GroupFactory $groupFactory,
         \Magento\Eav\Api\AttributeSetRepositoryInterface $setRepository,
         \Magento\Eav\Api\Data\AttributeGroupSearchResultsInterfaceFactory $searchResultsFactory,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->groupResource = $groupResource;
         $this->groupListFactory = $groupListFactory;
@@ -65,6 +75,7 @@ class GroupRepository implements \Magento\Eav\Api\AttributeGroupRepositoryInterf
         $this->setRepository = $setRepository;
         $this->searchResultsFactory = $searchResultsFactory;
         $this->joinProcessor = $joinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -116,15 +127,13 @@ class GroupRepository implements \Magento\Eav\Api\AttributeGroupRepositoryInterf
             throw NoSuchEntityException::singleField('attributeSetId', $attributeSetId);
         }
 
+        /** @var \Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\Collection $collection */
         $collection = $this->groupListFactory->create();
         $this->joinProcessor->process($collection);
-        $collection->setAttributeSetFilter($attributeSetId);
-        $collection->setSortOrder();
 
-        if ($attributeGroupCode = $this->retrieveAttributeGroupCodeFromSearchCriteria($searchCriteria)) {
-            $collection->addFilter('attribute_group_code', $attributeGroupCode);
-        }
+        $this->collectionProcessor->process($searchCriteria, $collection);
 
+        /** @var \Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface $searchResult */
         $searchResult = $this->searchResultsFactory->create();
         $searchResult->setSearchCriteria($searchCriteria);
         $searchResult->setItems($collection->getItems());
@@ -194,21 +203,18 @@ class GroupRepository implements \Magento\Eav\Api\AttributeGroupRepositoryInterf
     }
 
     /**
-     * Retrieve attribute group code
+     * Retrieve collection processor
      *
-     * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
-     * @return null|string
+     * @deprecated
+     * @return CollectionProcessorInterface
      */
-    private function retrieveAttributeGroupCodeFromSearchCriteria(
-        \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
-    ) {
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            foreach ($group->getFilters() as $filter) {
-                if ($filter->getField() === 'attribute_group_code') {
-                    return $filter->getValue();
-                }
-            }
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Eav\Model\Api\SearchCriteria\AttributeGroupCollectionProcessor'
+            );
         }
-        return null;
+        return $this->collectionProcessor;
     }
 }
diff --git a/app/code/Magento/Eav/Model/AttributeRepository.php b/app/code/Magento/Eav/Model/AttributeRepository.php
index 53b90c939ae166f9cd41840b0dfb7292eb56a20e..1b3e1cb76d13c5b18f0501e7d985e45b8427c9b5 100644
--- a/app/code/Magento/Eav/Model/AttributeRepository.php
+++ b/app/code/Magento/Eav/Model/AttributeRepository.php
@@ -1,13 +1,12 @@
 <?php
 /**
- *
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
 namespace Magento\Eav\Model;
 
-use Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Exception\InputException;
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Exception\StateException;
@@ -47,6 +46,11 @@ class AttributeRepository implements \Magento\Eav\Api\AttributeRepositoryInterfa
      */
     protected $joinProcessor;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param Config $eavConfig
      * @param \Magento\Eav\Model\ResourceModel\Entity\Attribute $eavResource
@@ -54,6 +58,7 @@ class AttributeRepository implements \Magento\Eav\Api\AttributeRepositoryInterfa
      * @param \Magento\Eav\Api\Data\AttributeSearchResultsInterfaceFactory $searchResultsFactory
      * @param Entity\AttributeFactory $attributeFactory
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      * @codeCoverageIgnore
      */
     public function __construct(
@@ -62,7 +67,8 @@ class AttributeRepository implements \Magento\Eav\Api\AttributeRepositoryInterfa
         \Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory $attributeCollectionFactory,
         \Magento\Eav\Api\Data\AttributeSearchResultsInterfaceFactory $searchResultsFactory,
         \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->eavConfig = $eavConfig;
         $this->eavResource = $eavResource;
@@ -70,6 +76,7 @@ class AttributeRepository implements \Magento\Eav\Api\AttributeRepositoryInterfa
         $this->searchResultsFactory = $searchResultsFactory;
         $this->attributeFactory = $attributeFactory;
         $this->joinProcessor = $joinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -118,34 +125,23 @@ class AttributeRepository implements \Magento\Eav\Api\AttributeRepositoryInterfa
                 []
             );
         }
-        //Add filters from root filter group to the collection
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $attributeCollection);
-        }
-        /** @var SortOrder $sortOrder */
-        foreach ((array)$searchCriteria->getSortOrders() as $sortOrder) {
-            $attributeCollection->addOrder(
-                $sortOrder->getField(),
-                ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-            );
-        }
 
-        $totalCount = $attributeCollection->getSize();
+        $this->collectionProcessor->process($searchCriteria, $attributeCollection);
 
         // Group attributes by id to prevent duplicates with different attribute sets
         $attributeCollection->addAttributeGrouping();
-        $attributeCollection->setCurPage($searchCriteria->getCurrentPage());
-        $attributeCollection->setPageSize($searchCriteria->getPageSize());
 
         $attributes = [];
         /** @var \Magento\Eav\Api\Data\AttributeInterface $attribute */
         foreach ($attributeCollection as $attribute) {
             $attributes[] = $this->get($entityTypeCode, $attribute->getAttributeCode());
         }
+
+        /** @var \Magento\Eav\Api\Data\AttributeSearchResultsInterface $searchResults */
         $searchResults = $this->searchResultsFactory->create();
         $searchResults->setSearchCriteria($searchCriteria);
         $searchResults->setItems($attributes);
-        $searchResults->setTotalCount($totalCount);
+        $searchResults->setTotalCount($attributeCollection->getSize());
         return $searchResults;
     }
 
@@ -195,28 +191,18 @@ class AttributeRepository implements \Magento\Eav\Api\AttributeRepositoryInterfa
     }
 
     /**
-     * Helper function that adds a FilterGroup to the collection.
+     * Retrieve collection processor
      *
-     * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
-     * @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection $collection
-     * @return void
-     * @throws \Magento\Framework\Exception\InputException
+     * @deprecated
+     * @return CollectionProcessorInterface
      */
-    private function addFilterGroupToCollection(
-        \Magento\Framework\Api\Search\FilterGroup $filterGroup,
-        Collection $collection
-    ) {
-        foreach ($filterGroup->getFilters() as $filter) {
-            $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-            $field = $filter->getField();
-            // Prevent ambiguity during filtration
-            if ($field == \Magento\Eav\Api\Data\AttributeInterface::ATTRIBUTE_ID) {
-                $field = 'main_table.' . $field;
-            }
-            $collection->addFieldToFilter(
-                $field,
-                [$condition => $filter->getValue()]
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                CollectionProcessor::class
             );
         }
+        return $this->collectionProcessor;
     }
 }
diff --git a/app/code/Magento/Eav/Model/AttributeSetRepository.php b/app/code/Magento/Eav/Model/AttributeSetRepository.php
index 622bd0e49bc1f101947ff049a3959f9ab26b7204..f1c713738403939793d9437836d2075f7878aa89 100644
--- a/app/code/Magento/Eav/Model/AttributeSetRepository.php
+++ b/app/code/Magento/Eav/Model/AttributeSetRepository.php
@@ -12,6 +12,7 @@ use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet;
 use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
 use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set as AttributeSetResource;
 use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Exception\CouldNotDeleteException;
 use Magento\Framework\Exception\CouldNotSaveException;
 use Magento\Framework\Exception\NoSuchEntityException;
@@ -51,6 +52,11 @@ class AttributeSetRepository implements AttributeSetRepositoryInterface
      */
     protected $joinProcessor;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param AttributeSetResource $attributeSetResource
      * @param AttributeSetFactory $attributeSetFactory
@@ -58,6 +64,7 @@ class AttributeSetRepository implements AttributeSetRepositoryInterface
      * @param Config $eavConfig
      * @param \Magento\Eav\Api\Data\AttributeSetSearchResultsInterfaceFactory $searchResultFactory
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      * @codeCoverageIgnore
      */
     public function __construct(
@@ -66,7 +73,8 @@ class AttributeSetRepository implements AttributeSetRepositoryInterface
         CollectionFactory $collectionFactory,
         EavConfig $eavConfig,
         \Magento\Eav\Api\Data\AttributeSetSearchResultsInterfaceFactory $searchResultFactory,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->attributeSetResource = $attributeSetResource;
         $this->attributeSetFactory = $attributeSetFactory;
@@ -74,6 +82,7 @@ class AttributeSetRepository implements AttributeSetRepositoryInterface
         $this->eavConfig = $eavConfig;
         $this->searchResultsFactory = $searchResultFactory;
         $this->joinProcessor = $joinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -98,16 +107,9 @@ class AttributeSetRepository implements AttributeSetRepositoryInterface
         $collection = $this->collectionFactory->create();
         $this->joinProcessor->process($collection);
 
-        /** The only possible/meaningful search criteria for attribute set is entity type code */
-        $entityTypeCode = $this->getEntityTypeCode($searchCriteria);
-
-        if ($entityTypeCode !== null) {
-            $collection->setEntityTypeFilter($this->eavConfig->getEntityType($entityTypeCode)->getId());
-        }
-
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
+        $this->collectionProcessor->process($searchCriteria, $collection);
 
+        /** @var \Magento\Eav\Api\Data\AttributeSetSearchResultsInterface $searchResults */
         $searchResults = $this->searchResultsFactory->create();
         $searchResults->setSearchCriteria($searchCriteria);
         $searchResults->setItems($collection->getItems());
@@ -118,6 +120,7 @@ class AttributeSetRepository implements AttributeSetRepositoryInterface
     /**
      * Retrieve entity type code from search criteria
      *
+     * @deprecated
      * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
      * @return null|string
      */
@@ -170,4 +173,20 @@ class AttributeSetRepository implements AttributeSetRepositoryInterface
     {
         return $this->delete($this->get($attributeSetId));
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Eav\Model\Api\SearchCriteria\AttributeSetCollectionProcessor'
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute.php b/app/code/Magento/Eav/Model/Entity/Attribute.php
index 528dee5f23991537bc8d5fe28f21819c7fe8d40f..b9ae0103ca97a92eefaa609eb6af2a9da1d5723e 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute.php
@@ -498,6 +498,7 @@ class Attribute extends \Magento\Eav\Model\Entity\Attribute\AbstractAttribute im
      */
     public function __sleep()
     {
+        $this->unsetData('attribute_set_info');
         return array_diff(
             parent::__sleep(),
             ['_localeDate', '_localeResolver', 'reservedAttributeList', 'dateTimeFormatter']
diff --git a/app/code/Magento/Eav/Model/Entity/AttributeLoader.php b/app/code/Magento/Eav/Model/Entity/AttributeLoader.php
index 0cac11516d57a71f7d99ec8bf0463856e9f68770..456f041dba53a251309ea4fc03a9c4ac17ead9bc 100644
--- a/app/code/Magento/Eav/Model/Entity/AttributeLoader.php
+++ b/app/code/Magento/Eav/Model/Entity/AttributeLoader.php
@@ -64,17 +64,32 @@ class AttributeLoader implements AttributeLoaderInterface
      */
     public function loadAllAttributes(AbstractEntity $resource, DataObject $object = null)
     {
+        $suffix = $this->getLoadAllAttributesCacheSuffix($object);
+
         $typeCode = $resource->getEntityType()->getEntityTypeCode();
-        $attributes = $this->cache->getAttributes($typeCode);
+        $attributes = $this->cache->getAttributes($typeCode, $suffix);
         if ($attributes) {
             foreach ($attributes as $attribute) {
                 $resource->addAttribute($attribute);
             }
             return $resource;
         }
+        $attributes = $this->checkAndInitAttributes($resource, $object);
 
+        $this->cache->saveAttributes($typeCode, $attributes, $suffix);
+        return $resource;
+    }
+
+    /**
+     * @param AbstractEntity $resource
+     * @param DataObject|null $object
+     * @return array
+     */
+    private function checkAndInitAttributes(AbstractEntity $resource, DataObject $object = null)
+    {
         $attributeCodes = $this->config->getEntityAttributeCodes($resource->getEntityType(), $object);
         $attributes = [];
+
         /**
          * Check and init default attributes
          */
@@ -95,8 +110,23 @@ class AttributeLoader implements AttributeLoaderInterface
             $attribute = $resource->getAttribute($code);
             $attributes[] = $attribute;
         }
-        $this->cache->saveAttributes($typeCode, $attributes);
-        return $resource;
+        return $attributes;
+    }
+
+    /**
+     * @param DataObject|null $object
+     * @return string
+     */
+    private function getLoadAllAttributesCacheSuffix(DataObject $object = null)
+    {
+        $attributeSetId = 0;
+        $storeId = 0;
+        if (null !== $object) {
+            $attributeSetId = $object->getAttributeSetId() ?: $attributeSetId;
+            $storeId = $object->getStoreId() ?: $storeId;
+        }
+        $suffix = $storeId . '-' . $attributeSetId;
+        return $suffix;
     }
 
     /**
diff --git a/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupAttributeSetIdFilterTest.php b/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupAttributeSetIdFilterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..0f3611b7636909b148fb6b8bd06e0d1760e2952c
--- /dev/null
+++ b/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupAttributeSetIdFilterTest.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Test\Unit\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\AttributeGroupAttributeSetIdFilter;
+use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\Collection;
+use Magento\Framework\Api\Filter;
+
+class AttributeGroupAttributeSetIdFilterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var AttributeGroupAttributeSetIdFilter
+     */
+    private $filter;
+
+    protected function setUp()
+    {
+        $this->filter = new AttributeGroupAttributeSetIdFilter();
+    }
+
+    public function testApply()
+    {
+        $filterValue = 'filter_value';
+
+        $filterMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($filterValue);
+
+        $collectionMock = $this->getMockBuilder(Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $collectionMock->expects($this->once())
+            ->method('setAttributeSetFilter')
+            ->with($filterValue)
+            ->willReturnSelf();
+
+        $this->assertTrue($this->filter->apply($filterMock, $collectionMock));
+    }
+}
diff --git a/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupCodeFilterTest.php b/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupCodeFilterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..00937023c34c113bbf79809187aababf1f5c44ce
--- /dev/null
+++ b/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeGroupCodeFilterTest.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Test\Unit\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\AttributeGroupCodeFilter;
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class AttributeGroupCodeFilterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var AttributeGroupCodeFilter
+     */
+    private $filter;
+
+    protected function setUp()
+    {
+        $this->filter = new AttributeGroupCodeFilter();
+    }
+
+    public function testApply()
+    {
+        $filterValue = 'filter_value';
+
+        $filterMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($filterValue);
+
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['addFilter'])
+            ->getMockForAbstractClass();
+        $collectionMock->expects($this->once())
+            ->method('addFilter')
+            ->with('attribute_group_code', $filterValue)
+            ->willReturnSelf();
+
+        $this->assertTrue($this->filter->apply($filterMock, $collectionMock));
+    }
+}
diff --git a/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeSetEntityTypeCodeFilterTest.php b/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeSetEntityTypeCodeFilterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..7bc9706b324c211e7c98e12980da62be9fde275a
--- /dev/null
+++ b/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/AttributeSetEntityTypeCodeFilterTest.php
@@ -0,0 +1,69 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Test\Unit\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\AttributeSetEntityTypeCodeFilter;
+use Magento\Eav\Model\Config;
+use Magento\Eav\Model\Entity\Type;
+use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection;
+use Magento\Framework\Api\Filter;
+
+class AttributeSetEntityTypeCodeFilterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var AttributeSetEntityTypeCodeFilter
+     */
+    private $filter;
+
+    /**
+     * @var Config|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $eavConfig;
+
+    protected function setUp()
+    {
+        $this->eavConfig = $this->getMockBuilder(Config::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->filter = new AttributeSetEntityTypeCodeFilter($this->eavConfig);
+    }
+
+    public function testApply()
+    {
+        $filterValue = 'filter_value';
+        $entityTypeId = 1;
+
+        $entityTypeMock = $this->getMockBuilder(Type::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $entityTypeMock->expects($this->once())
+            ->method('getId')
+            ->willReturn($entityTypeId);
+
+        $this->eavConfig->expects($this->once())
+            ->method('getEntityType')
+            ->with($filterValue)
+            ->willReturn($entityTypeMock);
+
+        $filterMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($filterValue);
+
+        $collectionMock = $this->getMockBuilder(Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $collectionMock->expects($this->once())
+            ->method('setEntityTypeFilter')
+            ->with($entityTypeId)
+            ->willReturnSelf();
+
+        $this->assertTrue($this->filter->apply($filterMock, $collectionMock));
+    }
+}
diff --git a/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessorTest.php b/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..06f618ab470d5f50b0c9f8cb9469e6bb27e21659
--- /dev/null
+++ b/app/code/Magento/Eav/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessorTest.php
@@ -0,0 +1,200 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Test\Unit\Model\Api\SearchCriteria\CollectionProcessor;
+
+use Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class FilterProcessorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Return model
+     *
+     * @param CustomFilterInterface[] $customFilters
+     * @param array $fieldMapping
+     * @return FilterProcessor
+     */
+    private function getModel(array $customFilters, array $fieldMapping)
+    {
+        return new FilterProcessor($customFilters, $fieldMapping);
+    }
+
+    /**
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
+     */
+    public function testProcess()
+    {
+        /** @var CustomFilterInterface|\PHPUnit_Framework_MockObject_MockObject $customFilterMock */
+        $customFilterMock = $this->getMockBuilder(CustomFilterInterface::class)
+            ->getMock();
+
+        $customFilterField = 'customFilterField';
+        $customFilters = [$customFilterField => $customFilterMock];
+
+        $otherFilterField = 'otherFilterField';
+        $otherFilterFieldMapped = 'otherFilterFieldMapped';
+        $fieldMapping = [$otherFilterField => $otherFilterFieldMapped];
+        $otherFilterFieldValue = 'otherFilterFieldValue';
+        $otherFilterFieldCondition = 'gt';
+
+        $thirdField = 'thirdField';
+        $thirdFieldValue = 'thirdFieldValue';
+        $thirdFieldCondition = '';
+
+        $resultOne = [
+            [
+                'attribute' => $otherFilterFieldMapped,
+                $otherFilterFieldCondition => $otherFilterFieldValue,
+            ],
+        ];
+        $resultTwo = [
+            [
+                'attribute' => $thirdField,
+                'eq' => $thirdFieldValue,
+            ],
+        ];
+
+        $model = $this->getModel($customFilters, $fieldMapping);
+
+        /** @var FilterGroup|\PHPUnit_Framework_MockObject_MockObject $filterGroupOneMock */
+        $filterGroupOneMock = $this->getMockBuilder(FilterGroup::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        /** @var FilterGroup|\PHPUnit_Framework_MockObject_MockObject $filterGroupTwoMock */
+        $filterGroupTwoMock = $this->getMockBuilder(FilterGroup::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterOneMock */
+        $filterOneMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterOneMock->expects($this->once())
+            ->method('getField')
+            ->willReturn($customFilterField);
+
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterTwoMock */
+        $filterTwoMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterTwoMock->expects($this->exactly(2))
+            ->method('getField')
+            ->willReturn($otherFilterField);
+        $filterTwoMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($otherFilterFieldValue);
+        $filterTwoMock->expects($this->exactly(2))
+            ->method('getConditionType')
+            ->willReturn($otherFilterFieldCondition);
+
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterThreeMock */
+        $filterThreeMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterThreeMock->expects($this->exactly(2))
+            ->method('getField')
+            ->willReturn($thirdField);
+        $filterThreeMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($thirdFieldValue);
+        $filterThreeMock->expects($this->once())
+            ->method('getConditionType')
+            ->willReturn($thirdFieldCondition);
+
+        $filterGroupOneMock->expects($this->once())
+            ->method('getFilters')
+            ->willReturn([$filterOneMock, $filterTwoMock]);
+
+        $filterGroupTwoMock->expects($this->once())
+            ->method('getFilters')
+            ->willReturn([$filterThreeMock]);
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        $searchCriteriaMock->expects($this->once())
+            ->method('getFilterGroups')
+            ->willReturn([$filterGroupOneMock, $filterGroupTwoMock]);
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $customFilterMock->expects($this->once())
+            ->method('apply')
+            ->with($filterOneMock, $collectionMock)
+            ->willReturn(true);
+
+        $collectionMock->expects($this->exactly(2))
+            ->method('addFieldToFilter')
+            ->withConsecutive(
+                [$resultOne],
+                [$resultTwo]
+            )->willReturnSelf();
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testProcessWithException()
+    {
+        /** @var \stdClass|\PHPUnit_Framework_MockObject_MockObject $customFilterMock */
+        $customFilterMock = $this->getMockBuilder(\stdClass::class)
+            ->getMock();
+
+        $customFilterField = 'customFilterField';
+        $customFilters = [$customFilterField => $customFilterMock];
+
+        $model = $this->getModel($customFilters, []);
+
+        /** @var FilterGroup|\PHPUnit_Framework_MockObject_MockObject $filterGroupOneMock */
+        $filterGroupOneMock = $this->getMockBuilder(FilterGroup::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterOneMock */
+        $filterOneMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterOneMock->expects($this->once())
+            ->method('getField')
+            ->willReturn($customFilterField);
+
+        $filterGroupOneMock->expects($this->once())
+            ->method('getFilters')
+            ->willReturn([$filterOneMock]);
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        $searchCriteriaMock->expects($this->once())
+            ->method('getFilterGroups')
+            ->willReturn([$filterGroupOneMock]);
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $customFilterMock->expects($this->never())
+            ->method('apply');
+
+        $collectionMock->expects($this->never())
+            ->method('addFieldToFilter');
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+}
diff --git a/app/code/Magento/Eav/Test/Unit/Model/Attribute/GroupRepositoryTest.php b/app/code/Magento/Eav/Test/Unit/Model/Attribute/GroupRepositoryTest.php
index 4a30ba9e1f1848db264b2aa9fe2045b408f46900..2d9eb22cfd976a545138908ac502aebabb0020c0 100644
--- a/app/code/Magento/Eav/Test/Unit/Model/Attribute/GroupRepositoryTest.php
+++ b/app/code/Magento/Eav/Test/Unit/Model/Attribute/GroupRepositoryTest.php
@@ -5,6 +5,8 @@
  */
 namespace Magento\Eav\Test\Unit\Model\Attribute;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -40,6 +42,11 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $groupListFactoryMock;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * SetUp method
      *
@@ -77,6 +84,9 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
             false
         );
 
+        $this->collectionProcessor = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMockForAbstractClass();
+
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
         $this->model = $objectManager->getObject(
             \Magento\Eav\Model\Attribute\GroupRepository::class,
@@ -85,7 +95,8 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
                 'groupListFactory' => $this->groupListFactoryMock,
                 'groupFactory' => $this->groupFactoryMock,
                 'setRepository' => $this->setRepositoryMock,
-                'searchResultsFactory' => $this->searchResultsFactoryMock
+                'searchResultsFactory' => $this->searchResultsFactoryMock,
+                'collectionProcessor' => $this->collectionProcessor
             ]
         );
     }
@@ -274,34 +285,50 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
     public function testGetList()
     {
         $attributeSetId = 'filter';
-        $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class);
-        $filterGroupMock = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filterInterfaceMock = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
-        $attributeSetMock = $this->getMock(\Magento\Eav\Api\Data\AttributeSetInterface::class);
-        $groupMock = $this->getMock(\Magento\Eav\Model\Entity\Attribute\Group::class, [], [], '', false);
+
+        $filterInterfaceMock = $this->getMockBuilder(\Magento\Framework\Api\Search\FilterGroup::class)
+            ->disableOriginalConstructor()
+            ->setMethods([
+                'getField',
+                'getValue',
+            ])
+            ->getMock();
+        $filterInterfaceMock->expects($this->once())
+            ->method('getField')
+            ->willReturn('attribute_set_id');
+        $filterInterfaceMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($attributeSetId);
+
+        $filterGroupMock = $this->getMockBuilder(\Magento\Framework\Api\Search\FilterGroup::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterGroupMock->expects($this->once())
+            ->method('getFilters')
+            ->willReturn([$filterInterfaceMock]);
+
+        $searchCriteriaMock = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $searchCriteriaMock->expects($this->once())
+            ->method('getFilterGroups')
+            ->willReturn([$filterGroupMock]);
+
+        $groupMock = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute\Group::class)
+            ->disableOriginalConstructor()
+            ->getMock();
 
         $groupCollectionMock = $this->getMock(
             \Magento\Eav\Model\Entity\Collection\AbstractCollection::class,
-            ['setAttributeSetFilter', 'setSortOrder', 'getItems', 'getSize'],
+            ['getItems', 'getSize'],
             [],
             '',
             false
         );
         $groupCollectionMock->expects($this->once())->method('getItems')->willReturn([$groupMock]);
-        $searchCriteriaMock->expects($this->exactly(2))->method('getFilterGroups')->willReturn([$filterGroupMock]);
-
-        $filterGroupMock->expects($this->exactly(2))->method('getFilters')->willReturn([$filterInterfaceMock]);
-        $filterInterfaceMock->expects($this->exactly(2))->method('getField')->willReturn('attribute_set_id');
-        $filterInterfaceMock->expects($this->once())->method('getValue')->willReturn($attributeSetId);
 
-        $this->setRepositoryMock->expects($this->once())
-            ->method('get')
-            ->with($attributeSetId)
-            ->willReturn($attributeSetMock);
         $this->groupListFactoryMock->expects($this->once())->method('create')->willReturn($groupCollectionMock);
 
-        $groupCollectionMock->expects($this->once())->method('setAttributeSetFilter')->with($attributeSetId);
-        $groupCollectionMock->expects($this->once())->method('setSortOrder');
         $groupCollectionMock->expects($this->once())->method('getSize')->willReturn(1);
 
         $searchResultsMock = $this->getMock(
@@ -315,6 +342,12 @@ class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
         $searchResultsMock->expects($this->once())->method('setItems')->with([$groupMock]);
         $searchResultsMock->expects($this->once())->method('setTotalCount')->with(1);
         $this->searchResultsFactoryMock->expects($this->once())->method('create')->willReturn($searchResultsMock);
+
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $groupCollectionMock)
+            ->willReturnSelf();
+
         $this->assertEquals($searchResultsMock, $this->model->getList($searchCriteriaMock));
     }
 
diff --git a/app/code/Magento/Eav/Test/Unit/Model/AttributeRepositoryTest.php b/app/code/Magento/Eav/Test/Unit/Model/AttributeRepositoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d90363e40bf58358532e1bc74afbbe74429ab225
--- /dev/null
+++ b/app/code/Magento/Eav/Test/Unit/Model/AttributeRepositoryTest.php
@@ -0,0 +1,269 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Test\Unit\Model;
+
+use Magento\Eav\Api\Data\AttributeSearchResultsInterfaceFactory;
+use Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection;
+use Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory;
+use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class AttributeRepositoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Eav\Model\Config|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $eavConfig;
+
+    /**
+     * @var \Magento\Eav\Model\ResourceModel\Entity\Attribute|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $eavResource;
+
+    /**
+     * @var CollectionFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $attributeCollectionFactory;
+
+    /**
+     * @var AttributeSearchResultsInterfaceFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $searchResultsFactory;
+
+    /**
+     * @var \Magento\Eav\Model\Entity\AttributeFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $attributeFactory;
+
+    /**
+     * @var JoinProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $joinProcessor;
+
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
+    /**
+     * @var \Magento\Eav\Model\AttributeRepository
+     */
+    private $model;
+
+    protected function setUp()
+    {
+        $this->eavConfig = $this->getMockBuilder(\Magento\Eav\Model\Config::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->eavResource = $this->getMockBuilder(\Magento\Eav\Model\ResourceModel\Entity\Attribute::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->attributeCollectionFactory = $this->getMockBuilder(CollectionFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+
+        $this->searchResultsFactory = $this->getMockBuilder(AttributeSearchResultsInterfaceFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+
+        $this->attributeFactory = $this->getMockBuilder(\Magento\Eav\Model\Entity\AttributeFactory::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->joinProcessor = $this->getMockBuilder(JoinProcessorInterface::class)
+            ->getMockForAbstractClass();
+
+        $this->collectionProcessor = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMockForAbstractClass();
+
+        $this->model = new \Magento\Eav\Model\AttributeRepository(
+            $this->eavConfig,
+            $this->eavResource,
+            $this->attributeCollectionFactory,
+            $this->searchResultsFactory,
+            $this->attributeFactory,
+            $this->joinProcessor,
+            $this->collectionProcessor
+        );
+    }
+
+    /**
+     * @expectedException \Magento\Framework\Exception\InputException
+     * @expectedExceptionMessage entity_type_code is a required field.
+     */
+    public function testGetListInputException()
+    {
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMockForAbstractClass();
+
+        $this->model->getList(null, $searchCriteriaMock);
+    }
+
+    /**
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
+     */
+    public function testGetList()
+    {
+        $entityTypeCode = 'entity_type_code';
+        $eavEntityTypeTable = 'eav_entity_type_table';
+        $eavEntityAttributeTable = 'eav_entity_attribute_table';
+        $additionalTable = 'additional_table';
+        $attributeCode = 'attribute_code';
+        $attributeId = 1;
+        $collectionSize = 1;
+
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMockForAbstractClass();
+
+        $attributeMock = $this->createAttributeMock($attributeCode, $attributeId);
+
+        $attributeCollectionMock = $this->getMockBuilder(Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $attributeCollectionMock->expects($this->once())
+            ->method('addFieldToFilter')
+            ->with('entity_type_code', ['eq' => $entityTypeCode])
+            ->willReturnSelf();
+        $attributeCollectionMock->expects($this->exactly(3))
+            ->method('getTable')
+            ->willReturnMap([
+                ['eav_entity_type', $eavEntityTypeTable],
+                ['eav_entity_attribute', $eavEntityAttributeTable],
+                [$additionalTable, $additionalTable],
+            ]);
+        $attributeCollectionMock->expects($this->exactly(2))
+            ->method('join')
+            ->willReturnMap([
+                [
+                    ['entity_type' => $eavEntityTypeTable],
+                    'main_table.entity_type_id = entity_type.entity_type_id',
+                    []
+                ],
+                [
+                    ['additional_table' => $additionalTable],
+                    'main_table.attribute_id = additional_table.attribute_id',
+                    []
+                ]
+            ]);
+        $attributeCollectionMock->expects($this->once())
+            ->method('joinLeft')
+            ->with(
+                ['eav_entity_attribute' => $eavEntityAttributeTable],
+                'main_table.attribute_id = eav_entity_attribute.attribute_id',
+                []
+            )
+            ->willReturnSelf();
+        $attributeCollectionMock->expects($this->once())
+            ->method('addAttributeGrouping')
+            ->willReturnSelf();
+        $attributeCollectionMock->expects($this->once())
+            ->method('getIterator')
+            ->willReturn(new \ArrayIterator([$attributeMock]));
+        $attributeCollectionMock->expects($this->once())
+            ->method('getSize')
+            ->willReturn($collectionSize);
+
+        $this->attributeCollectionFactory->expects($this->once())
+            ->method('create')
+            ->willReturn($attributeCollectionMock);
+
+        $this->joinProcessor->expects($this->once())
+            ->method('process')
+            ->with($attributeCollectionMock)
+            ->willReturnSelf();
+
+        $entityTypeMock = $this->getMockBuilder(\Magento\Eav\Model\Entity\Type::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getAdditionalAttributeTable'])
+            ->getMock();
+        $entityTypeMock->expects($this->once())
+            ->method('getAdditionalAttributeTable')
+            ->willReturn($additionalTable);
+
+        $this->eavConfig->expects($this->once())
+            ->method('getEntityType')
+            ->with($entityTypeCode)
+            ->willReturn($entityTypeMock);
+        $this->eavConfig->expects($this->once())
+            ->method('getAttribute')
+            ->with($entityTypeCode, $attributeCode)
+            ->willReturn($attributeMock);
+
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $attributeCollectionMock)
+            ->willReturnSelf();
+
+        $searchResultsMock = $this->createSearchResultsMock($searchCriteriaMock, $attributeMock, $collectionSize);
+
+        $this->searchResultsFactory->expects($this->once())
+            ->method('create')
+            ->willReturn($searchResultsMock);
+
+        $this->assertEquals($searchResultsMock, $this->model->getList($entityTypeCode, $searchCriteriaMock));
+    }
+
+    /**
+     * @param \PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock
+     * @param \PHPUnit_Framework_MockObject_MockObject $attributeMock
+     * @param int $collectionSize
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected function createSearchResultsMock($searchCriteriaMock, $attributeMock, $collectionSize)
+    {
+        /** @var \PHPUnit_Framework_MockObject_MockObject $searchResultsMock */
+        $searchResultsMock = $this->getMockBuilder(\Magento\Eav\Api\Data\AttributeSearchResultsInterface::class)
+            ->getMockForAbstractClass();
+
+        $searchResultsMock->expects($this->once())
+            ->method('setSearchCriteria')
+            ->with($searchCriteriaMock)
+            ->willReturnSelf();
+        $searchResultsMock->expects($this->once())
+            ->method('setItems')
+            ->with([$attributeMock])
+            ->willReturnSelf();
+        $searchResultsMock->expects($this->once())
+            ->method('setTotalCount')
+            ->with($collectionSize)
+            ->willReturnSelf();
+
+        return $searchResultsMock;
+    }
+
+    /**
+     * @param string $attributeCode
+     * @param int $attributeId
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected function createAttributeMock($attributeCode, $attributeId)
+    {
+        /** @var \PHPUnit_Framework_MockObject_MockObject $attributeMock */
+        $attributeMock = $this->getMockBuilder(\Magento\Eav\Api\Data\AttributeInterface::class)
+            ->setMethods([
+                'getAttributeCode',
+                'getAttributeId',
+            ])
+            ->getMockForAbstractClass();
+
+        $attributeMock->expects($this->once())
+            ->method('getAttributeCode')
+            ->willReturn($attributeCode);
+        $attributeMock->expects($this->once())
+            ->method('getAttributeId')
+            ->willReturn($attributeId);
+
+        return $attributeMock;
+    }
+}
diff --git a/app/code/Magento/Eav/Test/Unit/Model/AttributeSetRepositoryTest.php b/app/code/Magento/Eav/Test/Unit/Model/AttributeSetRepositoryTest.php
index 244c620fac8997a34ca6d0fd49e2a5230de5b718..b2d209261612adc6c6cffd59b04c038602054cad 100644
--- a/app/code/Magento/Eav/Test/Unit/Model/AttributeSetRepositoryTest.php
+++ b/app/code/Magento/Eav/Test/Unit/Model/AttributeSetRepositoryTest.php
@@ -6,6 +6,7 @@
 namespace Magento\Eav\Test\Unit\Model;
 
 use Magento\Eav\Model\AttributeSetRepository;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 
 /**
  * @SuppressWarnings(PHPMD.LongVariable)
@@ -48,6 +49,11 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     private $extensionAttributesJoinProcessorMock;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * @return void
      */
@@ -89,13 +95,18 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
+
+        $this->collectionProcessor = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMockForAbstractClass();
+
         $this->model = new \Magento\Eav\Model\AttributeSetRepository(
             $this->resourceMock,
             $this->setFactoryMock,
             $this->collectionFactoryMock,
             $this->eavConfigMock,
             $this->resultFactoryMock,
-            $this->extensionAttributesJoinProcessorMock
+            $this->extensionAttributesJoinProcessorMock,
+            $this->collectionProcessor
         );
     }
 
@@ -207,58 +218,30 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetList()
     {
-        $entityTypeCode = 'entity_type_code_value';
-        $entityTypeId = 41;
-
-        $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class);
-
-        $filterGroupMock = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroupMock]);
-
-        $filterMock = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
-        $filterGroupMock->expects($this->once())->method('getFilters')->willReturn([$filterMock]);
-
-        $filterMock->expects($this->once())->method('getField')->willReturn('entity_type_code');
-        $filterMock->expects($this->once())->method('getValue')->willReturn($entityTypeCode);
-
-        $collectionMock = $this->getMock(
-            \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection::class,
-            ['setEntityTypeFilter', 'setCurPage', 'setPageSize', 'getItems', 'getSize'],
-            [],
-            '',
-            false
-        );
+        $attributeSetMock = $this->getMock(\Magento\Eav\Model\Entity\Attribute\Set::class, [], [], '', false);
 
-        $entityTypeMock = $this->getMock(\Magento\Eav\Model\Entity\Type::class, [], [], '', false);
-        $entityTypeMock->expects($this->once())->method('getId')->willReturn($entityTypeId);
-        $this->eavConfigMock->expects($this->once())
-            ->method('getEntityType')
-            ->with($entityTypeCode)
-            ->willReturn($entityTypeMock);
+        $collectionMock = $this->getMockBuilder(\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection::class)
+            ->disableOriginalConstructor()
+            ->setMethods([
+                'getItems',
+                'getSize',
+            ])
+            ->getMock();
 
-        $this->collectionFactoryMock->expects($this->once())->method('create')->willReturn($collectionMock);
         $collectionMock->expects($this->once())
-            ->method('setEntityTypeFilter')
-            ->with($entityTypeId)
-            ->willReturnSelf();
+            ->method('getItems')
+            ->willReturn([$attributeSetMock]);
+        $collectionMock->expects($this->once())
+            ->method('getSize')
+            ->willReturn(1);
 
-        $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->willReturn(1);
-        $searchCriteriaMock->expects($this->once())->method('getPageSize')->willReturn(10);
+        $this->collectionFactoryMock->expects($this->once())->method('create')->willReturn($collectionMock);
 
-        $collectionMock->expects($this->once())->method('setCurPage')->with(1)->willReturnSelf();
-        $collectionMock->expects($this->once())->method('setPageSize')->with(10)->willReturnSelf();
+        $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class);
 
-        $attributeSetMock = $this->getMock(\Magento\Eav\Model\Entity\Attribute\Set::class, [], [], '', false);
-        $collectionMock->expects($this->once())->method('getItems')->willReturn([$attributeSetMock]);
-        $collectionMock->expects($this->once())->method('getSize')->willReturn(1);
+        $resultMock = $this->getMockBuilder(\Magento\Eav\Api\Data\AttributeSetSearchResultsInterface::class)
+            ->getMockForAbstractClass();
 
-        $resultMock = $this->getMock(
-            \Magento\Eav\Api\Data\AttributeSetSearchResultsInterface::class,
-            [],
-            [],
-            '',
-            false
-        );
         $resultMock->expects($this->once())
             ->method('setSearchCriteria')
             ->with($searchCriteriaMock)
@@ -267,9 +250,19 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase
             ->method('setItems')
             ->with([$attributeSetMock])
             ->willReturnSelf();
-        $resultMock->expects($this->once())->method('setTotalCount')->with(1)->willReturnSelf();
+        $resultMock->expects($this->once())
+            ->method('setTotalCount')
+            ->with(1)
+            ->willReturnSelf();
 
-        $this->resultFactoryMock->expects($this->once())->method('create')->willReturn($resultMock);
+        $this->resultFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($resultMock);
+
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock)
+            ->willReturnSelf();
 
         $this->model->getList($searchCriteriaMock);
     }
@@ -279,36 +272,32 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetListIfEntityTypeCodeIsNull()
     {
-        $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class);
-        $searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([]);
+        $attributeSetMock = $this->getMock(\Magento\Eav\Model\Entity\Attribute\Set::class, [], [], '', false);
 
-        $collectionMock = $this->getMock(
-            \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection::class,
-            ['setCurPage', 'setPageSize', 'getItems', 'getSize'],
-            [],
-            '',
-            false
-        );
+        $collectionMock = $this->getMockBuilder(\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection::class)
+            ->disableOriginalConstructor()
+            ->setMethods([
+                'getItems',
+                'getSize',
+            ])
+            ->getMock();
 
-        $this->collectionFactoryMock->expects($this->once())->method('create')->willReturn($collectionMock);
+        $collectionMock->expects($this->once())
+            ->method('getItems')
+            ->willReturn([$attributeSetMock]);
+        $collectionMock->expects($this->once())
+            ->method('getSize')
+            ->willReturn(1);
 
-        $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->willReturn(1);
-        $searchCriteriaMock->expects($this->once())->method('getPageSize')->willReturn(10);
+        $this->collectionFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($collectionMock);
 
-        $collectionMock->expects($this->once())->method('setCurPage')->with(1)->willReturnSelf();
-        $collectionMock->expects($this->once())->method('setPageSize')->with(10)->willReturnSelf();
+        $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class);
 
-        $attributeSetMock = $this->getMock(\Magento\Eav\Model\Entity\Attribute\Set::class, [], [], '', false);
-        $collectionMock->expects($this->once())->method('getItems')->willReturn([$attributeSetMock]);
-        $collectionMock->expects($this->once())->method('getSize')->willReturn(1);
+        $resultMock = $this->getMockBuilder(\Magento\Eav\Api\Data\AttributeSetSearchResultsInterface::class)
+            ->getMockForAbstractClass();
 
-        $resultMock = $this->getMock(
-            \Magento\Eav\Api\Data\AttributeSetSearchResultsInterface::class,
-            [],
-            [],
-            '',
-            false
-        );
         $resultMock->expects($this->once())
             ->method('setSearchCriteria')
             ->with($searchCriteriaMock)
@@ -317,9 +306,19 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase
             ->method('setItems')
             ->with([$attributeSetMock])
             ->willReturnSelf();
-        $resultMock->expects($this->once())->method('setTotalCount')->with(1)->willReturnSelf();
+        $resultMock->expects($this->once())
+            ->method('setTotalCount')
+            ->with(1)
+            ->willReturnSelf();
+
+        $this->resultFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($resultMock);
 
-        $this->resultFactoryMock->expects($this->once())->method('create')->willReturn($resultMock);
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock)
+            ->willReturnSelf();
 
         $this->model->getList($searchCriteriaMock);
     }
diff --git a/app/code/Magento/Eav/etc/di.xml b/app/code/Magento/Eav/etc/di.xml
index ae230ca193a98cfb35c9cfaf57546276ec53351c..49d6753bc48da61320c1a209b82bdfd18bf834ce 100644
--- a/app/code/Magento/Eav/etc/di.xml
+++ b/app/code/Magento/Eav/etc/di.xml
@@ -82,5 +82,75 @@
     <type name="Magento\Eav\Model\Entity\AbstractEntity">
         <plugin name="clean_cache" type="Magento\Framework\App\Cache\FlushCacheByTags" />
     </type>
+    <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="filters" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <type name="Magento\Eav\Model\AttributeRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor</argument>
+        </arguments>
+    </type>
+    <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeSetFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
+        <arguments>
+            <argument name="customFilters" xsi:type="array">
+                <item name="entity_type_code" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\AttributeSetEntityTypeCodeFilter</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Eav\Model\Api\SearchCriteria\AttributeSetCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="filters" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeSetFilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <type name="Magento\Eav\Model\AttributeSetRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\AttributeSetCollectionProcessor</argument>
+        </arguments>
+    </type>
+    <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeGroupFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
+        <arguments>
+            <argument name="fieldMapping" xsi:type="array">
+                <item name="attribute_group_code" xsi:type="string">main_table.attribute_group_code</item>
+            </argument>
+            <argument name="customFilters" xsi:type="array">
+                <item name="attribute_set_id" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\AttributeGroupAttributeSetIdFilter</item>
+                <item name="attribute_group_code" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\FilterProcessor\AttributeGroupCodeFilter</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeGroupSortingProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor">
+        <arguments>
+            <argument name="fieldMapping" xsi:type="array">
+                <item name="attribute_group_code" xsi:type="string">main_table.attribute_group_code</item>
+            </argument>
+            <argument name="defaultOrders" xsi:type="array">
+                <item name="sort_order" xsi:type="string">ASC</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Eav\Model\Api\SearchCriteria\AttributeGroupCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="filters" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeGroupFilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor\AttributeGroupSortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <type name="Magento\Eav\Model\Attribute\GroupRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\AttributeGroupCollectionProcessor</argument>
+        </arguments>
+    </type>
 </config>
 
diff --git a/app/code/Magento/Fedex/Model/Carrier.php b/app/code/Magento/Fedex/Model/Carrier.php
index 4f8aae4962db7536652e930a92c4719cf5f9ba19..3fe23389ea75baf8c5dfdaac2fab74ff48bf4ae4 100644
--- a/app/code/Magento/Fedex/Model/Carrier.php
+++ b/app/code/Magento/Fedex/Model/Carrier.php
@@ -126,6 +126,18 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
         'Key', 'Password', 'MeterNumber',
     ];
 
+    /**
+     * Version of tracking service
+     * @var int
+     */
+    private static $trackServiceVersion = 10;
+
+    /**
+     * List of TrackReply errors
+     * @var array
+     */
+    private static $trackingErrors = ['FAILURE', 'ERROR'];
+
     /**
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
@@ -193,7 +205,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
         $wsdlBasePath = $configReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_Fedex') . '/wsdl/';
         $this->_shipServiceWsdl = $wsdlBasePath . 'ShipService_v10.wsdl';
         $this->_rateServiceWsdl = $wsdlBasePath . 'RateService_v10.wsdl';
-        $this->_trackServiceWsdl = $wsdlBasePath . 'TrackService_v5.wsdl';
+        $this->_trackServiceWsdl = $wsdlBasePath . 'TrackService_v' . self::$trackServiceVersion . '.wsdl';
     }
 
     /**
@@ -371,6 +383,9 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
      */
     public function getResult()
     {
+        if (!$this->_result) {
+            $this->_result = $this->_trackFactory->create();
+        }
         return $this->_result;
     }
 
@@ -646,7 +661,6 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
     {
         $r = $this->_rawRequest;
         $xml = $this->_xmlElFactory->create(
-
             ['data' => '<?xml version = "1.0" encoding = "UTF-8"?><FDXRateAvailableServicesRequest/>']
         );
 
@@ -1035,9 +1049,16 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
                 'AccountNumber' => $this->getConfigData('account'),
                 'MeterNumber' => $this->getConfigData('meter_number'),
             ],
-            'Version' => ['ServiceId' => 'trck', 'Major' => '5', 'Intermediate' => '0', 'Minor' => '0'],
-            'PackageIdentifier' => ['Type' => 'TRACKING_NUMBER_OR_DOORTAG', 'Value' => $tracking],
-            'IncludeDetailedScans' => 1,
+            'Version' => [
+                'ServiceId' => 'trck',
+                'Major' => self::$trackServiceVersion,
+                'Intermediate' => '0',
+                'Minor' => '0',
+            ],
+            'SelectionDetails' => [
+                'PackageIdentifier' => ['Type' => 'TRACKING_NUMBER_OR_DOORTAG', 'Value' => $tracking],
+            ],
+            'ProcessingOptions' => 'INCLUDE_DETAILED_SCANS'
         ];
         $requestString = serialize($trackRequest);
         $response = $this->_getCachedQuotes($requestString);
@@ -1064,114 +1085,48 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
     /**
      * Parse tracking response
      *
-     * @param string[] $trackingValue
+     * @param string $trackingValue
      * @param \stdClass $response
      * @return void
-     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
-     * @SuppressWarnings(PHPMD.NPathComplexity)
-     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
     protected function _parseTrackingResponse($trackingValue, $response)
     {
-        if (is_object($response)) {
-            if ($response->HighestSeverity == 'FAILURE' || $response->HighestSeverity == 'ERROR') {
-                $errorTitle = (string)$response->Notifications->Message;
-            } elseif (isset($response->TrackDetails)) {
-                $trackInfo = $response->TrackDetails;
-                $resultArray['status'] = (string)$trackInfo->StatusDescription;
-                $resultArray['service'] = (string)$trackInfo->ServiceInfo;
-                $timestamp = isset(
-                    $trackInfo->EstimatedDeliveryTimestamp
-                ) ? $trackInfo->EstimatedDeliveryTimestamp : $trackInfo->ActualDeliveryTimestamp;
-                $timestamp = strtotime((string)$timestamp);
-                if ($timestamp) {
-                    $resultArray['deliverydate'] = date('Y-m-d', $timestamp);
-                    $resultArray['deliverytime'] = date('H:i:s', $timestamp);
-                }
-
-                $deliveryLocation = isset(
-                    $trackInfo->EstimatedDeliveryAddress
-                ) ? $trackInfo->EstimatedDeliveryAddress : $trackInfo->ActualDeliveryAddress;
-                $deliveryLocationArray = [];
-                if (isset($deliveryLocation->City)) {
-                    $deliveryLocationArray[] = (string)$deliveryLocation->City;
-                }
-                if (isset($deliveryLocation->StateOrProvinceCode)) {
-                    $deliveryLocationArray[] = (string)$deliveryLocation->StateOrProvinceCode;
-                }
-                if (isset($deliveryLocation->CountryCode)) {
-                    $deliveryLocationArray[] = (string)$deliveryLocation->CountryCode;
-                }
-                if ($deliveryLocationArray) {
-                    $resultArray['deliverylocation'] = implode(', ', $deliveryLocationArray);
-                }
-
-                $resultArray['signedby'] = (string)$trackInfo->DeliverySignatureName;
-                $resultArray['shippeddate'] = date('Y-m-d', (int)$trackInfo->ShipTimestamp);
-                if (isset($trackInfo->PackageWeight) && isset($trackInfo->Units)) {
-                    $weight = (string)$trackInfo->PackageWeight;
-                    $unit = (string)$trackInfo->Units;
-                    $resultArray['weight'] = "{$weight} {$unit}";
-                }
-
-                $packageProgress = [];
-                if (isset($trackInfo->Events)) {
-                    $events = $trackInfo->Events;
-                    if (isset($events->Address)) {
-                        $events = [$events];
-                    }
-                    foreach ($events as $event) {
-                        $tempArray = [];
-                        $tempArray['activity'] = (string)$event->EventDescription;
-                        $timestamp = strtotime((string)$event->Timestamp);
-                        if ($timestamp) {
-                            $tempArray['deliverydate'] = date('Y-m-d', $timestamp);
-                            $tempArray['deliverytime'] = date('H:i:s', $timestamp);
-                        }
-                        if (isset($event->Address)) {
-                            $addressArray = [];
-                            $address = $event->Address;
-                            if (isset($address->City)) {
-                                $addressArray[] = (string)$address->City;
-                            }
-                            if (isset($address->StateOrProvinceCode)) {
-                                $addressArray[] = (string)$address->StateOrProvinceCode;
-                            }
-                            if (isset($address->CountryCode)) {
-                                $addressArray[] = (string)$address->CountryCode;
-                            }
-                            if ($addressArray) {
-                                $tempArray['deliverylocation'] = implode(', ', $addressArray);
-                            }
-                        }
-                        $packageProgress[] = $tempArray;
-                    }
-                }
-
-                $resultArray['progressdetail'] = $packageProgress;
-            }
+        if (!is_object($response) || empty($response->HighestSeverity)) {
+            $this->appendTrackingError($trackingValue, __('Invalid response from carrier'));
+            return;
+        } else if (in_array($response->HighestSeverity, self::$trackingErrors)) {
+            $this->appendTrackingError($trackingValue, (string) $response->Notifications->Message);
+            return;
+        } else if (empty($response->CompletedTrackDetails) || empty($response->CompletedTrackDetails->TrackDetails)) {
+            $this->appendTrackingError($trackingValue, __('No available tracking items'));
+            return;
         }
 
-        if (!$this->_result) {
-            $this->_result = $this->_trackFactory->create();
+        $trackInfo = $response->CompletedTrackDetails->TrackDetails;
+
+        // Fedex can return tracking details as single object instead array
+        if (is_object($trackInfo)) {
+            $trackInfo = [$trackInfo];
         }
 
-        if (isset($resultArray)) {
+        $result = $this->getResult();
+        $carrierTitle = $this->getConfigData('title');
+        $counter = 0;
+        foreach ($trackInfo as $item) {
             $tracking = $this->_trackStatusFactory->create();
-            $tracking->setCarrier('fedex');
-            $tracking->setCarrierTitle($this->getConfigData('title'));
+            $tracking->setCarrier(self::CODE);
+            $tracking->setCarrierTitle($carrierTitle);
             $tracking->setTracking($trackingValue);
-            $tracking->addData($resultArray);
-            $this->_result->append($tracking);
-        } else {
-            $error = $this->_trackErrorFactory->create();
-            $error->setCarrier('fedex');
-            $error->setCarrierTitle($this->getConfigData('title'));
-            $error->setTracking($trackingValue);
-            $error->setErrorMessage(
-                $errorTitle ? $errorTitle : __('For some reason we can\'t retrieve tracking info right now.')
+            $tracking->addData($this->processTrackingDetails($item));
+            $result->append($tracking);
+            $counter ++;
+        }
+
+        // no available tracking details
+        if (!$counter) {
+            $this->appendTrackingError(
+                $trackingValue, __('For some reason we can\'t retrieve tracking info right now.')
             );
-            $this->_result->append($error);
         }
     }
 
@@ -1596,4 +1551,169 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
         }
         return $data;
     }
+
+    /**
+     * Parse track details response from Fedex
+     * @param \stdClass $trackInfo
+     * @return array
+     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
+     * @SuppressWarnings(PHPMD.NPathComplexity)
+     */
+    private function processTrackingDetails(\stdClass $trackInfo)
+    {
+        $result = [
+            'shippeddate' => null,
+            'deliverydate' => null,
+            'deliverytime' => null,
+            'deliverylocation' => null,
+            'weight' => null,
+            'progressdetail' => [],
+        ];
+
+        if (!empty($trackInfo->ShipTimestamp)) {
+            $datetime = \DateTime::createFromFormat(\DateTime::ISO8601, $trackInfo->ShipTimestamp);
+            $result['shippeddate'] = $datetime->format('Y-m-d');
+        }
+
+        $result['signedby'] = !empty($trackInfo->DeliverySignatureName) ?
+            (string) $trackInfo->DeliverySignatureName :
+            null;
+
+        $result['status'] = (!empty($trackInfo->StatusDetail) && !empty($trackInfo->StatusDetail->Description)) ?
+            (string) $trackInfo->StatusDetail->Description :
+            null;
+        $result['service'] = (!empty($trackInfo->Service) && !empty($trackInfo->Service->Description)) ?
+            (string) $trackInfo->Service->Description :
+            null;
+
+        $datetime = $this->getDeliveryDateTime($trackInfo);
+        if ($datetime) {
+            $result['deliverydate'] = $datetime->format('Y-m-d');
+            $result['deliverytime'] = $datetime->format('H:i:s');
+        }
+
+        $address = null;
+        if (!empty($trackInfo->EstimatedDeliveryAddress)) {
+            $address = $trackInfo->EstimatedDeliveryAddress;
+        } elseif (!empty($trackInfo->ActualDeliveryAddress)) {
+            $address = $trackInfo->ActualDeliveryAddress;
+        }
+
+        if (!empty($address)) {
+            $result['deliverylocation'] = $this->getDeliveryAddress($address);
+        }
+
+        if (!empty($trackInfo->PackageWeight)) {
+            $result['weight'] = sprintf(
+                '%s %s',
+                (string) $trackInfo->PackageWeight->Value,
+                (string) $trackInfo->PackageWeight->Units
+            );
+        }
+
+        if (!empty($trackInfo->Events)) {
+            $events = $trackInfo->Events;
+            if (is_object($events)) {
+                $events = [$trackInfo->Events];
+            }
+            $result['progressdetail'] = $this->processTrackDetailsEvents($events);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Parse delivery datetime from tracking details
+     * @param \stdClass $trackInfo
+     * @return \Datetime|null
+     */
+    private function getDeliveryDateTime(\stdClass $trackInfo)
+    {
+        $timestamp = null;
+        if (!empty($trackInfo->EstimatedDeliveryTimestamp)) {
+            $timestamp = $trackInfo->EstimatedDeliveryTimestamp;
+        } elseif (!empty($trackInfo->ActualDeliveryTimestamp)) {
+            $timestamp = $trackInfo->ActualDeliveryTimestamp;
+        }
+
+        return $timestamp ? \DateTime::createFromFormat(\DateTime::ISO8601, $timestamp) : null;
+    }
+
+    /**
+     * Get delivery address details in string representation
+     * Return City, State, Country Code
+     *
+     * @param \stdClass $address
+     * @return \Magento\Framework\Phrase|string
+     */
+    private function getDeliveryAddress(\stdClass $address)
+    {
+        $details = [];
+
+        if (!empty($address->City)) {
+            $details[] = (string) $address->City;
+        }
+
+        if (!empty($address->StateOrProvinceCode)) {
+            $details[] = (string) $address->StateOrProvinceCode;
+        }
+
+        if (!empty($address->CountryCode)) {
+            $details[] = (string) $address->CountryCode;
+        }
+
+        return implode(', ', $details);
+    }
+
+    /**
+     * Parse tracking details events from response
+     * Return list of items in such format:
+     * ['activity', 'deliverydate', 'deliverytime', 'deliverylocation']
+     *
+     * @param array $events
+     * @return array
+     */
+    private function processTrackDetailsEvents(array $events)
+    {
+        $result = [];
+        /** @var \stdClass $event */
+        foreach ($events as $event) {
+            $item = [
+                'activity' => (string) $event->EventDescription,
+                'deliverydate' => null,
+                'deliverytime' => null,
+                'deliverylocation' => null
+            ];
+
+            if (!empty($event->Timestamp)) {
+                $datetime = \DateTime::createFromFormat(\DateTime::ISO8601, $event->Timestamp);
+                $item['deliverydate'] = $datetime->format('Y-m-d');
+                $item['deliverytime'] = $datetime->format('H:i:s');
+            }
+
+            if (!empty($event->Address)) {
+                $item['deliverylocation'] = $this->getDeliveryAddress($event->Address);
+            }
+
+            $result[] = $item;
+        }
+
+        return $result;
+    }
+
+    /**
+     * Append error message to rate result instance
+     * @param string $trackingValue
+     * @param string $errorMessage
+     */
+    private function appendTrackingError($trackingValue, $errorMessage)
+    {
+        $error = $this->_trackErrorFactory->create();
+        $error->setCarrier('fedex');
+        $error->setCarrierTitle($this->getConfigData('title'));
+        $error->setTracking($trackingValue);
+        $error->setErrorMessage($errorMessage);
+        $result = $this->getResult();
+        $result->append($error);
+    }
 }
diff --git a/app/code/Magento/Fedex/Model/Plugin/Rma/Block/Adminhtml/Rma/Edit/Tab/General/Shippingmethod.php b/app/code/Magento/Fedex/Model/Plugin/Rma/Block/Adminhtml/Rma/Edit/Tab/General/Shippingmethod.php
deleted file mode 100644
index 7319a6e9e694cc3704a8904624a740c7cb276a04..0000000000000000000000000000000000000000
--- a/app/code/Magento/Fedex/Model/Plugin/Rma/Block/Adminhtml/Rma/Edit/Tab/General/Shippingmethod.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * Copyright © 2016 Magento. All rights reserved.
- * See COPYING.txt for license details.
- */
-namespace Magento\Fedex\Model\Plugin\Rma\Block\Adminhtml\Rma\Edit\Tab\General;
-
-/**
- * Checkout cart shipping block plugin
- */
-class Shippingmethod
-{
-    /**
-     * @var \Magento\Framework\App\Config\ScopeConfigInterface
-     */
-    protected $_scopeConfig;
-
-    /**
-     * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
-     */
-    public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig)
-    {
-        $this->_scopeConfig = $scopeConfig;
-    }
-
-    /**
-     * @param \Magento\Framework\DataObject $subject
-     * @param bool $result
-     * @return bool
-     */
-    public function afterCanDisplayCustomValue(\Magento\Framework\DataObject $subject, $result)
-    {
-        $carrierCode = $subject->getShipment()->getCarrierCode();
-        if (!$carrierCode) {
-            return (bool)$result || false;
-        }
-        return (bool)$result || (bool)$carrierCode == \Magento\Fedex\Model\Carrier::CODE;
-    }
-}
diff --git a/app/code/Magento/Fedex/Test/Unit/Model/CarrierTest.php b/app/code/Magento/Fedex/Test/Unit/Model/CarrierTest.php
index 702b6e69098baacf1f621e1e1b4066bb64eb9406..385ddf8414832bbc312f54abeee90450ca029795 100644
--- a/app/code/Magento/Fedex/Test/Unit/Model/CarrierTest.php
+++ b/app/code/Magento/Fedex/Test/Unit/Model/CarrierTest.php
@@ -5,167 +5,200 @@
  */
 namespace Magento\Fedex\Test\Unit\Model;
 
+use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
+use Magento\CatalogInventory\Model\StockRegistry;
+use Magento\Directory\Helper\Data;
+use Magento\Directory\Model\Country;
+use Magento\Directory\Model\CountryFactory;
+use Magento\Directory\Model\CurrencyFactory;
+use Magento\Directory\Model\RegionFactory;
 use Magento\Fedex\Model\Carrier;
+use Magento\Framework\App\Config\ScopeConfigInterface;
+use Magento\Framework\Module\Dir\Reader;
+use Magento\Framework\Pricing\PriceCurrencyInterface;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
 use Magento\Framework\Xml\Security;
 use Magento\Quote\Model\Quote\Address\RateRequest;
+use Magento\Quote\Model\Quote\Address\RateResult\Error as RateResultError;
+use Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory as RateErrorFactory;
+use Magento\Quote\Model\Quote\Address\RateResult\Method;
+use Magento\Quote\Model\Quote\Address\RateResult\MethodFactory;
+use Magento\Shipping\Model\Rate\Result as RateResult;
+use Magento\Shipping\Model\Rate\ResultFactory as RateResultFactory;
+use Magento\Shipping\Model\Simplexml\ElementFactory;
+use Magento\Shipping\Model\Tracking\Result;
+use Magento\Shipping\Model\Tracking\Result\Error;
+use Magento\Shipping\Model\Tracking\Result\ErrorFactory;
+use Magento\Shipping\Model\Tracking\Result\Status;
+use Magento\Shipping\Model\Tracking\Result\StatusFactory;
+use Magento\Shipping\Model\Tracking\ResultFactory;
+use Magento\Store\Model\Store;
+use Magento\Store\Model\StoreManagerInterface;
+use PHPUnit_Framework_MockObject_MockObject as MockObject;
+use Psr\Log\LoggerInterface;
 
 /**
- * Class CarrierTest
- * @package Magento\Fedex\Model
- * TODO refactor me
+ * CarrierTest contains units test for Fedex carrier methods
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class CarrierTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager
+     * @var ObjectManager
      */
-    protected $_helper;
+    private $helper;
 
     /**
-     * @var \Magento\Fedex\Model\Carrier
+     * @var Carrier|MockObject
      */
-    protected $_model;
+    private $model;
 
     /**
-     * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var ScopeConfigInterface|MockObject
      */
-    protected $scope;
+    private $scope;
 
     /**
-     * Model under test
-     *
-     * @var \Magento\Quote\Model\Quote\Address\RateResult\Error|\PHPUnit_Framework_MockObject_MockObject
+     * @var Error|MockObject
      */
-    protected $error;
+    private $error;
 
     /**
-     * @var \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var ErrorFactory|MockObject
      */
-    protected $errorFactory;
+    private $errorFactory;
 
     /**
-     * @return void
+     * @var ErrorFactory|MockObject
+     */
+    private $trackErrorFactory;
+
+    /**
+     * @var StatusFactory|MockObject
+     */
+    private $statusFactory;
+
+    /**
+     * @var Result
+     */
+    private $result;
+
+    /**
+     * @inheritdoc
      */
     protected function setUp()
     {
-        $this->scope = $this->getMockBuilder(
-            \Magento\Framework\App\Config\ScopeConfigInterface::class
-        )->disableOriginalConstructor()->getMock();
-
-        $this->scope->expects($this->any())->method('getValue')->willReturnCallback([$this, 'scopeConfiggetValue']);
-        $country = $this->getMock(
-            \Magento\Directory\Model\Country::class,
-            ['load', 'getData', '__wakeup'],
-            [],
-            '',
-            false
-        );
-        $country->expects($this->any())->method('load')->will($this->returnSelf());
-        $countryFactory = $this->getMock(\Magento\Directory\Model\CountryFactory::class, ['create'], [], '', false);
-        $countryFactory->expects($this->any())->method('create')->will($this->returnValue($country));
-
-        $rate = $this->getMock(\Magento\Shipping\Model\Rate\Result::class, ['getError'], [], '', false);
-        $rateFactory = $this->getMock(\Magento\Shipping\Model\Rate\ResultFactory::class, ['create'], [], '', false);
-        $rateFactory->expects($this->any())->method('create')->will($this->returnValue($rate));
-        $this->error = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address\RateResult\Error::class)
-            ->setMethods(['setCarrier', 'setCarrierTitle', 'setErrorMessage'])->getMock();
-        $this->errorFactory = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory::class)
-            ->disableOriginalConstructor()->setMethods(['create'])->getMock();
-        $this->errorFactory->expects($this->any())->method('create')->willReturn($this->error);
-
-        $store = $this->getMock(\Magento\Store\Model\Store::class, ['getBaseCurrencyCode', '__wakeup'], [], '', false);
-        $storeManager = $this->getMockForAbstractClass(\Magento\Store\Model\StoreManagerInterface::class);
-        $storeManager->expects($this->any())->method('getStore')->will($this->returnValue($store));
-        $priceCurrency = $this->getMockBuilder(\Magento\Framework\Pricing\PriceCurrencyInterface::class)->getMock();
-
-        $rateMethod = $this->getMock(
-            \Magento\Quote\Model\Quote\Address\RateResult\Method::class,
-            null,
-            ['priceCurrency' => $priceCurrency]
-        );
-        $rateMethodFactory = $this->getMock(
-            \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory::class,
-            ['create'],
-            [],
-            '',
-            false
-        );
-        $rateMethodFactory->expects($this->any())->method('create')->will($this->returnValue($rateMethod));
-        $this->_model = $this->getMock(
-            \Magento\Fedex\Model\Carrier::class,
-            ['_getCachedQuotes', '_debug'],
-            [
-                'scopeConfig' => $this->scope,
-                'rateErrorFactory' => $this->errorFactory,
-                'logger' => $this->getMock(\Psr\Log\LoggerInterface::class),
-                'xmlSecurity' => new Security(),
-                'xmlElFactory' => $this->getMock(
-                    \Magento\Shipping\Model\Simplexml\ElementFactory::class,
-                    [],
-                    [],
-                    '',
-                    false
-                ),
-                'rateFactory' => $rateFactory,
-                'rateMethodFactory' => $rateMethodFactory,
-                'trackFactory' => $this->getMock(
-                    \Magento\Shipping\Model\Tracking\ResultFactory::class,
-                    [],
-                    [],
-                    '',
-                    false
-                ),
-                'trackErrorFactory' => $this->getMock(\Magento\Shipping\Model\Tracking\Result\ErrorFactory::class, [], [], '', false),
-                'trackStatusFactory' => $this->getMock(\Magento\Shipping\Model\Tracking\Result\StatusFactory::class, [], [], '', false),
-                'regionFactory' => $this->getMock(\Magento\Directory\Model\RegionFactory::class, [], [], '', false),
-                'countryFactory' => $countryFactory,
-                'currencyFactory' => $this->getMock(\Magento\Directory\Model\CurrencyFactory::class, [], [], '', false),
-                'directoryData' => $this->getMock(\Magento\Directory\Helper\Data::class, [], [], '', false),
-                'stockRegistry' => $this->getMock(
-                    \Magento\CatalogInventory\Model\StockRegistry::class,
-                    [],
-                    [],
-                    '',
-                    false
-                ),
-                'storeManager' => $storeManager,
-                'configReader' => $this->getMock(\Magento\Framework\Module\Dir\Reader::class, [], [], '', false),
-                'productCollectionFactory' => $this->getMock(
-                        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory::class,
-                        [],
-                        [],
-                        '',
-                        false
-                    ),
-                'data' => [],
-            ]
-        );
+        $this->helper = new ObjectManager($this);
+        $this->scope = $this->getMockBuilder(ScopeConfigInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->scope->expects(static::any())
+            ->method('getValue')
+            ->willReturnCallback([$this, 'scopeConfigGetValue']);
+
+        $countryFactory = $this->getCountryFactory();
+        $rateFactory = $this->getRateFactory();
+        $storeManager = $this->getStoreManager();
+        $resultFactory = $this->getResultFactory();
+        $this->initRateErrorFactory();
+
+        $rateMethodFactory = $this->getRateMethodFactory();
+
+        $this->trackErrorFactory = $this->getMockBuilder(ErrorFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+
+        $this->statusFactory = $this->getMockBuilder(StatusFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+
+        $elementFactory = $this->getMockBuilder(ElementFactory::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $collectionFactory = $this->getMockBuilder(CollectionFactory::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $regionFactory = $this->getMockBuilder(RegionFactory::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $currencyFactory = $this->getMockBuilder(CurrencyFactory::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $data = $this->getMockBuilder(Data::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $stockRegistry = $this->getMockBuilder(StockRegistry::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $reader = $this->getMockBuilder(Reader::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->model = $this->getMockBuilder(Carrier::class)
+            ->setMethods(['_getCachedQuotes', '_debug'])
+            ->setConstructorArgs(
+                [
+                    'scopeConfig' => $this->scope,
+                    'rateErrorFactory' => $this->errorFactory,
+                    'logger' => $this->getMock(LoggerInterface::class),
+                    'xmlSecurity' => new Security(),
+                    'xmlElFactory' => $elementFactory,
+                    'rateFactory' => $rateFactory,
+                    'rateMethodFactory' => $rateMethodFactory,
+                    'trackFactory' => $resultFactory,
+                    'trackErrorFactory' => $this->trackErrorFactory,
+                    'trackStatusFactory' => $this->statusFactory,
+                    'regionFactory' => $regionFactory,
+                    'countryFactory' => $countryFactory,
+                    'currencyFactory' => $currencyFactory,
+                    'directoryData' => $data,
+                    'stockRegistry' => $stockRegistry,
+                    'storeManager' => $storeManager,
+                    'configReader' => $reader,
+                    'productCollectionFactory' => $collectionFactory,
+                ]
+            )
+            ->getMock();
     }
 
+    /**
+     * @covers \Magento\Fedex\Model\Carrier::setRequest
+     */
     public function testSetRequestWithoutCity()
     {
-        $requestMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address\RateRequest::class)
+        $request = $this->getMockBuilder(RateRequest::class)
             ->disableOriginalConstructor()
             ->setMethods(['getDestCity'])
             ->getMock();
-        $requestMock->expects($this->once())
+        $request->expects($this->once())
             ->method('getDestCity')
             ->willReturn(null);
-        $this->_model->setRequest($requestMock);
+        $this->model->setRequest($request);
     }
 
+    /**
+     * @covers \Magento\Fedex\Model\Carrier::setRequest
+     */
     public function testSetRequestWithCity()
     {
-        $requestMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address\RateRequest::class)
+        $request = $this->getMockBuilder(RateRequest::class)
             ->disableOriginalConstructor()
             ->setMethods(['getDestCity'])
             ->getMock();
-        $requestMock->expects($this->exactly(2))
+        $request->expects(static::exactly(2))
             ->method('getDestCity')
             ->willReturn('Small Town');
-        $this->_model->setRequest($requestMock);
+        $this->model->setRequest($request);
     }
 
     /**
@@ -173,7 +206,7 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
      * @param $path
      * @return null|string
      */
-    public function scopeConfiggetValue($path)
+    public function scopeConfigGetValue($path)
     {
         switch ($path) {
             case 'carriers/fedex/showmethod':
@@ -183,53 +216,57 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
                 return 'ServiceType';
                 break;
         }
+        return null;
     }
 
     /**
+     * @param float $amount
+     * @param string $rateType
+     * @param float $expected
      * @dataProvider collectRatesDataProvider
      */
     public function testCollectRatesRateAmountOriginBased($amount, $rateType, $expected)
     {
-        $this->scope->expects($this->any())->method('isSetFlag')->will($this->returnValue(true));
+        $this->scope->expects(static::any())
+            ->method('isSetFlag')
+            ->willReturn(true);
 
         // @codingStandardsIgnoreStart
-        $netAmount = new \Magento\Framework\DataObject([]);
+        $netAmount = new \stdClass();
         $netAmount->Amount = $amount;
 
-        $totalNetCharge = new \Magento\Framework\DataObject([]);
+        $totalNetCharge = new \stdClass();
         $totalNetCharge->TotalNetCharge = $netAmount;
         $totalNetCharge->RateType = $rateType;
 
-        $ratedShipmentDetail = new \Magento\Framework\DataObject([]);
+        $ratedShipmentDetail = new \stdClass();
         $ratedShipmentDetail->ShipmentRateDetail = $totalNetCharge;
 
-        $rate = new \Magento\Framework\DataObject([]);
+        $rate = new \stdClass();
         $rate->ServiceType = 'ServiceType';
         $rate->RatedShipmentDetails = [$ratedShipmentDetail];
 
-        $response = new \Magento\Framework\DataObject([]);
+        $response = new \stdClass();
         $response->HighestSeverity = 'SUCCESS';
         $response->RateReplyDetails = $rate;
+        // @codingStandardsIgnoreEnd
 
-        $this->_model->expects($this->any())->method('_getCachedQuotes')->will(
-            $this->returnValue(serialize($response))
-        );
-        $request = $this->getMock(
-            \Magento\Quote\Model\Quote\Address\RateRequest::class,
-            ['getDestCity'],
-            [],
-            '',
-            false
-        );
-        $request->expects($this->exactly(2))
-            ->method('getDestCity')
-            ->willReturn('Wonderful City');
-        foreach ($this->_model->collectRates($request)->getAllRates() as $allRates) {
+        $this->model->expects(static::any())
+            ->method('_getCachedQuotes')
+            ->willReturn(serialize($response));
+        $request = $this->getMockBuilder(RateRequest::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        foreach ($this->model->collectRates($request)->getAllRates() as $allRates) {
             $this->assertEquals($expected, $allRates->getData('cost'));
         }
-        // @codingStandardsIgnoreEnd
     }
 
+    /**
+     * Get list of rates variations
+     * @return array
+     */
     public function collectRatesDataProvider()
     {
         return [
@@ -246,16 +283,22 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
 
     public function testCollectRatesErrorMessage()
     {
-        $this->scope->expects($this->once())->method('isSetFlag')->willReturn(false);
+        $this->scope->expects(static::once())
+            ->method('isSetFlag')
+            ->willReturn(false);
 
-        $this->error->expects($this->once())->method('setCarrier')->with('fedex');
-        $this->error->expects($this->once())->method('setCarrierTitle');
-        $this->error->expects($this->once())->method('setErrorMessage');
+        $this->error->expects(static::once())
+            ->method('setCarrier')
+            ->with('fedex');
+        $this->error->expects(static::once())
+            ->method('setCarrierTitle');
+        $this->error->expects(static::once())
+            ->method('setErrorMessage');
 
         $request = new RateRequest();
         $request->setPackageWeight(1);
 
-        $this->assertSame($this->error, $this->_model->collectRates($request));
+        static::assertSame($this->error, $this->model->collectRates($request));
     }
 
     /**
@@ -269,11 +312,11 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
         $refClass = new \ReflectionClass(Carrier::class);
         $property = $refClass->getProperty('_debugReplacePrivateDataKeys');
         $property->setAccessible(true);
-        $property->setValue($this->_model, $maskFields);
+        $property->setValue($this->model, $maskFields);
 
         $refMethod = $refClass->getMethod('filterDebugData');
         $refMethod->setAccessible(true);
-        $result = $refMethod->invoke($this->_model, $data);
+        $result = $refMethod->invoke($this->model, $data);
         static::assertEquals($expected, $result);
     }
 
@@ -312,4 +355,283 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
             ],
         ];
     }
+
+    /**
+     * @covers \Magento\Fedex\Model\Carrier::getTracking
+     */
+    public function testGetTrackingErrorResponse()
+    {
+        $tracking = '123456789012';
+        $errorMessage = 'Tracking information is unavailable.';
+
+        // @codingStandardsIgnoreStart
+        $response = new \stdClass();
+        $response->HighestSeverity = 'ERROR';
+        $response->Notifications = new \stdClass();
+        $response->Notifications->Message = $errorMessage;
+        // @codingStandardsIgnoreEnd
+
+        $this->model->expects(static::once())
+            ->method('_getCachedQuotes')
+            ->willReturn(serialize($response));
+
+        $error = $this->helper->getObject(Error::class);
+        $this->trackErrorFactory->expects(static::once())
+            ->method('create')
+            ->willReturn($error);
+
+        $this->model->getTracking($tracking);
+        $tracks = $this->model->getResult()->getAllTrackings();
+
+        static::assertEquals(1, count($tracks));
+
+        /** @var Error $current */
+        $current = $tracks[0];
+        static::assertInstanceOf(Error::class, $current);
+        static::assertEquals(__($errorMessage), $current->getErrorMessage());
+    }
+
+    /**
+     * @covers \Magento\Fedex\Model\Carrier::getTracking
+     */
+    public function testGetTracking()
+    {
+        $tracking = '123456789012';
+
+        // @codingStandardsIgnoreStart
+        $response = new \stdClass();
+        $response->HighestSeverity = 'SUCCESS';
+        $response->CompletedTrackDetails = new \stdClass();
+
+        $trackDetails = new \stdClass();
+        $trackDetails->ShipTimestamp = '2016-08-05T14:06:35+00:00';
+        $trackDetails->DeliverySignatureName = 'signature';
+
+        $trackDetails->StatusDetail = new \stdClass();
+        $trackDetails->StatusDetail->Description = 'SUCCESS';
+
+        $trackDetails->Service = new \stdClass();
+        $trackDetails->Service->Description = 'ground';
+        $trackDetails->EstimatedDeliveryTimestamp = '2016-08-10T10:20:26+00:00';
+
+        $trackDetails->EstimatedDeliveryAddress = new \stdClass();
+        $trackDetails->EstimatedDeliveryAddress->City = 'Culver City';
+        $trackDetails->EstimatedDeliveryAddress->StateOrProvinceCode = 'CA';
+        $trackDetails->EstimatedDeliveryAddress->CountryCode = 'US';
+
+        $trackDetails->PackageWeight = new \stdClass();
+        $trackDetails->PackageWeight->Value = 23;
+        $trackDetails->PackageWeight->Units = 'LB';
+
+        $response->CompletedTrackDetails->TrackDetails = [$trackDetails];
+        // @codingStandardsIgnoreEnd
+
+        $this->model->expects(static::once())
+            ->method('_getCachedQuotes')
+            ->willReturn(serialize($response));
+
+        $status = $this->helper->getObject(Status::class);
+        $this->statusFactory->expects(static::once())
+            ->method('create')
+            ->willReturn($status);
+
+        $this->model->getTracking($tracking);
+        $tracks = $this->model->getResult()->getAllTrackings();
+        static::assertEquals(1, count($tracks));
+
+        $current = $tracks[0];
+        $fields = [
+            'signedby',
+            'status',
+            'service',
+            'shippeddate',
+            'deliverydate',
+            'deliverytime',
+            'deliverylocation',
+            'weight',
+        ];
+        array_walk($fields, function ($field) use ($current) {
+            static::assertNotEmpty($current[$field]);
+        });
+
+        static::assertEquals('2016-08-10', $current['deliverydate']);
+        static::assertEquals('10:20:26', $current['deliverytime']);
+        static::assertEquals('2016-08-05', $current['shippeddate']);
+    }
+
+    /**
+     * @covers \Magento\Fedex\Model\Carrier::getTracking
+     */
+    public function testGetTrackingWithEvents()
+    {
+        $tracking = '123456789012';
+
+        // @codingStandardsIgnoreStart
+        $response = new \stdClass();
+        $response->HighestSeverity = 'SUCCESS';
+        $response->CompletedTrackDetails = new \stdClass();
+
+        $event = new \stdClass();
+        $event->EventDescription = 'Test';
+        $event->Timestamp = '2016-08-05T19:14:53+00:00';
+        $event->Address = new \stdClass();
+
+        $event->Address->City = 'Culver City';
+        $event->Address->StateOrProvinceCode = 'CA';
+        $event->Address->CountryCode = 'US';
+
+        $trackDetails = new \stdClass();
+        $trackDetails->Events = $event;
+
+        $response->CompletedTrackDetails->TrackDetails = $trackDetails;
+        // @codingStandardsIgnoreEnd
+
+        $this->model->expects(static::once())
+            ->method('_getCachedQuotes')
+            ->willReturn(serialize($response));
+
+        $status = $this->helper->getObject(Status::class);
+        $this->statusFactory->expects(static::once())
+            ->method('create')
+            ->willReturn($status);
+
+        $this->model->getTracking($tracking);
+        $tracks = $this->model->getResult()->getAllTrackings();
+        static::assertEquals(1, count($tracks));
+
+        $current = $tracks[0];
+        static::assertNotEmpty($current['progressdetail']);
+        static::assertEquals(1, count($current['progressdetail']));
+
+        $event = $current['progressdetail'][0];
+        $fields = ['activity', 'deliverydate', 'deliverytime', 'deliverylocation'];
+        array_walk($fields, function ($field) use ($event) {
+            static::assertNotEmpty($event[$field]);
+        });
+        static::assertEquals('2016-08-05', $event['deliverydate']);
+        static::assertEquals('19:14:53', $event['deliverytime']);
+    }
+
+    /**
+     * Init RateErrorFactory and RateResultErrors mocks
+     * @return void
+     */
+    private function initRateErrorFactory()
+    {
+        $this->error = $this->getMockBuilder(RateResultError::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['setCarrier', 'setCarrierTitle', 'setErrorMessage'])
+            ->getMock();
+        $this->errorFactory = $this->getMockBuilder(RateErrorFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $this->errorFactory->expects(static::any())
+            ->method('create')
+            ->willReturn($this->error);
+    }
+
+    /**
+     * Creates mock rate result factory
+     * @return RateResultFactory|MockObject
+     */
+    private function getRateFactory()
+    {
+        $rate = $this->getMockBuilder(RateResult::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getError'])
+            ->getMock();
+        $rateFactory = $this->getMockBuilder(RateResultFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $rateFactory->expects(static::any())
+            ->method('create')
+            ->willReturn($rate);
+
+        return $rateFactory;
+    }
+
+    /**
+     * Creates mock object for CountryFactory class
+     * @return CountryFactory|MockObject
+     */
+    private function getCountryFactory()
+    {
+        $country = $this->getMockBuilder(Country::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['load', 'getData'])
+            ->getMock();
+        $country->expects(static::any())
+            ->method('load')
+            ->willReturnSelf();
+
+        $countryFactory = $this->getMockBuilder(CountryFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $countryFactory->expects(static::any())
+            ->method('create')
+            ->willReturn($country);
+
+        return $countryFactory;
+    }
+
+    /**
+     * Creates mock object for ResultFactory class
+     * @return ResultFactory|MockObject
+     */
+    private function getResultFactory()
+    {
+        $resultFactory = $this->getMockBuilder(ResultFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $this->result = $this->helper->getObject(Result::class);
+        $resultFactory->expects(static::any())
+            ->method('create')
+            ->willReturn($this->result);
+
+        return $resultFactory;
+    }
+
+    /**
+     * Creates mock object for store manager
+     * @return StoreManagerInterface|MockObject
+     */
+    private function getStoreManager()
+    {
+        $store = $this->getMockBuilder(Store::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getBaseCurrencyCode'])
+            ->getMock();
+        $storeManager = $this->getMock(StoreManagerInterface::class);
+        $storeManager->expects(static::any())
+            ->method('getStore')
+            ->willReturn($store);
+
+        return $storeManager;
+    }
+
+    /**
+     * Creates mock object for rate method factory
+     * @return MethodFactory|MockObject
+     */
+    private function getRateMethodFactory()
+    {
+        $priceCurrency = $this->getMock(PriceCurrencyInterface::class);
+        $rateMethod = $this->getMockBuilder(Method::class)
+            ->setConstructorArgs(['priceCurrency' => $priceCurrency])
+            ->setMethods(null)
+            ->getMock();
+        $rateMethodFactory = $this->getMockBuilder(MethodFactory::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['create'])
+            ->getMock();
+        $rateMethodFactory->expects(static::any())
+            ->method('create')
+            ->willReturn($rateMethod);
+
+        return $rateMethodFactory;
+    }
 }
diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json
index 07c988e280da759e61aae0383618fdec40faddd3..d27d5c1c60d407ce4d1d5b3781b0209c5955a0d4 100644
--- a/app/code/Magento/Fedex/composer.json
+++ b/app/code/Magento/Fedex/composer.json
@@ -14,9 +14,6 @@
         "magento/framework": "100.2.*",
         "lib-libxml": "*"
     },
-    "suggest": {
-        "magento/module-rma": "100.2.*"
-    },
     "type": "magento2-module",
     "version": "100.2.0-dev",
     "license": [
diff --git a/app/code/Magento/Fedex/etc/adminhtml/system.xml b/app/code/Magento/Fedex/etc/adminhtml/system.xml
index 1de61c2c154941d836de0cbc64e137ce26ee6af9..16966322f25f96657071b9f7c1bf7d96dea9dda2 100644
--- a/app/code/Magento/Fedex/etc/adminhtml/system.xml
+++ b/app/code/Magento/Fedex/etc/adminhtml/system.xml
@@ -101,11 +101,11 @@
                     <source_model>Magento\Fedex\Model\Source\Freemethod</source_model>
                 </field>
                 <field id="free_shipping_enable" translate="label" type="select" sortOrder="220" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Free Shipping Amount Threshold</label>
+                    <label>Enable Free Shipping Threshold</label>
                     <source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
                 </field>
                 <field id="free_shipping_subtotal" translate="label" type="text" sortOrder="230" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Enable Free Shipping Threshold</label>
+                    <label>Free Shipping Amount Threshold</label>
                     <validate>validate-number validate-zero-or-greater</validate>
                     <depends>
                         <field id="free_shipping_enable">1</field>
diff --git a/app/code/Magento/Fedex/etc/di.xml b/app/code/Magento/Fedex/etc/di.xml
deleted file mode 100644
index 454beffacba9ddd828c995726d4071321acefe39..0000000000000000000000000000000000000000
--- a/app/code/Magento/Fedex/etc/di.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Copyright © 2016 Magento. All rights reserved.
- * See COPYING.txt for license details.
- */
--->
-<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
-    <type name="Magento\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shippingmethod">
-        <plugin name="rma_tab_shippingmethod_fedex"
-                type="Magento\Fedex\Model\Plugin\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shippingmethod"/>
-    </type>
-</config>
diff --git a/app/code/Magento/Fedex/etc/wsdl/TrackService_v5.wsdl b/app/code/Magento/Fedex/etc/wsdl/TrackService_v10.wsdl
similarity index 63%
rename from app/code/Magento/Fedex/etc/wsdl/TrackService_v5.wsdl
rename to app/code/Magento/Fedex/etc/wsdl/TrackService_v10.wsdl
index f3ceaf5056a20ad907c9687275b38b40722583bf..77f53e02a539a0d1ce72871d8352bd1948b930a6 100644
--- a/app/code/Magento/Fedex/etc/wsdl/TrackService_v5.wsdl
+++ b/app/code/Magento/Fedex/etc/wsdl/TrackService_v10.wsdl
@@ -1,12 +1,12 @@
-<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://fedex.com/ws/track/v5" xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://fedex.com/ws/track/v5" name="TrackServiceDefinitions">
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://fedex.com/ws/track/v10" xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://fedex.com/ws/track/v10" name="TrackServiceDefinitions">
   <types>
-    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://fedex.com/ws/track/v5">
+    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://fedex.com/ws/track/v10">
+      <xs:element name="SendNotificationsReply" type="ns:SendNotificationsReply"/>
+      <xs:element name="SendNotificationsRequest" type="ns:SendNotificationsRequest"/>
       <xs:element name="SignatureProofOfDeliveryFaxReply" type="ns:SignatureProofOfDeliveryFaxReply"/>
       <xs:element name="SignatureProofOfDeliveryFaxRequest" type="ns:SignatureProofOfDeliveryFaxRequest"/>
       <xs:element name="SignatureProofOfDeliveryLetterReply" type="ns:SignatureProofOfDeliveryLetterReply"/>
       <xs:element name="SignatureProofOfDeliveryLetterRequest" type="ns:SignatureProofOfDeliveryLetterRequest"/>
-      <xs:element name="TrackNotificationReply" type="ns:TrackNotificationReply"/>
-      <xs:element name="TrackNotificationRequest" type="ns:TrackNotificationRequest"/>
       <xs:element name="TrackReply" type="ns:TrackReply"/>
       <xs:element name="TrackRequest" type="ns:TrackRequest"/>
       <xs:complexType name="Address">
@@ -14,7 +14,7 @@
           <xs:documentation>Descriptive data for a physical location. May be used as an actual physical address (place to which one could go), or as a container of "address parts" which should be handled as a unit (such as a city-state-ZIP combination within the US).</xs:documentation>
         </xs:annotation>
         <xs:sequence>
-          <xs:element name="StreetLines" type="xs:string" minOccurs="0" maxOccurs="2">
+          <xs:element name="StreetLines" type="xs:string" minOccurs="0" maxOccurs="unbounded">
             <xs:annotation>
               <xs:documentation>Combination of number, street name, etc. At least one line is required for a valid physical address; empty lines should not be included.</xs:documentation>
             </xs:annotation>
@@ -44,6 +44,11 @@
               <xs:documentation>The two-letter code used to identify a country.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="CountryName" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The fully spelt out name of a country.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="Residential" type="xs:boolean" minOccurs="0">
             <xs:annotation>
               <xs:documentation>Indicates whether this address residential (as opposed to commercial).</xs:documentation>
@@ -51,6 +56,48 @@
           </xs:element>
         </xs:sequence>
       </xs:complexType>
+      <xs:complexType name="AppointmentDetail">
+        <xs:annotation>
+          <xs:documentation>Specifies the different appointment times on a specific date.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+          <xs:element name="Date" type="xs:date" minOccurs="0"/>
+          <xs:element name="WindowDetails" type="ns:AppointmentTimeDetail" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Different appointment time windows on the date specified.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="AppointmentTimeDetail">
+        <xs:annotation>
+          <xs:documentation>Specifies the details about the appointment time window.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+          <xs:element name="Type" type="ns:AppointmentWindowType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The description that FedEx Ground uses for the appointment window being specified.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Window" type="ns:LocalTimeRange" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies the window of time for an appointment.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Description" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="AppointmentWindowType">
+        <xs:annotation>
+          <xs:documentation>The description that FedEx uses for a given appointment window.</xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="AFTERNOON"/>
+          <xs:enumeration value="LATE_AFTERNOON"/>
+          <xs:enumeration value="MID_DAY"/>
+          <xs:enumeration value="MORNING"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:simpleType name="ArrivalLocationType">
         <xs:annotation>
           <xs:documentation>Identifies where a tracking event occurs.</xs:documentation>
@@ -73,11 +120,18 @@
           <xs:enumeration value="PICKUP_LOCATION"/>
           <xs:enumeration value="PLANE"/>
           <xs:enumeration value="PORT_OF_ENTRY"/>
+          <xs:enumeration value="SHIP_AND_GET_LOCATION"/>
           <xs:enumeration value="SORT_FACILITY"/>
           <xs:enumeration value="TURNPOINT"/>
           <xs:enumeration value="VEHICLE"/>
         </xs:restriction>
       </xs:simpleType>
+      <xs:simpleType name="AvailableImageType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="BILL_OF_LADING"/>
+          <xs:enumeration value="SIGNATURE_PROOF_OF_DELIVERY"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:simpleType name="CarrierCodeType">
         <xs:annotation>
           <xs:documentation>Identification of a FedEx operating company (transportation).</xs:documentation>
@@ -108,7 +162,7 @@
           </xs:element>
           <xs:element name="IntegratorId" type="xs:string" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>Only used in transactions which require identification of the Fed Ex Office integrator.</xs:documentation>
+              <xs:documentation>Only used in transactions which require identification of the FedEx Office integrator.</xs:documentation>
             </xs:annotation>
           </xs:element>
           <xs:element name="Localization" type="ns:Localization" minOccurs="0">
@@ -118,6 +172,75 @@
           </xs:element>
         </xs:sequence>
       </xs:complexType>
+      <xs:complexType name="Commodity">
+        <xs:sequence>
+          <xs:element name="CommodityId" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Value used to identify a commodity description; must be unique within the containing shipment.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Name" type="xs:string" minOccurs="0"/>
+          <xs:element name="NumberOfPieces" type="xs:nonNegativeInteger" minOccurs="0"/>
+          <xs:element name="Description" type="xs:string" minOccurs="0"/>
+          <xs:element name="CountryOfManufacture" type="xs:string" minOccurs="0"/>
+          <xs:element name="HarmonizedCode" type="xs:string" minOccurs="0"/>
+          <xs:element name="Weight" type="ns:Weight" minOccurs="0"/>
+          <xs:element name="Quantity" type="xs:decimal" minOccurs="0"/>
+          <xs:element name="QuantityUnits" type="xs:string" minOccurs="0"/>
+          <xs:element name="AdditionalMeasures" type="ns:Measure" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Contains only additional quantitative information other than weight and quantity to calculate duties and taxes.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="UnitPrice" type="ns:Money" minOccurs="0"/>
+          <xs:element name="CustomsValue" type="ns:Money" minOccurs="0"/>
+          <xs:element name="ExciseConditions" type="ns:EdtExciseCondition" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Defines additional characteristic of commodity used to calculate duties and taxes</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ExportLicenseNumber" type="xs:string" minOccurs="0"/>
+          <xs:element name="ExportLicenseExpirationDate" type="xs:date" minOccurs="0"/>
+          <xs:element name="CIMarksAndNumbers" type="xs:string" minOccurs="0"/>
+          <xs:element name="PartNumber" type="xs:string" minOccurs="0"/>
+          <xs:element name="NaftaDetail" type="ns:NaftaCommodityDetail" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>All data required for this commodity in NAFTA Certificate of Origin.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="CompletedTrackDetail">
+        <xs:sequence>
+          <xs:element name="HighestSeverity" type="ns:NotificationSeverityType" minOccurs="0"/>
+          <xs:element name="Notifications" type="ns:Notification" minOccurs="0" maxOccurs="unbounded"/>
+          <xs:element name="DuplicateWaybill" type="xs:boolean" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>True if duplicate packages (more than one package with the same tracking number) have been found, and only limited data will be provided for each one.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="MoreData" type="xs:boolean" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>True if additional packages remain to be retrieved.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="PagingToken" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Value that must be passed in a TrackNotification request to retrieve the next set of packages (when MoreDataAvailable = true).</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="TrackDetailsCount" type="xs:nonNegativeInteger" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Identifies the total number of available track details across all pages.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="TrackDetails" type="ns:TrackDetail" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Contains detailed tracking information for the requested packages(s).</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
       <xs:complexType name="Contact">
         <xs:annotation>
           <xs:documentation>The descriptive data for a point-of-contact person.</xs:documentation>
@@ -148,6 +271,11 @@
               <xs:documentation>Identifies the phone extension associated with this contact.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="TollFreePhoneNumber" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Identifies a toll free number, if any, associated with this contact.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="PagerNumber" type="xs:string" minOccurs="0">
             <xs:annotation>
               <xs:documentation>Identifies the pager number associated with this contact.</xs:documentation>
@@ -171,6 +299,84 @@
           <xs:element name="Address" type="ns:Address" minOccurs="0"/>
         </xs:sequence>
       </xs:complexType>
+      <xs:complexType name="ContentRecord">
+        <xs:sequence>
+          <xs:element name="PartNumber" type="xs:string" minOccurs="0"/>
+          <xs:element name="ItemNumber" type="xs:string" minOccurs="0"/>
+          <xs:element name="ReceivedQuantity" type="xs:nonNegativeInteger" minOccurs="0"/>
+          <xs:element name="Description" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="CustomerExceptionRequestDetail">
+        <xs:sequence>
+          <xs:element name="Id" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Unique identifier for the customer exception request.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="StatusCode" type="xs:string" minOccurs="0"/>
+          <xs:element name="StatusDescription" type="xs:string" minOccurs="0"/>
+          <xs:element name="CreateTime" type="xs:dateTime" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="CustomsOptionDetail">
+        <xs:sequence>
+          <xs:element name="Type" type="ns:CustomsOptionType" minOccurs="0"/>
+          <xs:element name="Description" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies additional description about customs options. This is a required field when the customs options type is "OTHER".</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="CustomsOptionType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="COURTESY_RETURN_LABEL"/>
+          <xs:enumeration value="EXHIBITION_TRADE_SHOW"/>
+          <xs:enumeration value="FAULTY_ITEM"/>
+          <xs:enumeration value="FOLLOWING_REPAIR"/>
+          <xs:enumeration value="FOR_REPAIR"/>
+          <xs:enumeration value="ITEM_FOR_LOAN"/>
+          <xs:enumeration value="OTHER"/>
+          <xs:enumeration value="REJECTED"/>
+          <xs:enumeration value="REPLACEMENT"/>
+          <xs:enumeration value="TRIAL"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:complexType name="DateRange">
+        <xs:sequence>
+          <xs:element name="Begins" type="xs:date" minOccurs="0"/>
+          <xs:element name="Ends" type="xs:date" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="DeliveryOptionEligibilityDetail">
+        <xs:annotation>
+          <xs:documentation>Details about the eligibility for a delivery option.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+          <xs:element name="Option" type="ns:DeliveryOptionType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Type of delivery option.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Eligibility" type="ns:EligibilityType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Eligibility of the customer for the specific delivery option.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="DeliveryOptionType">
+        <xs:annotation>
+          <xs:documentation>Specifies the different option types for delivery.</xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="INDIRECT_SIGNATURE_RELEASE"/>
+          <xs:enumeration value="REDIRECT_TO_HOLD_AT_LOCATION"/>
+          <xs:enumeration value="REROUTE"/>
+          <xs:enumeration value="RESCHEDULE"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:complexType name="Dimensions">
         <xs:annotation>
           <xs:documentation>The dimensions of this package and the unit type used for the measurements.</xs:documentation>
@@ -280,6 +486,43 @@
           <xs:enumeration value="SHIPPER"/>
         </xs:restriction>
       </xs:simpleType>
+      <xs:complexType name="EdtExciseCondition">
+        <xs:sequence>
+          <xs:element name="Category" type="xs:string" minOccurs="0"/>
+          <xs:element name="Value" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Customer-declared value, with data type and legal values depending on excise condition, used in defining the taxable value of the item.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="EligibilityType">
+        <xs:annotation>
+          <xs:documentation>Specifies different values of eligibility status</xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="ELIGIBLE"/>
+          <xs:enumeration value="INELIGIBLE"/>
+          <xs:enumeration value="POSSIBLY_ELIGIBLE"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:simpleType name="FedExLocationType">
+        <xs:annotation>
+          <xs:documentation>Identifies a kind of FedEx facility.</xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="FEDEX_AUTHORIZED_SHIP_CENTER"/>
+          <xs:enumeration value="FEDEX_EXPRESS_STATION"/>
+          <xs:enumeration value="FEDEX_FACILITY"/>
+          <xs:enumeration value="FEDEX_FREIGHT_SERVICE_CENTER"/>
+          <xs:enumeration value="FEDEX_GROUND_TERMINAL"/>
+          <xs:enumeration value="FEDEX_HOME_DELIVERY_STATION"/>
+          <xs:enumeration value="FEDEX_OFFICE"/>
+          <xs:enumeration value="FEDEX_SELF_SERVICE_LOCATION"/>
+          <xs:enumeration value="FEDEX_SHIPSITE"/>
+          <xs:enumeration value="FEDEX_SMART_POST_HUB"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:simpleType name="LinearUnits">
         <xs:annotation>
           <xs:documentation>CM = centimeters, IN = inches</xs:documentation>
@@ -289,6 +532,15 @@
           <xs:enumeration value="IN"/>
         </xs:restriction>
       </xs:simpleType>
+      <xs:complexType name="LocalTimeRange">
+        <xs:annotation>
+          <xs:documentation>Time Range specified in local time.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+          <xs:element name="Begins" type="xs:string" minOccurs="0"/>
+          <xs:element name="Ends" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
       <xs:complexType name="Localization">
         <xs:annotation>
           <xs:documentation>Identifies the representation of human-readable text.</xs:documentation>
@@ -306,6 +558,73 @@
           </xs:element>
         </xs:sequence>
       </xs:complexType>
+      <xs:complexType name="Measure">
+        <xs:sequence>
+          <xs:element name="Quantity" type="xs:decimal" minOccurs="0"/>
+          <xs:element name="Units" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="Money">
+        <xs:sequence>
+          <xs:element name="Currency" type="xs:string" minOccurs="0"/>
+          <xs:element name="Amount" type="xs:decimal" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="NaftaCommodityDetail">
+        <xs:sequence>
+          <xs:element name="PreferenceCriterion" type="ns:NaftaPreferenceCriterionCode" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Defined by NAFTA regulations.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ProducerDetermination" type="ns:NaftaProducerDeterminationCode" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Defined by NAFTA regulations.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ProducerId" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Identification of which producer is associated with this commodity (if multiple producers are used in a single shipment).</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="NetCostMethod" type="ns:NaftaNetCostMethodCode" minOccurs="0"/>
+          <xs:element name="NetCostDateRange" type="ns:DateRange" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Date range over which RVC net cost was calculated.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="NaftaNetCostMethodCode">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="NC"/>
+          <xs:enumeration value="NO"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:simpleType name="NaftaPreferenceCriterionCode">
+        <xs:annotation>
+          <xs:documentation>See instructions for NAFTA Certificate of Origin for code definitions.</xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="A"/>
+          <xs:enumeration value="B"/>
+          <xs:enumeration value="C"/>
+          <xs:enumeration value="D"/>
+          <xs:enumeration value="E"/>
+          <xs:enumeration value="F"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:simpleType name="NaftaProducerDeterminationCode">
+        <xs:annotation>
+          <xs:documentation>See instructions for NAFTA Certificate of Origin for code definitions.</xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="NO_1"/>
+          <xs:enumeration value="NO_2"/>
+          <xs:enumeration value="NO_3"/>
+          <xs:enumeration value="YES"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:complexType name="Notification">
         <xs:annotation>
           <xs:documentation>The descriptive data regarding the result of the submitted transaction.</xs:documentation>
@@ -382,7 +701,18 @@
           <xs:documentation>Identification for a FedEx operating company (transportation and non-transportation).</xs:documentation>
         </xs:annotation>
         <xs:restriction base="xs:string">
+          <xs:enumeration value="FEDEX_CARGO"/>
+          <xs:enumeration value="FEDEX_CORPORATE_SERVICES"/>
+          <xs:enumeration value="FEDEX_CORPORATION"/>
+          <xs:enumeration value="FEDEX_CUSTOMER_INFORMATION_SYSTEMS"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL"/>
+          <xs:enumeration value="FEDEX_EXPRESS"/>
+          <xs:enumeration value="FEDEX_FREIGHT"/>
+          <xs:enumeration value="FEDEX_GROUND"/>
+          <xs:enumeration value="FEDEX_KINKOS"/>
           <xs:enumeration value="FEDEX_OFFICE"/>
+          <xs:enumeration value="FEDEX_SERVICES"/>
+          <xs:enumeration value="FEDEX_TRADE_NETWORKS"/>
         </xs:restriction>
       </xs:simpleType>
       <xs:simpleType name="PackagingType">
@@ -394,11 +724,42 @@
           <xs:enumeration value="FEDEX_25KG_BOX"/>
           <xs:enumeration value="FEDEX_BOX"/>
           <xs:enumeration value="FEDEX_ENVELOPE"/>
+          <xs:enumeration value="FEDEX_EXTRA_LARGE_BOX"/>
+          <xs:enumeration value="FEDEX_LARGE_BOX"/>
+          <xs:enumeration value="FEDEX_MEDIUM_BOX"/>
           <xs:enumeration value="FEDEX_PAK"/>
+          <xs:enumeration value="FEDEX_SMALL_BOX"/>
           <xs:enumeration value="FEDEX_TUBE"/>
           <xs:enumeration value="YOUR_PACKAGING"/>
         </xs:restriction>
       </xs:simpleType>
+      <xs:complexType name="PagingDetail">
+        <xs:sequence>
+          <xs:element name="PagingToken" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>When the MoreData field = true in a TrackReply the PagingToken must be sent in the subsequent TrackRequest to retrieve the next page of data.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="NumberOfResultsPerPage" type="xs:nonNegativeInteger" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies the number of results to display per page when the there is more than one page in the subsequent TrackReply.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="PieceCountLocationType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="DESTINATION"/>
+          <xs:enumeration value="ORIGIN"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:complexType name="PieceCountVerificationDetail">
+        <xs:sequence>
+          <xs:element name="CountLocationType" type="ns:PieceCountLocationType" minOccurs="0"/>
+          <xs:element name="Count" type="xs:nonNegativeInteger" minOccurs="0"/>
+          <xs:element name="Description" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
       <xs:complexType name="QualifiedTrackingNumber">
         <xs:annotation>
           <xs:documentation>Tracking number and additional shipment data used to identify a unique shipment for proof of delivery.</xs:documentation>
@@ -431,13 +792,115 @@
           </xs:element>
         </xs:sequence>
       </xs:complexType>
-      <xs:simpleType name="RedirectToHoldEligibilityType">
-        <xs:restriction base="xs:string">
-          <xs:enumeration value="ELIGIBLE"/>
-          <xs:enumeration value="INELIGIBLE"/>
-          <xs:enumeration value="POSSIBLY_ELIGIBLE"/>
-        </xs:restriction>
-      </xs:simpleType>
+      <xs:complexType name="SendNotificationsReply">
+        <xs:sequence>
+          <xs:element name="HighestSeverity" type="ns:NotificationSeverityType" minOccurs="1">
+            <xs:annotation>
+              <xs:documentation>This contains the severity type of the most severe Notification in the Notifications array.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Notifications" type="ns:Notification" minOccurs="1" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Information about the request/reply such was the transaction successful or not, and any additional information relevant to the request and/or reply. There may be multiple Notifications in a reply.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="TransactionDetail" type="ns:TransactionDetail" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Contains the CustomerTransactionDetail that is echoed back to the caller for matching requests and replies and a Localization element for defining the language/translation used in the reply data.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Version" type="ns:VersionId" minOccurs="1">
+            <xs:annotation>
+              <xs:documentation>Contains the version of the reply being used.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="DuplicateWaybill" type="xs:boolean" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>True if duplicate packages (more than one package with the same tracking number) have been found, the packages array contains information about each duplicate. Use this information to determine which of the tracking numbers is the one you need and resend your request using the tracking number and TrackingNumberUniqueIdentifier for that package.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="MoreDataAvailable" type="xs:boolean" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>True if additional packages remain to be retrieved.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="PagingToken" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Value that must be passed in a TrackNotification request to retrieve the next set of packages (when MoreDataAvailable = true).</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Packages" type="ns:TrackNotificationPackage" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Information about the notifications that are available for this tracking number. If there are duplicates the ship date and destination address information is returned for determining which TrackingNumberUniqueIdentifier to use on a subsequent request.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="SendNotificationsRequest">
+        <xs:sequence>
+          <xs:element name="WebAuthenticationDetail" type="ns:WebAuthenticationDetail" minOccurs="1">
+            <xs:annotation>
+              <xs:documentation>Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services).</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ClientDetail" type="ns:ClientDetail" minOccurs="1">
+            <xs:annotation>
+              <xs:documentation>Descriptive data identifying the client submitting the transaction.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="TransactionDetail" type="ns:TransactionDetail" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Contains a free form field that is echoed back in the reply to match requests with replies and data that governs the data payload language/translations</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Version" type="ns:VersionId" minOccurs="1"/>
+          <xs:element name="TrackingNumber" type="xs:string" minOccurs="1">
+            <xs:annotation>
+              <xs:documentation>The tracking number to which the notifications will be triggered from.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="MultiPiece" type="xs:boolean" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Indicates whether to return tracking information for all associated packages.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="PagingToken" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>When the MoreDataAvailable field is true in a TrackNotificationReply the PagingToken must be sent in the subsequent TrackNotificationRequest to retrieve the next page of data.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="TrackingNumberUniqueId" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Use this field when your original request informs you that there are duplicates of this tracking number. If you get duplicates you will also receive some information about each of the duplicate tracking numbers to enable you to chose one and resend that number along with the TrackingNumberUniqueId to get notifications for that tracking number.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ShipDateRangeBegin" type="xs:date" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>To narrow the search to a period in time the ShipDateRangeBegin and ShipDateRangeEnd can be used to help eliminate duplicates.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ShipDateRangeEnd" type="xs:date" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>To narrow the search to a period in time the ShipDateRangeBegin and ShipDateRangeEnd can be used to help eliminate duplicates.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="SenderEMailAddress" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Included in the email notification identifying the requester of this notification.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="SenderContactName" type="xs:string" minOccurs="1">
+            <xs:annotation>
+              <xs:documentation>Included in the email notification identifying the requester of this notification.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="NotificationDetail" type="ns:EMailNotificationDetail" minOccurs="1">
+            <xs:annotation>
+              <xs:documentation>Who to send the email notifications to and for which events. The notificationRecipientType and NotifyOnShipment fields are not used in this request.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
       <xs:simpleType name="ServiceType">
         <xs:annotation>
           <xs:documentation>The service type of the package/shipment.</xs:documentation>
@@ -449,11 +912,34 @@
           <xs:enumeration value="FEDEX_2_DAY_AM"/>
           <xs:enumeration value="FEDEX_2_DAY_FREIGHT"/>
           <xs:enumeration value="FEDEX_3_DAY_FREIGHT"/>
+          <xs:enumeration value="FEDEX_CARGO_AIRPORT_TO_AIRPORT"/>
+          <xs:enumeration value="FEDEX_CARGO_FREIGHT_FORWARDING"/>
+          <xs:enumeration value="FEDEX_CARGO_INTERNATIONAL_EXPRESS_FREIGHT"/>
+          <xs:enumeration value="FEDEX_CARGO_INTERNATIONAL_PREMIUM"/>
+          <xs:enumeration value="FEDEX_CARGO_MAIL"/>
+          <xs:enumeration value="FEDEX_CARGO_REGISTERED_MAIL"/>
+          <xs:enumeration value="FEDEX_CARGO_SURFACE_MAIL"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_AIR_EXPEDITE"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_AIR_EXPEDITE_EXCLUSIVE_USE"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_AIR_EXPEDITE_NETWORK"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_CHARTER_AIR"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_POINT_TO_POINT"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_SURFACE_EXPEDITE"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_SURFACE_EXPEDITE_EXCLUSIVE_USE"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_TEMP_ASSURE_AIR"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_TEMP_ASSURE_VALIDATED_AIR"/>
+          <xs:enumeration value="FEDEX_CUSTOM_CRITICAL_WHITE_GLOVE_SERVICES"/>
+          <xs:enumeration value="FEDEX_DISTANCE_DEFERRED"/>
           <xs:enumeration value="FEDEX_EXPRESS_SAVER"/>
           <xs:enumeration value="FEDEX_FIRST_FREIGHT"/>
           <xs:enumeration value="FEDEX_FREIGHT_ECONOMY"/>
           <xs:enumeration value="FEDEX_FREIGHT_PRIORITY"/>
           <xs:enumeration value="FEDEX_GROUND"/>
+          <xs:enumeration value="FEDEX_NEXT_DAY_AFTERNOON"/>
+          <xs:enumeration value="FEDEX_NEXT_DAY_EARLY_MORNING"/>
+          <xs:enumeration value="FEDEX_NEXT_DAY_END_OF_DAY"/>
+          <xs:enumeration value="FEDEX_NEXT_DAY_FREIGHT"/>
+          <xs:enumeration value="FEDEX_NEXT_DAY_MID_MORNING"/>
           <xs:enumeration value="FIRST_OVERNIGHT"/>
           <xs:enumeration value="GROUND_HOME_DELIVERY"/>
           <xs:enumeration value="INTERNATIONAL_DISTRIBUTION_FREIGHT"/>
@@ -465,10 +951,19 @@
           <xs:enumeration value="INTERNATIONAL_PRIORITY_DISTRIBUTION"/>
           <xs:enumeration value="INTERNATIONAL_PRIORITY_FREIGHT"/>
           <xs:enumeration value="PRIORITY_OVERNIGHT"/>
+          <xs:enumeration value="SAME_DAY"/>
+          <xs:enumeration value="SAME_DAY_CITY"/>
           <xs:enumeration value="SMART_POST"/>
           <xs:enumeration value="STANDARD_OVERNIGHT"/>
+          <xs:enumeration value="TRANSBORDER_DISTRIBUTION_CONSOLIDATION"/>
         </xs:restriction>
       </xs:simpleType>
+      <xs:complexType name="SignatureImageDetail">
+        <xs:sequence>
+          <xs:element name="Image" type="xs:base64Binary" minOccurs="0"/>
+          <xs:element name="Notifications" type="ns:Notification" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+      </xs:complexType>
       <xs:complexType name="SignatureProofOfDeliveryFaxReply">
         <xs:annotation>
           <xs:documentation>FedEx Signature Proof Of Delivery Fax reply.</xs:documentation>
@@ -554,6 +1049,7 @@
         </xs:annotation>
         <xs:restriction base="xs:string">
           <xs:enumeration value="PDF"/>
+          <xs:enumeration value="PNG"/>
         </xs:restriction>
       </xs:simpleType>
       <xs:complexType name="SignatureProofOfDeliveryLetterReply">
@@ -635,6 +1131,32 @@
           </xs:element>
         </xs:sequence>
       </xs:complexType>
+      <xs:complexType name="SpecialInstructionStatusDetail">
+        <xs:sequence>
+          <xs:element name="Status" type="ns:SpecialInstructionsStatusCode" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies the status of the track special instructions requested.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="StatusCreateTime" type="xs:dateTime" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Time when the status was changed.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="SpecialInstructionsStatusCode">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="ACCEPTED"/>
+          <xs:enumeration value="CANCELLED"/>
+          <xs:enumeration value="DENIED"/>
+          <xs:enumeration value="HELD"/>
+          <xs:enumeration value="MODIFIED"/>
+          <xs:enumeration value="RELINQUISHED"/>
+          <xs:enumeration value="REQUESTED"/>
+          <xs:enumeration value="SET"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:complexType name="StringBarcode">
         <xs:annotation>
           <xs:documentation>Each instance of this data type represents a barcode whose content must be represented as ASCII text (i.e. not binary data).</xs:documentation>
@@ -662,22 +1184,64 @@
           <xs:enumeration value="USPS"/>
         </xs:restriction>
       </xs:simpleType>
+      <xs:complexType name="TrackAdvanceNotificationDetail">
+        <xs:sequence>
+          <xs:element name="EstimatedTimeOfArrival" type="xs:dateTime" minOccurs="0"/>
+          <xs:element name="Reason" type="xs:string" minOccurs="0"/>
+          <xs:element name="Status" type="ns:TrackAdvanceNotificationStatusType" minOccurs="0"/>
+          <xs:element name="StatusDescription" type="xs:string" minOccurs="0"/>
+          <xs:element name="StatusTime" type="xs:dateTime" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="TrackAdvanceNotificationStatusType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="BACK_ON_TRACK"/>
+          <xs:enumeration value="FAIL"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:complexType name="TrackChargeDetail">
+        <xs:sequence>
+          <xs:element name="Type" type="ns:TrackChargeDetailType" minOccurs="0"/>
+          <xs:element name="ChargeAmount" type="ns:Money" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="TrackChargeDetailType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="ORIGINAL_CHARGES"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:simpleType name="TrackDeliveryLocationType">
         <xs:annotation>
           <xs:documentation>The delivery location at the delivered to address.</xs:documentation>
         </xs:annotation>
         <xs:restriction base="xs:string">
+          <xs:enumeration value="APARTMENT_OFFICE"/>
           <xs:enumeration value="FEDEX_LOCATION"/>
+          <xs:enumeration value="GATE_HOUSE"/>
           <xs:enumeration value="GUARD_OR_SECURITY_STATION"/>
           <xs:enumeration value="IN_BOND_OR_CAGE"/>
+          <xs:enumeration value="LEASING_OFFICE"/>
           <xs:enumeration value="MAILROOM"/>
+          <xs:enumeration value="MAIN_OFFICE"/>
+          <xs:enumeration value="MANAGER_OFFICE"/>
           <xs:enumeration value="OTHER"/>
           <xs:enumeration value="PHARMACY"/>
           <xs:enumeration value="RECEPTIONIST_OR_FRONT_DESK"/>
+          <xs:enumeration value="RENTAL_OFFICE"/>
           <xs:enumeration value="RESIDENCE"/>
           <xs:enumeration value="SHIPPING_RECEIVING"/>
         </xs:restriction>
       </xs:simpleType>
+      <xs:simpleType name="TrackDeliveryOptionType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="APPOINTMENT"/>
+          <xs:enumeration value="DATE_CERTAIN"/>
+          <xs:enumeration value="ELECTRONIC_SIGNATURE_RELEASE"/>
+          <xs:enumeration value="EVENING"/>
+          <xs:enumeration value="REDIRECT_TO_HOLD_AT_LOCATION"/>
+          <xs:enumeration value="REROUTE"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:complexType name="TrackDetail">
         <xs:annotation>
           <xs:documentation>Detailed tracking information about a particular package.</xs:documentation>
@@ -699,16 +1263,12 @@
               <xs:documentation>When duplicate tracking numbers exist this data is returned with summary information for each of the duplicates. The summary information is used to determine which of the duplicates the intended tracking number is. This identifier is used on a subsequent track request to retrieve the tracking data for the desired tracking number.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="StatusCode" type="xs:string" minOccurs="0">
+          <xs:element name="StatusDetail" type="ns:TrackStatusDetail" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>A code that identifies this type of status. This is the most recent status.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="StatusDescription" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>A human-readable description of this status.</xs:documentation>
+              <xs:documentation>Specifies details about the status of the shipment being tracked.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="CustomerExceptionRequests" type="ns:CustomerExceptionRequestDetail" minOccurs="0" maxOccurs="unbounded"/>
           <xs:element name="Reconciliation" type="ns:TrackReconciliation" minOccurs="0">
             <xs:annotation>
               <xs:documentation>Used to report the status of a piece of a multiple piece shipment which is no longer traveling with the rest of the packages in the shipment or has not been accounted for.</xs:documentation>
@@ -719,6 +1279,8 @@
               <xs:documentation>Used to convey information such as. 1. FedEx has received information about a package but has not yet taken possession of it. 2. FedEx has handed the package off to a third party for final delivery. 3. The package delivery has been cancelled</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="DestinationServiceArea" type="xs:string" minOccurs="0"/>
+          <xs:element name="DestinationServiceAreaDescription" type="xs:string" minOccurs="0"/>
           <xs:element name="CarrierCode" type="ns:CarrierCodeType" minOccurs="0">
             <xs:annotation>
               <xs:documentation>Identifies a FedEx operating company (transportation).</xs:documentation>
@@ -729,24 +1291,34 @@
               <xs:documentation>Identifies operating transportation company that is the specific to the carrier code.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="OperatingCompanyOrCarrierDescription" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies a detailed description about the carrier or the operating company.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="CartageAgentCompanyName" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>If the package was interlined to a cartage agent, this is the name of the cartage agent. (Returned for CSR SL only.)</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="ProductionLocationContactAndAddress" type="ns:ContactAndAddress" minOccurs="0">
             <xs:annotation>
               <xs:documentation>Specifies the FXO production centre contact and address.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="OtherIdentifiers" type="ns:TrackPackageIdentifier" minOccurs="0" maxOccurs="unbounded">
+          <xs:element name="OtherIdentifiers" type="ns:TrackOtherIdentifierDetail" minOccurs="0" maxOccurs="unbounded">
             <xs:annotation>
               <xs:documentation>Other related identifiers for this package such as reference numbers.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="ServiceInfo" type="xs:string" minOccurs="0">
+          <xs:element name="FormId" type="xs:string" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>Retained for legacy compatibility only. User/screen friendly description of the Service type (e.g. Priority Overnight).</xs:documentation>
+              <xs:documentation>(Returned for CSR SL only.)</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="ServiceType" type="ns:ServiceType" minOccurs="0">
+          <xs:element name="Service" type="ns:TrackServiceDescriptionDetail" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>Strict representation of the Service type (e.g. PRIORITY_OVERNIGHT).</xs:documentation>
+              <xs:documentation>Specifies details about service such as service description and type.</xs:documentation>
             </xs:annotation>
           </xs:element>
           <xs:element name="PackageWeight" type="ns:Weight" minOccurs="0">
@@ -789,8 +1361,40 @@
               <xs:documentation>The number of packages in this shipment.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="TrackReturnLabelType" type="ns:TrackReturnLabelType" minOccurs="0"/>
-          <xs:element name="TrackReturnDescription" type="xs:string" minOccurs="0"/>
+          <xs:element name="Charges" type="ns:TrackChargeDetail" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Specifies the details about the SPOC details.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="NickName" type="xs:string" minOccurs="0"/>
+          <xs:element name="Notes" type="xs:string" minOccurs="0"/>
+          <xs:element name="Attributes" type="ns:TrackDetailAttributeType" minOccurs="0" maxOccurs="unbounded"/>
+          <xs:element name="ShipmentContents" type="ns:ContentRecord" minOccurs="0" maxOccurs="unbounded"/>
+          <xs:element name="PackageContents" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+          <xs:element name="ClearanceLocationCode" type="xs:string" minOccurs="0"/>
+          <xs:element name="Commodities" type="ns:Commodity" minOccurs="0" maxOccurs="unbounded"/>
+          <xs:element name="ReturnDetail" type="ns:TrackReturnDetail" minOccurs="0"/>
+          <xs:element name="CustomsOptionDetails" type="ns:CustomsOptionDetail" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Specifies the reason for return.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="AdvanceNotificationDetail" type="ns:TrackAdvanceNotificationDetail" minOccurs="0"/>
+          <xs:element name="SpecialHandlings" type="ns:TrackSpecialHandling" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>List of special handlings that applied to this package. (Returned for CSR SL only.)</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Shipper" type="ns:Contact" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>(Returned for CSR SL only.)</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="PossessionStatus" type="ns:TrackPossessionStatusType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Indicates last-known possession of package (Returned for CSR SL only.)</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="ShipperAddress" type="ns:Address" minOccurs="0">
             <xs:annotation>
               <xs:documentation>The address information for the shipper.</xs:documentation>
@@ -801,6 +1405,11 @@
               <xs:documentation>The address of the FedEx pickup location/facility.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="OriginStationId" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>(Returned for CSR SL only.)</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="EstimatedPickupTimestamp" type="xs:dateTime" minOccurs="0">
             <xs:annotation>
               <xs:documentation>Estimated package pickup time for shipments that haven't been picked up.</xs:documentation>
@@ -821,16 +1430,54 @@
               <xs:documentation>Total distance package still has to travel. Returned for Custom Critical shipments.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="SpecialInstructions" type="ns:TrackSpecialInstruction" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Provides additional details about package delivery.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Recipient" type="ns:Contact" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>(Returned for CSR SL only.)</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="LastUpdatedDestinationAddress" type="ns:Address" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>This is the latest updated destination address.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="DestinationAddress" type="ns:Address" minOccurs="0">
             <xs:annotation>
               <xs:documentation>The address this package is to be (or has been) delivered.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="HoldAtLocationContact" type="ns:Contact" minOccurs="0"/>
+          <xs:element name="HoldAtLocationAddress" type="ns:Address" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The address this package is requested to placed on hold.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="DestinationStationId" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>(Returned for CSR SL only.)</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="DestinationLocationAddress" type="ns:Address" minOccurs="0">
             <xs:annotation>
               <xs:documentation>The address of the FedEx delivery location/facility.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="DestinationLocationType" type="ns:FedExLocationType" minOccurs="0"/>
+          <xs:element name="DestinationLocationTimeZoneOffset" type="xs:string" minOccurs="0"/>
+          <xs:element name="CommitmentTimestamp" type="xs:dateTime" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Date and time the package should be (or should have been) delivered. (Returned for CSR SL only.)</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="AppointmentDeliveryTimestamp" type="xs:dateTime" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Date and time the package would be delivered if the package has appointment delivery as a special service.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="EstimatedDeliveryTimestamp" type="xs:dateTime" minOccurs="0">
             <xs:annotation>
               <xs:documentation>Projected package delivery time based on ship time stamp, service and destination. Not populated if delivery has already occurred.</xs:documentation>
@@ -861,16 +1508,28 @@
               <xs:documentation>User/screen friendly representation of the DeliveryLocationType (delivery location at the delivered to address). Can be returned in localized text.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="DeliveryAttempts" type="xs:nonNegativeInteger" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies the number of delivery attempts made to deliver the shipment.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="DeliverySignatureName" type="xs:string" minOccurs="0">
             <xs:annotation>
               <xs:documentation>This is either the name of the person that signed for the package or "Signature not requested" or "Signature on file".</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="SignatureProofOfDeliveryAvailable" type="xs:boolean" minOccurs="0">
+          <xs:element name="PieceCountVerificationDetails" type="ns:PieceCountVerificationDetail" minOccurs="0" maxOccurs="unbounded">
             <xs:annotation>
-              <xs:documentation>True if signed for by signature image is available.</xs:documentation>
+              <xs:documentation>Specifies the details about the count of the packages delivered at the delivery location and the count of the packages at the origin.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="TotalUniqueAddressCountInConsolidation" type="xs:nonNegativeInteger" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies the total number of unique addresses on the CRNs in a consolidation.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="AvailableImages" type="ns:AvailableImageType" minOccurs="0" maxOccurs="unbounded"/>
+          <xs:element name="Signature" type="ns:SignatureImageDetail" minOccurs="0"/>
           <xs:element name="NotificationEventsAvailable" type="ns:EMailNotificationEventType" minOccurs="0" maxOccurs="unbounded">
             <xs:annotation>
               <xs:documentation>The types of email notifications that are available for the package.</xs:documentation>
@@ -881,9 +1540,9 @@
               <xs:documentation>Returned for cargo shipments only when they are currently split across vehicles.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="RedirectToHoldEligibility" type="ns:RedirectToHoldEligibilityType" minOccurs="0">
+          <xs:element name="DeliveryOptionEligibilityDetails" type="ns:DeliveryOptionEligibilityDetail" minOccurs="0" maxOccurs="unbounded">
             <xs:annotation>
-              <xs:documentation>Indicates redirection eligibility as determined by tracking service, subject to refinement/override by redirect-to-hold service.</xs:documentation>
+              <xs:documentation>Specifies the details about the eligibility for different delivery options.</xs:documentation>
             </xs:annotation>
           </xs:element>
           <xs:element name="Events" type="ns:TrackEvent" minOccurs="0" maxOccurs="unbounded">
@@ -893,6 +1552,11 @@
           </xs:element>
         </xs:sequence>
       </xs:complexType>
+      <xs:simpleType name="TrackDetailAttributeType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="INCLUDED_IN_WATCHLIST"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:complexType name="TrackEvent">
         <xs:annotation>
           <xs:documentation>FedEx scanning information about a package.</xs:documentation>
@@ -928,6 +1592,11 @@
               <xs:documentation>Address information of the station that is responsible for the scan.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="StationId" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>FedEx location ID where the scan took place. (Returned for CSR SL only.)</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="ArrivalLocation" type="ns:ArrivalLocationType" minOccurs="0">
             <xs:annotation>
               <xs:documentation>Indicates where the arrival actually occurred.</xs:documentation>
@@ -945,6 +1614,7 @@
           <xs:enumeration value="CUSTOMER_AUTHORIZATION_NUMBER"/>
           <xs:enumeration value="CUSTOMER_REFERENCE"/>
           <xs:enumeration value="DEPARTMENT"/>
+          <xs:enumeration value="DOCUMENT_AIRWAY_BILL"/>
           <xs:enumeration value="FREE_FORM_REFERENCE"/>
           <xs:enumeration value="GROUND_INTERNATIONAL"/>
           <xs:enumeration value="GROUND_SHIPMENT_ID"/>
@@ -953,9 +1623,11 @@
           <xs:enumeration value="JOB_GLOBAL_TRACKING_NUMBER"/>
           <xs:enumeration value="ORDER_GLOBAL_TRACKING_NUMBER"/>
           <xs:enumeration value="ORDER_TO_PAY_NUMBER"/>
+          <xs:enumeration value="OUTBOUND_LINK_TO_RETURN"/>
           <xs:enumeration value="PARTNER_CARRIER_NUMBER"/>
           <xs:enumeration value="PART_NUMBER"/>
           <xs:enumeration value="PURCHASE_ORDER"/>
+          <xs:enumeration value="REROUTE_TRACKING_NUMBER"/>
           <xs:enumeration value="RETURNED_TO_SHIPPER_TRACKING_NUMBER"/>
           <xs:enumeration value="RETURN_MATERIALS_AUTHORIZATION"/>
           <xs:enumeration value="SHIPPER_REFERENCE"/>
@@ -1010,123 +1682,11 @@
           </xs:element>
         </xs:sequence>
       </xs:complexType>
-      <xs:complexType name="TrackNotificationReply">
-        <xs:annotation>
-          <xs:documentation>FedEx Track Notification reply.</xs:documentation>
-        </xs:annotation>
-        <xs:sequence>
-          <xs:element name="HighestSeverity" type="ns:NotificationSeverityType" minOccurs="1">
-            <xs:annotation>
-              <xs:documentation>This contains the severity type of the most severe Notification in the Notifications array.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Notifications" type="ns:Notification" minOccurs="1" maxOccurs="unbounded">
-            <xs:annotation>
-              <xs:documentation>Information about the request/reply such was the transaction successful or not, and any additional information relevant to the request and/or reply. There may be multiple Notifications in a reply.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="TransactionDetail" type="ns:TransactionDetail" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Contains the CustomerTransactionDetail that is echoed back to the caller for matching requests and replies and a Localization element for defining the language/translation used in the reply data.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Version" type="ns:VersionId" minOccurs="1">
-            <xs:annotation>
-              <xs:documentation>Contains the version of the reply being used.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="DuplicateWaybill" type="xs:boolean" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>True if duplicate packages (more than one package with the same tracking number) have been found, the packages array contains information about each duplicate. Use this information to determine which of the tracking numbers is the one you need and resend your request using the tracking number and TrackingNumberUniqueIdentifier for that package.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="MoreDataAvailable" type="xs:boolean" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>True if additional packages remain to be retrieved.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="PagingToken" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Value that must be passed in a TrackNotification request to retrieve the next set of packages (when MoreDataAvailable = true).</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Packages" type="ns:TrackNotificationPackage" minOccurs="0" maxOccurs="unbounded">
-            <xs:annotation>
-              <xs:documentation>Information about the notifications that are available for this tracking number. If there are duplicates the ship date and destination address information is returned for determining which TrackingNumberUniqueIdentifier to use on a subsequent request.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-        </xs:sequence>
-      </xs:complexType>
-      <xs:complexType name="TrackNotificationRequest">
-        <xs:annotation>
-          <xs:documentation>FedEx Track Notification request.</xs:documentation>
-        </xs:annotation>
+      <xs:complexType name="TrackOtherIdentifierDetail">
         <xs:sequence>
-          <xs:element name="WebAuthenticationDetail" type="ns:WebAuthenticationDetail" minOccurs="1">
-            <xs:annotation>
-              <xs:documentation>Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services).</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ClientDetail" type="ns:ClientDetail" minOccurs="1">
-            <xs:annotation>
-              <xs:documentation>Descriptive data identifying the client submitting the transaction.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="TransactionDetail" type="ns:TransactionDetail" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Contains a free form field that is echoed back in the reply to match requests with replies and data that governs the data payload language/translations</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Version" type="ns:VersionId" minOccurs="1">
-            <xs:annotation>
-              <xs:documentation>Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply).</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="TrackingNumber" type="xs:string" minOccurs="1">
-            <xs:annotation>
-              <xs:documentation>The tracking number to which the notifications will be triggered from.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="MultiPiece" type="xs:boolean" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Indicates whether to return tracking information for all associated packages.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="PagingToken" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>When the MoreDataAvailable field is true in a TrackNotificationReply the PagingToken must be sent in the subsequent TrackNotificationRequest to retrieve the next page of data.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="TrackingNumberUniqueId" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Use this field when your original request informs you that there are duplicates of this tracking number. If you get duplicates you will also receive some information about each of the duplicate tracking numbers to enable you to chose one and resend that number along with the TrackingNumberUniqueId to get notifications for that tracking number.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ShipDateRangeBegin" type="xs:date" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>To narrow the search to a period in time the ShipDateRangeBegin and ShipDateRangeEnd can be used to help eliminate duplicates.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ShipDateRangeEnd" type="xs:date" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>To narrow the search to a period in time the ShipDateRangeBegin and ShipDateRangeEnd can be used to help eliminate duplicates.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="SenderEMailAddress" type="xs:string" minOccurs="1">
-            <xs:annotation>
-              <xs:documentation>Included in the email notification identifying the requester of this notification.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="SenderContactName" type="xs:string" minOccurs="1">
-            <xs:annotation>
-              <xs:documentation>Included in the email notification identifying the requester of this notification.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="NotificationDetail" type="ns:EMailNotificationDetail" minOccurs="1">
-            <xs:annotation>
-              <xs:documentation>Who to send the email notifications to and for which events. The notificationRecipientType and NotifyOnShipment fields are not used in this request.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
+          <xs:element name="PackageIdentifier" type="ns:TrackPackageIdentifier" minOccurs="0"/>
+          <xs:element name="TrackingNumberUniqueIdentifier" type="xs:string" minOccurs="0"/>
+          <xs:element name="CarrierCode" type="ns:CarrierCodeType" minOccurs="0"/>
         </xs:sequence>
       </xs:complexType>
       <xs:complexType name="TrackPackageIdentifier">
@@ -1134,18 +1694,41 @@
           <xs:documentation>The type and value of the package identifier that is to be used to retrieve the tracking information for a package.</xs:documentation>
         </xs:annotation>
         <xs:sequence>
-          <xs:element name="Value" type="xs:string" minOccurs="1">
+          <xs:element name="Type" type="ns:TrackIdentifierType" minOccurs="1">
             <xs:annotation>
-              <xs:documentation>The value to be used to retrieve tracking information for a package.</xs:documentation>
+              <xs:documentation>The type of the Value to be used to retrieve tracking information for a package (e.g. SHIPPER_REFERENCE, PURCHASE_ORDER, TRACKING_NUMBER_OR_DOORTAG, etc..) .</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="Type" type="ns:TrackIdentifierType" minOccurs="1">
+          <xs:element name="Value" type="xs:string" minOccurs="1">
             <xs:annotation>
-              <xs:documentation>The type of the Value to be used to retrieve tracking information for a package (e.g. SHIPPER_REFERENCE, PURCHASE_ORDER, TRACKING_NUMBER_OR_DOORTAG, etc..) .</xs:documentation>
+              <xs:documentation>The value to be used to retrieve tracking information for a package.</xs:documentation>
             </xs:annotation>
           </xs:element>
         </xs:sequence>
       </xs:complexType>
+      <xs:simpleType name="TrackPaymentType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="CASH_OR_CHECK_AT_DESTINATION"/>
+          <xs:enumeration value="CASH_OR_CHECK_AT_ORIGIN"/>
+          <xs:enumeration value="CREDIT_CARD_AT_DESTINATION"/>
+          <xs:enumeration value="CREDIT_CARD_AT_ORIGIN"/>
+          <xs:enumeration value="OTHER"/>
+          <xs:enumeration value="RECIPIENT_ACCOUNT"/>
+          <xs:enumeration value="SHIPPER_ACCOUNT"/>
+          <xs:enumeration value="THIRD_PARTY_ACCOUNT"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:simpleType name="TrackPossessionStatusType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="BROKER"/>
+          <xs:enumeration value="CARRIER"/>
+          <xs:enumeration value="CUSTOMS"/>
+          <xs:enumeration value="RECIPIENT"/>
+          <xs:enumeration value="SHIPPER"/>
+          <xs:enumeration value="SPLIT_STATUS"/>
+          <xs:enumeration value="TRANSFER_PARTNER"/>
+        </xs:restriction>
+      </xs:simpleType>
       <xs:complexType name="TrackReconciliation">
         <xs:annotation>
           <xs:documentation>Used to report the status of a piece of a multiple piece shipment which is no longer traveling with the rest of the packages in the shipment or has not been accounted for.</xs:documentation>
@@ -1188,24 +1771,9 @@
               <xs:documentation>Contains the version of the reply being used.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="DuplicateWaybill" type="xs:boolean" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>True if duplicate packages (more than one package with the same tracking number) have been found, and only limited data will be provided for each one.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="MoreData" type="xs:boolean" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>True if additional packages remain to be retrieved.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="PagingToken" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Value that must be passed in a TrackNotification request to retrieve the next set of packages (when MoreDataAvailable = true).</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="TrackDetails" type="ns:TrackDetail" minOccurs="0" maxOccurs="unbounded">
+          <xs:element name="CompletedTrackDetails" type="ns:CompletedTrackDetail" minOccurs="0" maxOccurs="unbounded">
             <xs:annotation>
-              <xs:documentation>Contains detailed tracking information for the requested packages(s).</xs:documentation>
+              <xs:documentation>Contains detailed tracking entity information.</xs:documentation>
             </xs:annotation>
           </xs:element>
         </xs:sequence>
@@ -1235,6 +1803,46 @@
               <xs:documentation>The version of the request being used.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="SelectionDetails" type="ns:TrackSelectionDetail" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Specifies the details needed to select the shipment being requested to be tracked.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="TransactionTimeOutValueInMilliseconds" type="xs:nonNegativeInteger" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The customer can specify a desired time out value for this particular transaction.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ProcessingOptions" type="ns:TrackRequestProcessingOptionType" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="TrackRequestProcessingOptionType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="INCLUDE_DETAILED_SCANS"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:complexType name="TrackReturnDetail">
+        <xs:sequence>
+          <xs:element name="MovementStatus" type="ns:TrackReturnMovementStatusType" minOccurs="0"/>
+          <xs:element name="LabelType" type="ns:TrackReturnLabelType" minOccurs="0"/>
+          <xs:element name="Description" type="xs:string" minOccurs="0"/>
+          <xs:element name="AuthorizationName" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="TrackReturnLabelType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="EMAIL"/>
+          <xs:enumeration value="PRINT"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:simpleType name="TrackReturnMovementStatusType">
+        <xs:restriction base="xs:string">
+          <xs:enumeration value="MOVEMENT_OCCURRED"/>
+          <xs:enumeration value="NO_MOVEMENT"/>
+        </xs:restriction>
+      </xs:simpleType>
+      <xs:complexType name="TrackSelectionDetail">
+        <xs:sequence>
           <xs:element name="CarrierCode" type="ns:CarrierCodeType" minOccurs="0">
             <xs:annotation>
               <xs:documentation>The FedEx operating company (transportation) used for this package's delivery.</xs:documentation>
@@ -1245,7 +1853,7 @@
               <xs:documentation>Identifies operating transportation company that is the specific to the carrier code.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="PackageIdentifier" type="ns:TrackPackageIdentifier" minOccurs="1">
+          <xs:element name="PackageIdentifier" type="ns:TrackPackageIdentifier" minOccurs="0">
             <xs:annotation>
               <xs:documentation>The type and value of the package identifier that is to be used to retrieve the tracking information for a package or group of packages.</xs:documentation>
             </xs:annotation>
@@ -1270,29 +1878,181 @@
               <xs:documentation>For tracking by references information either the account number or destination postal code and country must be provided.</xs:documentation>
             </xs:annotation>
           </xs:element>
+          <xs:element name="SecureSpodAccount" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies the SPOD account number for the shipment being tracked.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="Destination" type="ns:Address" minOccurs="0">
             <xs:annotation>
               <xs:documentation>For tracking by references information either the account number or destination postal code and country must be provided.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="IncludeDetailedScans" type="xs:boolean" minOccurs="0">
+          <xs:element name="PagingDetail" type="ns:PagingDetail" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>If false the reply will contain summary/profile data including current status. If true the reply contains profile + detailed scan activity for each package.</xs:documentation>
+              <xs:documentation>Specifies the details about how to retrieve the subsequent pages when there is more than one page in the TrackReply.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="PagingToken" type="xs:string" minOccurs="0">
+          <xs:element name="CustomerSpecifiedTimeOutValueInMilliseconds" type="xs:nonNegativeInteger" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>When the MoreData field = true in a TrackReply the PagingToken must be sent in the subsequent TrackRequest to retrieve the next page of data.</xs:documentation>
+              <xs:documentation>The customer can specify a desired time out value for this particular tracking number.</xs:documentation>
             </xs:annotation>
           </xs:element>
         </xs:sequence>
       </xs:complexType>
-      <xs:simpleType name="TrackReturnLabelType">
+      <xs:complexType name="TrackServiceDescriptionDetail">
+        <xs:sequence>
+          <xs:element name="Type" type="ns:ServiceType" minOccurs="0"/>
+          <xs:element name="Description" type="xs:string" minOccurs="0"/>
+          <xs:element name="ShortDescription" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies a shorter description for the service that is calculated per the service code.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="TrackSpecialHandling">
+        <xs:sequence>
+          <xs:element name="Type" type="ns:TrackSpecialHandlingType" minOccurs="0"/>
+          <xs:element name="Description" type="xs:string" minOccurs="0"/>
+          <xs:element name="PaymentType" type="ns:TrackPaymentType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:simpleType name="TrackSpecialHandlingType">
         <xs:restriction base="xs:string">
-          <xs:enumeration value="EMAIL"/>
-          <xs:enumeration value="PRINT"/>
+          <xs:enumeration value="ACCESSIBLE_DANGEROUS_GOODS"/>
+          <xs:enumeration value="ADULT_SIGNATURE_OPTION"/>
+          <xs:enumeration value="AIRBILL_AUTOMATION"/>
+          <xs:enumeration value="AIRBILL_DELIVERY"/>
+          <xs:enumeration value="ALCOHOL"/>
+          <xs:enumeration value="AM_DELIVERY_GUARANTEE"/>
+          <xs:enumeration value="APPOINTMENT_DELIVERY"/>
+          <xs:enumeration value="BILL_RECIPIENT"/>
+          <xs:enumeration value="BROKER_SELECT_OPTION"/>
+          <xs:enumeration value="CALL_BEFORE_DELIVERY"/>
+          <xs:enumeration value="CALL_TAG"/>
+          <xs:enumeration value="CALL_TAG_DAMAGE"/>
+          <xs:enumeration value="CHARGEABLE_CODE"/>
+          <xs:enumeration value="COD"/>
+          <xs:enumeration value="COLLECT"/>
+          <xs:enumeration value="CONSOLIDATION"/>
+          <xs:enumeration value="CONSOLIDATION_SMALLS_BAG"/>
+          <xs:enumeration value="CURRENCY"/>
+          <xs:enumeration value="CUT_FLOWERS"/>
+          <xs:enumeration value="DATE_CERTAIN_DELIVERY"/>
+          <xs:enumeration value="DELIVERY_ON_INVOICE_ACCEPTANCE"/>
+          <xs:enumeration value="DELIVERY_REATTEMPT"/>
+          <xs:enumeration value="DELIVERY_RECEIPT"/>
+          <xs:enumeration value="DELIVER_WEEKDAY"/>
+          <xs:enumeration value="DIRECT_SIGNATURE_OPTION"/>
+          <xs:enumeration value="DOMESTIC"/>
+          <xs:enumeration value="DO_NOT_BREAK_DOWN_PALLETS"/>
+          <xs:enumeration value="DO_NOT_STACK_PALLETS"/>
+          <xs:enumeration value="DRY_ICE"/>
+          <xs:enumeration value="DRY_ICE_ADDED"/>
+          <xs:enumeration value="EAST_COAST_SPECIAL"/>
+          <xs:enumeration value="ELECTRONIC_COD"/>
+          <xs:enumeration value="ELECTRONIC_SIGNATURE_SERVICE"/>
+          <xs:enumeration value="EVENING_DELIVERY"/>
+          <xs:enumeration value="EXCLUSIVE_USE"/>
+          <xs:enumeration value="EXTENDED_DELIVERY"/>
+          <xs:enumeration value="EXTENDED_PICKUP"/>
+          <xs:enumeration value="EXTRA_LABOR"/>
+          <xs:enumeration value="EXTREME_LENGTH"/>
+          <xs:enumeration value="FOOD"/>
+          <xs:enumeration value="FREIGHT_ON_VALUE_CARRIER_RISK"/>
+          <xs:enumeration value="FREIGHT_ON_VALUE_OWN_RISK"/>
+          <xs:enumeration value="FREIGHT_TO_COLLECT"/>
+          <xs:enumeration value="FULLY_REGULATED_DANGEROUS_GOODS"/>
+          <xs:enumeration value="GEL_PACKS_ADDED_OR_REPLACED"/>
+          <xs:enumeration value="GROUND_SUPPORT_FOR_SMARTPOST"/>
+          <xs:enumeration value="GUARANTEED_FUNDS"/>
+          <xs:enumeration value="HAZMAT"/>
+          <xs:enumeration value="HIGH_FLOOR"/>
+          <xs:enumeration value="HOLD_AT_LOCATION"/>
+          <xs:enumeration value="HOLIDAY_DELIVERY"/>
+          <xs:enumeration value="INACCESSIBLE_DANGEROUS_GOODS"/>
+          <xs:enumeration value="INDIRECT_SIGNATURE_OPTION"/>
+          <xs:enumeration value="INSIDE_DELIVERY"/>
+          <xs:enumeration value="INSIDE_PICKUP"/>
+          <xs:enumeration value="INTERNATIONAL"/>
+          <xs:enumeration value="INTERNATIONAL_CONTROLLED_EXPORT"/>
+          <xs:enumeration value="INTERNATIONAL_MAIL_SERVICE"/>
+          <xs:enumeration value="INTERNATIONAL_TRAFFIC_IN_ARMS_REGULATIONS"/>
+          <xs:enumeration value="LIFTGATE"/>
+          <xs:enumeration value="LIFTGATE_DELIVERY"/>
+          <xs:enumeration value="LIFTGATE_PICKUP"/>
+          <xs:enumeration value="LIMITED_ACCESS_DELIVERY"/>
+          <xs:enumeration value="LIMITED_ACCESS_PICKUP"/>
+          <xs:enumeration value="LIMITED_QUANTITIES_DANGEROUS_GOODS"/>
+          <xs:enumeration value="MARKING_OR_TAGGING"/>
+          <xs:enumeration value="NET_RETURN"/>
+          <xs:enumeration value="NON_BUSINESS_TIME"/>
+          <xs:enumeration value="NON_STANDARD_CONTAINER"/>
+          <xs:enumeration value="NO_SIGNATURE_REQUIRED_SIGNATURE_OPTION"/>
+          <xs:enumeration value="ORDER_NOTIFY"/>
+          <xs:enumeration value="OTHER"/>
+          <xs:enumeration value="OTHER_REGULATED_MATERIAL_DOMESTIC"/>
+          <xs:enumeration value="PACKAGE_RETURN_PROGRAM"/>
+          <xs:enumeration value="PIECE_COUNT_VERIFICATION"/>
+          <xs:enumeration value="POISON"/>
+          <xs:enumeration value="PREPAID"/>
+          <xs:enumeration value="PRIORITY_ALERT"/>
+          <xs:enumeration value="PRIORITY_ALERT_PLUS"/>
+          <xs:enumeration value="PROTECTION_FROM_FREEZING"/>
+          <xs:enumeration value="RAIL_MODE"/>
+          <xs:enumeration value="RECONSIGNMENT_CHARGES"/>
+          <xs:enumeration value="REROUTE_CROSS_COUNTRY_DEFERRED"/>
+          <xs:enumeration value="REROUTE_CROSS_COUNTRY_EXPEDITED"/>
+          <xs:enumeration value="REROUTE_LOCAL"/>
+          <xs:enumeration value="RESIDENTIAL_DELIVERY"/>
+          <xs:enumeration value="RESIDENTIAL_PICKUP"/>
+          <xs:enumeration value="RETURNS_CLEARANCE"/>
+          <xs:enumeration value="RETURNS_CLEARANCE_SPECIAL_ROUTING_REQUIRED"/>
+          <xs:enumeration value="RETURN_MANAGER"/>
+          <xs:enumeration value="SATURDAY_DELIVERY"/>
+          <xs:enumeration value="SHIPMENT_PLACED_IN_COLD_STORAGE"/>
+          <xs:enumeration value="SINGLE_SHIPMENT"/>
+          <xs:enumeration value="SMALL_QUANTITY_EXCEPTION"/>
+          <xs:enumeration value="SORT_AND_SEGREGATE"/>
+          <xs:enumeration value="SPECIAL_DELIVERY"/>
+          <xs:enumeration value="SPECIAL_EQUIPMENT"/>
+          <xs:enumeration value="STANDARD_GROUND_SERVICE"/>
+          <xs:enumeration value="STORAGE"/>
+          <xs:enumeration value="SUNDAY_DELIVERY"/>
+          <xs:enumeration value="THIRD_PARTY_BILLING"/>
+          <xs:enumeration value="THIRD_PARTY_CONSIGNEE"/>
+          <xs:enumeration value="TOP_LOAD"/>
+          <xs:enumeration value="WEEKEND_DELIVERY"/>
+          <xs:enumeration value="WEEKEND_PICKUP"/>
         </xs:restriction>
       </xs:simpleType>
+      <xs:complexType name="TrackSpecialInstruction">
+        <xs:sequence>
+          <xs:element name="Description" type="xs:string" minOccurs="0"/>
+          <xs:element name="DeliveryOption" type="ns:TrackDeliveryOptionType" minOccurs="0"/>
+          <xs:element name="StatusDetail" type="ns:SpecialInstructionStatusDetail" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies the status and status update time of the track special instructions.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="OriginalEstimatedDeliveryTimestamp" type="xs:dateTime" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies the estimated delivery time that was originally estimated when the shipment was shipped.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="OriginalRequestTime" type="xs:dateTime" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies the time the customer requested a change to the shipment.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="RequestedAppointmentTime" type="ns:AppointmentDetail" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The requested appointment time for delivery.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
       <xs:complexType name="TrackSplitShipmentPart">
         <xs:annotation>
           <xs:documentation>Used when a cargo shipment is split across vehicles. This is used to give the status of each part of the shipment.</xs:documentation>
@@ -1320,6 +2080,26 @@
           </xs:element>
         </xs:sequence>
       </xs:complexType>
+      <xs:complexType name="TrackStatusAncillaryDetail">
+        <xs:sequence>
+          <xs:element name="Reason" type="xs:string" minOccurs="0"/>
+          <xs:element name="ReasonDescription" type="xs:string" minOccurs="0"/>
+          <xs:element name="Action" type="xs:string" minOccurs="0"/>
+          <xs:element name="ActionDescription" type="xs:string" minOccurs="0"/>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:complexType name="TrackStatusDetail">
+        <xs:annotation>
+          <xs:documentation>Specifies the details about the status of the track information for the shipments being tracked.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+          <xs:element name="CreationTime" type="xs:dateTime" minOccurs="0"/>
+          <xs:element name="Code" type="xs:string" minOccurs="0"/>
+          <xs:element name="Description" type="xs:string" minOccurs="0"/>
+          <xs:element name="Location" type="ns:Address" minOccurs="0"/>
+          <xs:element name="AncillaryDetails" type="ns:TrackStatusAncillaryDetail" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+      </xs:complexType>
       <xs:complexType name="TransactionDetail">
         <xs:annotation>
           <xs:documentation>Descriptive data that governs data payload language/translations.  The TransactionDetail from the request is echoed back to the caller in the corresponding reply.</xs:documentation>
@@ -1368,6 +2148,11 @@
           <xs:documentation>Used in authentication of the sender's identity.</xs:documentation>
         </xs:annotation>
         <xs:sequence>
+          <xs:element name="ParentCredential" type="ns:WebAuthenticationCredential" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>This was renamed from cspCredential.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
           <xs:element name="UserCredential" type="ns:WebAuthenticationCredential" minOccurs="1">
             <xs:annotation>
               <xs:documentation>Credential used to authenticate a specific software application. This value is provided by FedEx after registration.</xs:documentation>
@@ -1402,7 +2187,7 @@
               <xs:documentation>Identifies a system or sub-system which performs an operation.</xs:documentation>
             </xs:annotation>
           </xs:element>
-          <xs:element name="Major" type="xs:int" fixed="5" minOccurs="1">
+          <xs:element name="Major" type="xs:int" fixed="10" minOccurs="1">
             <xs:annotation>
               <xs:documentation>Identifies the service business level.</xs:documentation>
             </xs:annotation>
@@ -1421,6 +2206,9 @@
       </xs:complexType>
     </xs:schema>
   </types>
+  <message name="SendNotificationsReply">
+    <part name="SendNotificationsReply" element="ns:SendNotificationsReply"/>
+  </message>
   <message name="SignatureProofOfDeliveryFaxReply">
     <part name="SignatureProofOfDeliveryFaxReply" element="ns:SignatureProofOfDeliveryFaxReply"/>
   </message>
@@ -1433,11 +2221,8 @@
   <message name="SignatureProofOfDeliveryLetterRequest">
     <part name="SignatureProofOfDeliveryLetterRequest" element="ns:SignatureProofOfDeliveryLetterRequest"/>
   </message>
-  <message name="TrackNotificationRequest">
-    <part name="TrackNotificationRequest" element="ns:TrackNotificationRequest"/>
-  </message>
-  <message name="TrackNotificationReply">
-    <part name="TrackNotificationReply" element="ns:TrackNotificationReply"/>
+  <message name="SendNotificationsRequest">
+    <part name="SendNotificationsRequest" element="ns:SendNotificationsRequest"/>
   </message>
   <message name="TrackReply">
     <part name="TrackReply" element="ns:TrackReply"/>
@@ -1446,10 +2231,6 @@
     <part name="SignatureProofOfDeliveryLetterReply" element="ns:SignatureProofOfDeliveryLetterReply"/>
   </message>
   <portType name="TrackPortType">
-    <operation name="getTrackNotification" parameterOrder="TrackNotificationRequest">
-      <input message="ns:TrackNotificationRequest"/>
-      <output message="ns:TrackNotificationReply"/>
-    </operation>
     <operation name="retrieveSignatureProofOfDeliveryLetter" parameterOrder="SignatureProofOfDeliveryLetterRequest">
       <input message="ns:SignatureProofOfDeliveryLetterRequest"/>
       <output message="ns:SignatureProofOfDeliveryLetterReply"/>
@@ -1462,11 +2243,15 @@
       <input message="ns:SignatureProofOfDeliveryFaxRequest"/>
       <output message="ns:SignatureProofOfDeliveryFaxReply"/>
     </operation>
+    <operation name="sendNotifications" parameterOrder="SendNotificationsRequest">
+      <input message="ns:SendNotificationsRequest"/>
+      <output message="ns:SendNotificationsReply"/>
+    </operation>
   </portType>
   <binding name="TrackServiceSoapBinding" type="ns:TrackPortType">
     <s1:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
-    <operation name="getTrackNotification">
-      <s1:operation soapAction="getTrackNotification" style="document"/>
+    <operation name="retrieveSignatureProofOfDeliveryLetter">
+      <s1:operation soapAction="http://fedex.com/ws/track/v10/retrieveSignatureProofOfDeliveryLetter" style="document"/>
       <input>
         <s1:body use="literal"/>
       </input>
@@ -1474,8 +2259,8 @@
         <s1:body use="literal"/>
       </output>
     </operation>
-    <operation name="retrieveSignatureProofOfDeliveryLetter">
-      <s1:operation soapAction="retrieveSignatureProofOfDeliveryLetter" style="document"/>
+    <operation name="track">
+      <s1:operation soapAction="http://fedex.com/ws/track/v10/track" style="document"/>
       <input>
         <s1:body use="literal"/>
       </input>
@@ -1483,8 +2268,8 @@
         <s1:body use="literal"/>
       </output>
     </operation>
-    <operation name="track">
-      <s1:operation soapAction="track" style="document"/>
+    <operation name="sendSignatureProofOfDeliveryFax">
+      <s1:operation soapAction="http://fedex.com/ws/track/v10/sendSignatureProofOfDeliveryFax" style="document"/>
       <input>
         <s1:body use="literal"/>
       </input>
@@ -1492,8 +2277,8 @@
         <s1:body use="literal"/>
       </output>
     </operation>
-    <operation name="sendSignatureProofOfDeliveryFax">
-      <s1:operation soapAction="sendSignatureProofOfDeliveryFax" style="document"/>
+    <operation name="sendNotifications">
+      <s1:operation soapAction="http://fedex.com/ws/track/v10/sendNotifications" style="document"/>
       <input>
         <s1:body use="literal"/>
       </input>
@@ -1504,7 +2289,7 @@
   </binding>
   <service name="TrackService">
     <port name="TrackServicePort" binding="ns:TrackServiceSoapBinding">
-      <s1:address location=""/>
+      <s1:address location="https://wsbeta.fedex.com:443/web-services/track"/>
     </port>
   </service>
-</definitions>
+</definitions>
\ No newline at end of file
diff --git a/app/code/Magento/GiftMessage/Block/Message/Multishipping/Plugin/ItemsBox.php b/app/code/Magento/GiftMessage/Block/Message/Multishipping/Plugin/ItemsBox.php
index e79052a1fb3e3826977f625e167384bd8127fdb7..acc5fb484ada7a2ccd76b1d426b9d1eed5a398ae 100644
--- a/app/code/Magento/GiftMessage/Block/Message/Multishipping/Plugin/ItemsBox.php
+++ b/app/code/Magento/GiftMessage/Block/Message/Multishipping/Plugin/ItemsBox.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\GiftMessage\Block\Message\Multishipping\Plugin;
 
+use Magento\Multishipping\Block\Checkout\Shipping as ShippingBlock;
+use Magento\GiftMessage\Helper\Message as MessageHelper;
+use Magento\Framework\DataObject;
+
 /**
  * Multishipping items box plugin
  */
@@ -13,16 +17,16 @@ class ItemsBox
     /**
      * Gift message helper
      *
-     * @var \Magento\GiftMessage\Helper\Message
+     * @var MessageHelper
      */
     protected $helper;
 
     /**
      * Construct
      *
-     * @param \Magento\GiftMessage\Helper\Message $helper
+     * @param MessageHelper $helper
      */
-    public function __construct(\Magento\GiftMessage\Helper\Message $helper)
+    public function __construct(MessageHelper $helper)
     {
         $this->helper = $helper;
     }
@@ -30,19 +34,15 @@ class ItemsBox
     /**
      * Get items box message text for multishipping
      *
-     * @param \Magento\Multishipping\Block\Checkout\Shipping $subject
-     * @param callable $proceed
-     * @param \Magento\Framework\DataObject $addressEntity
+     * @param ShippingBlock $subject
+     * @param string $itemsBoxText
+     * @param DataObject $addressEntity
      *
      * @return string
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundGetItemsBoxTextAfter(
-        \Magento\Multishipping\Block\Checkout\Shipping $subject,
-        \Closure $proceed,
-        \Magento\Framework\DataObject $addressEntity
-    ) {
-        $itemsBoxText = $proceed($addressEntity);
+    public function afterGetItemsBoxTextAfter(ShippingBlock $subject, $itemsBoxText, DataObject $addressEntity)
+    {
         return $itemsBoxText . $this->helper->getInline('multishipping_address', $addressEntity);
     }
 }
diff --git a/app/code/Magento/GiftMessage/Model/Plugin/QuoteItem.php b/app/code/Magento/GiftMessage/Model/Plugin/QuoteItem.php
index 0faee488baea061b83e1180a715dd213a5ceec07..6367fd7ced4052e06cd7b787c98de861ed8b166a 100644
--- a/app/code/Magento/GiftMessage/Model/Plugin/QuoteItem.php
+++ b/app/code/Magento/GiftMessage/Model/Plugin/QuoteItem.php
@@ -5,40 +5,42 @@
  */
 namespace Magento\GiftMessage\Model\Plugin;
 
-use Closure;
-use Magento\Sales\Model\Order\Item;
+use Magento\Sales\Api\Data\OrderItemInterface;
+use Magento\GiftMessage\Helper\Message as MessageHelper;
+use Magento\Quote\Model\Quote\Item\ToOrderItem;
+use Magento\Quote\Model\Quote\Item\AbstractItem;
 
 class QuoteItem
 {
     /**
-     * @var \Magento\GiftMessage\Helper\Message
+     * @var MessageHelper
      */
     protected $_helper;
 
     /**
-     * @param \Magento\GiftMessage\Helper\Message $helper
+     * @param MessageHelper $helper
      */
-    public function __construct(\Magento\GiftMessage\Helper\Message $helper)
+    public function __construct(MessageHelper $helper)
     {
         $this->_helper = $helper;
     }
 
     /**
-     * @param \Magento\Quote\Model\Quote\Item\ToOrderItem $subject
-     * @param callable $proceed
-     * @param \Magento\Quote\Model\Quote\Item\AbstractItem $item
+     * Apply gift message per every item in order if available
+     *
+     * @param ToOrderItem $subject
+     * @param OrderItemInterface $orderItem
+     * @param AbstractItem $item
      * @param array $additional
-     * @return Item
+     * @return OrderItemInterface
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundConvert(
-        \Magento\Quote\Model\Quote\Item\ToOrderItem $subject,
-        Closure $proceed,
-        \Magento\Quote\Model\Quote\Item\AbstractItem $item,
+    public function afterConvert(
+        ToOrderItem $subject,
+        OrderItemInterface $orderItem,
+        AbstractItem $item,
         $additional = []
     ) {
-        /** @var $orderItem Item */
-        $orderItem = $proceed($item, $additional);
         $isAvailable = $this->_helper->isMessagesAllowed('item', $item, $item->getStoreId());
 
         $orderItem->setGiftMessageId($item->getGiftMessageId());
diff --git a/app/code/Magento/GiftMessage/Test/Unit/Model/Plugin/QuoteItemTest.php b/app/code/Magento/GiftMessage/Test/Unit/Model/Plugin/QuoteItemTest.php
index ad099bebc8847d7556414d6118687c1da108c8d5..cfb8f1463d6eb0d8aba41e60a271ebc4ccfa33f7 100644
--- a/app/code/Magento/GiftMessage/Test/Unit/Model/Plugin/QuoteItemTest.php
+++ b/app/code/Magento/GiftMessage/Test/Unit/Model/Plugin/QuoteItemTest.php
@@ -68,7 +68,7 @@ class QuoteItemTest extends \PHPUnit_Framework_TestCase
         $this->model = new \Magento\GiftMessage\Model\Plugin\QuoteItem($this->helperMock);
     }
 
-    public function testAroundItemToOrderItem()
+    public function testAfterItemToOrderItem()
     {
         $storeId = 1;
         $giftMessageId = 1;
@@ -99,7 +99,7 @@ class QuoteItemTest extends \PHPUnit_Framework_TestCase
 
         $this->assertSame(
             $this->orderItemMock,
-            $this->model->aroundConvert($this->subjectMock, $this->closureMock, $this->quoteItemMock, [])
+            $this->model->afterConvert($this->subjectMock, $this->orderItemMock, $this->quoteItemMock, [])
         );
     }
 }
diff --git a/app/code/Magento/GroupedProduct/Model/ResourceModel/Product/Link/RelationPersister.php b/app/code/Magento/GroupedProduct/Model/ResourceModel/Product/Link/RelationPersister.php
index f83b34ec3b30d694207511fc096a87a1b90ff90c..f431bf3af952b2109b60e44436944f9040e16049 100644
--- a/app/code/Magento/GroupedProduct/Model/ResourceModel/Product/Link/RelationPersister.php
+++ b/app/code/Magento/GroupedProduct/Model/ResourceModel/Product/Link/RelationPersister.php
@@ -9,6 +9,7 @@ namespace Magento\GroupedProduct\Model\ResourceModel\Product\Link;
 use Magento\Catalog\Model\ProductLink\LinkFactory;
 use Magento\Catalog\Model\ResourceModel\Product\Link;
 use Magento\Catalog\Model\ResourceModel\Product\Relation;
+use Magento\GroupedProduct\Model\ResourceModel\Product\Link as GroupedLink;
 
 class RelationPersister
 {
@@ -38,17 +39,16 @@ class RelationPersister
      * Save grouped products to product relation table
      *
      * @param Link $subject
-     * @param \Closure $proceed
+     * @param Link $result
      * @param int $parentId
      * @param array $data
      * @param int $typeId
      * @return Link
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundSaveProductLinks(Link $subject, \Closure $proceed, $parentId, $data, $typeId)
+    public function afterSaveProductLinks(Link $subject, Link $result, $parentId, $data, $typeId)
     {
-        $result = $proceed($parentId, $data, $typeId);
-        if ($typeId == \Magento\GroupedProduct\Model\ResourceModel\Product\Link::LINK_TYPE_GROUPED) {
+        if ($typeId == GroupedLink::LINK_TYPE_GROUPED) {
             foreach ($data as $linkData) {
                 $this->relationProcessor->addRelation(
                     $parentId,
@@ -73,7 +73,7 @@ class RelationPersister
         $link = $this->linkFactory->create();
         $subject->load($link, $linkId, $subject->getIdFieldName());
         $result = $proceed($linkId);
-        if ($link->getLinkTypeId() == \Magento\GroupedProduct\Model\ResourceModel\Product\Link::LINK_TYPE_GROUPED) {
+        if ($link->getLinkTypeId() == GroupedLink::LINK_TYPE_GROUPED) {
             $this->relationProcessor->removeRelations(
                 $link->getProductId(),
                 $link->getLinkedProductId()
diff --git a/app/code/Magento/GroupedProduct/Model/Sales/AdminOrder/Product/Quote/Plugin/Initializer.php b/app/code/Magento/GroupedProduct/Model/Sales/AdminOrder/Product/Quote/Plugin/Initializer.php
index f1204efa714a502cfec8563e408df353e4f89b53..2ab99856df306f9af5b2d951bb75785e64107c95 100644
--- a/app/code/Magento/GroupedProduct/Model/Sales/AdminOrder/Product/Quote/Plugin/Initializer.php
+++ b/app/code/Magento/GroupedProduct/Model/Sales/AdminOrder/Product/Quote/Plugin/Initializer.php
@@ -18,7 +18,7 @@ class Initializer
 {
     /**
      * @param \Magento\Sales\Model\AdminOrder\Product\Quote\Initializer $subject
-     * @param callable $proceed
+     * @param \Magento\Quote\Model\Quote\Item|string $item
      * @param \Magento\Quote\Model\Quote $quote
      * @param \Magento\Catalog\Model\Product $product
      * @param \Magento\Framework\DataObject $config
@@ -26,15 +26,13 @@ class Initializer
      * @return \Magento\Quote\Model\Quote\Item|string
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundInit(
+    public function afterInit(
         \Magento\Sales\Model\AdminOrder\Product\Quote\Initializer $subject,
-        \Closure $proceed,
+        $item,
         \Magento\Quote\Model\Quote $quote,
         \Magento\Catalog\Model\Product $product,
         \Magento\Framework\DataObject $config
     ) {
-        $item = $proceed($quote, $product, $config);
-
         if (is_string($item) && $product->getTypeId() != Grouped::TYPE_CODE) {
             $item = $quote->addProduct(
                 $product,
diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Model/ResourceModel/Product/Link/RelationPersisterTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Model/ResourceModel/Product/Link/RelationPersisterTest.php
index d11539945b0e84f7437b43975de4abc6db00dcc3..49bcd76cc2b83d0f838438e333924eaca62b912e 100644
--- a/app/code/Magento/GroupedProduct/Test/Unit/Model/ResourceModel/Product/Link/RelationPersisterTest.php
+++ b/app/code/Magento/GroupedProduct/Test/Unit/Model/ResourceModel/Product/Link/RelationPersisterTest.php
@@ -3,13 +3,14 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
 namespace Magento\GroupedProduct\Test\Unit\Model\ResourceModel\Product\Link;
 
 use Magento\GroupedProduct\Model\ResourceModel\Product\Link\RelationPersister;
 use Magento\Catalog\Model\ProductLink\LinkFactory;
 use Magento\Catalog\Model\Product\Link;
 use Magento\Catalog\Model\ResourceModel\Product\Relation;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Catalog\Model\ResourceModel\Product\Link as LinkResourceModel;
 
 class RelationPersisterTest extends \PHPUnit_Framework_TestCase
 {
@@ -22,12 +23,29 @@ class RelationPersisterTest extends \PHPUnit_Framework_TestCase
     /** @var  Relation */
     private $relationProcessor;
 
+    /**
+     * @var ObjectManager
+     */
+    private $objectManager;
+
+    /**
+     * @var LinkFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $linkFactory;
+
+    /**
+     * @var LinkResourceModel|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $subject;
+
     /**
      * @inheritDoc
      */
     protected function setUp()
     {
-        $linkFactory = $this->getMockBuilder(LinkFactory::class)
+        $this->objectManager = new ObjectManager($this);
+
+        $this->linkFactory = $this->getMockBuilder(LinkFactory::class)
             ->setMethods(['create'])
             ->disableOriginalConstructor()
             ->getMock();
@@ -41,23 +59,27 @@ class RelationPersisterTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $linkFactory->expects($this->any())->method('create')->willReturn($this->link);
+        $this->linkFactory->expects($this->any())->method('create')->willReturn($this->link);
 
-        $this->object = new RelationPersister(
-            $this->relationProcessor,
-            $linkFactory
+        $this->subject = $this->getMockBuilder(LinkResourceModel::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->object = $this->objectManager->getObject(
+            RelationPersister::class,
+            [
+                'relationProcessor' => $this->relationProcessor,
+                'linkFactory' => $this->linkFactory
+            ]
         );
     }
 
-    public function testAroundSaveProductLinks()
+    public function testAfterSaveProductLinks()
     {
-        $subject = $this->getMockBuilder(\Magento\Catalog\Model\ResourceModel\Product\Link::class)
-            ->disableOriginalConstructor()
-            ->getMock();
         $this->relationProcessor->expects($this->once())->method('addRelation')->with(2, 10);
-        $this->assertEquals($subject, $this->object->aroundSaveProductLinks(
-            $subject,
-            function() use ($subject) { return $subject; },
+        $this->assertEquals($this->subject, $this->object->afterSaveProductLinks(
+            $this->subject,
+            $this->subject,
             2,
             [['product_id' => 10]],
             3
@@ -87,10 +109,11 @@ class RelationPersisterTest extends \PHPUnit_Framework_TestCase
             $subject,
             $this->object->aroundDeleteProductLink(
                 $subject,
-                function() use ($subject) { return $subject; },
+                function () use ($subject) {
+                    return $subject;
+                },
                 155
             )
         );
-
     }
 }
diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Model/Sales/AdminOrder/Product/Quote/Plugin/InitializerTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Model/Sales/AdminOrder/Product/Quote/Plugin/InitializerTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..43d7aa93dd0df9d6030640114241dfe64273209a
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/Test/Unit/Model/Sales/AdminOrder/Product/Quote/Plugin/InitializerTest.php
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\GroupedProduct\Test\Unit\Model\Sales\AdminOrder\Product\Quote\Plugin;
+
+use Magento\GroupedProduct\Model\Sales\AdminOrder\Product\Quote\Plugin\Initializer as QuoteInitializerPlugin;
+use Magento\Sales\Model\AdminOrder\Product\Quote\Initializer as QuoteInitializer;
+use Magento\Quote\Model\Quote;
+use Magento\Catalog\Model\Product;
+use Magento\Quote\Model\Quote\Item as QuoteItem;
+use Magento\Framework\DataObject;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+
+class InitializerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ObjectManagerHelper
+     */
+    private $objectManagerHelper;
+
+    /**
+     * @var QuoteInitializerPlugin|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $plugin;
+
+    /**
+     * @var QuoteInitializer|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $initializer;
+
+    /**
+     * @var Quote|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $quote;
+
+    /**
+     * @var QuoteItem|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $quoteItem;
+
+    /**
+     * @var Product|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $product;
+
+    /**
+     * @var DataObject|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $config;
+
+    protected function setUp()
+    {
+        $this->objectManagerHelper = new ObjectManagerHelper($this);
+
+        $this->initializer = $this->getMockBuilder(QuoteInitializer::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->quote = $this->getMockBuilder(Quote::class)
+            ->setMethods(['addProduct'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->product = $this->getMockBuilder(Product::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getTypeId'])
+            ->getMock();
+        $this->quoteItem = $this->getMockBuilder(QuoteItem::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->config = $this->getMockBuilder(DataObject::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->plugin = $this->objectManagerHelper->getObject(
+            QuoteInitializerPlugin::class
+        );
+    }
+
+    public function testAfterInit()
+    {
+        $this->assertSame(
+            $this->quoteItem,
+            $this->plugin->afterInit($this->initializer, $this->quoteItem, $this->quote, $this->product, $this->config)
+        );
+    }
+}
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php
index 81b558f3267e28d48d186d6198522f28e854da06..a75aec617f947bbb4d06ce7dd8df40069e8e0680 100644
--- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php
+++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php
@@ -147,8 +147,7 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements
      */
     public function getResourcesTreeJson()
     {
-        $resources = $this->_resourceProvider->getAclResources();
-        $aclResourcesTree = $this->_integrationData->mapResources($resources[1]['children']);
+        $aclResourcesTree = $this->_integrationData->mapResources($this->getAclResources());
 
         return $this->encoder->encode($aclResourcesTree);
     }
@@ -166,12 +165,29 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements
     {
         $selectedResources = $this->_selectedResources;
         if ($this->isEverythingAllowed()) {
-            $resources = $this->_resourceProvider->getAclResources();
-            $selectedResources = $this->_getAllResourceIds($resources[1]['children']);
+            $selectedResources = $this->_getAllResourceIds($this->getAclResources());
         }
         return $this->encoder->encode($selectedResources);
     }
 
+    /**
+     * Get lit of all ACL resources declared in the system.
+     *
+     * @return array
+     */
+    private function getAclResources()
+    {
+        $resources = $this->_resourceProvider->getAclResources();
+        $configResource = array_filter(
+            $resources,
+            function ($node) {
+                return $node['id'] == 'Magento_Backend::admin';
+            }
+        );
+        $configResource = reset($configResource);
+        return isset($configResource['children']) ? $configResource['children'] : [];
+    }
+
     /**
      * Whether tree has any resources.
      *
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php
index ecd361aaadf940a155f599b7bf70a42a6f1ea62a..eca679a6f2d72291b1577b59cf8292c72df9610d 100644
--- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php
+++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php
@@ -6,7 +6,6 @@
 
 namespace Magento\Integration\Block\Adminhtml\Integration\Edit\Tab;
 
-use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info;
 use Magento\Integration\Controller\Adminhtml\Integration as IntegrationController;
 use Magento\Integration\Model\Integration as IntegrationModel;
 
@@ -174,11 +173,25 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements
      * @return array
      */
     public function getTree()
+    {
+        return $this->integrationData->mapResources($this->getAclResources());
+    }
+
+    /**
+     * Get lit of all ACL resources declared in the system.
+     *
+     * @return array
+     */
+    private function getAclResources()
     {
         $resources = $this->aclResourceProvider->getAclResources();
-        $rootArray = $this->integrationData->mapResources(
-            isset($resources[1]['children']) ? $resources[1]['children'] : []
+        $configResource = array_filter(
+            $resources,
+            function ($node) {
+                return $node['id'] == 'Magento_Backend::admin';
+            }
         );
-        return $rootArray;
+        $configResource = reset($configResource);
+        return isset($configResource['children']) ? $configResource['children'] : [];
     }
 }
diff --git a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php
index 0c6d9b7fc7aca6e812fa761d9da0796e35a48de8..d4c60966ab29b0bfe5833b6b8642c5c3ed971146 100644
--- a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php
+++ b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Integration/Edit/Tab/WebapiTest.php
@@ -155,7 +155,8 @@ class WebapiTest extends \PHPUnit_Framework_TestCase
     {
         $this->webapiBlock = $this->getWebapiBlock();
         $resources = [
-            1 => [ 'children' => [1, 2, 3] ]
+            ['id' => 'Magento_Backend::admin', 'children' => ['resource1', 'resource2', 'resource3']],
+            ['id' => 'Invalid_Node', 'children' => ['resource4', 'resource5', 'resource6']]
         ];
         $this->aclResourceProvider->expects($this->once())
             ->method('getAclResources')
@@ -163,7 +164,7 @@ class WebapiTest extends \PHPUnit_Framework_TestCase
         $rootArray = "rootArrayValue";
         $this->integrationHelper->expects($this->once())
             ->method('mapResources')
-            ->with([1, 2, 3])
+            ->with(['resource1', 'resource2', 'resource3'])
             ->will($this->returnValue($rootArray));
         $this->assertEquals($rootArray, $this->webapiBlock->getTree());
     }
@@ -197,7 +198,7 @@ class WebapiTest extends \PHPUnit_Framework_TestCase
         return [
             'root resource in array' => [
                 2,
-                ['all_resources' => 0, 'resource'=>[2, 3]],
+                ['all_resources' => 0, 'resource' => [2, 3]],
                 true
             ],
             'root resource not in array' => [
diff --git a/app/code/Magento/MediaStorage/Model/Asset/Plugin/CleanMergedJsCss.php b/app/code/Magento/MediaStorage/Model/Asset/Plugin/CleanMergedJsCss.php
index 0100c9887f1537081af83a477da9c78c107615a9..4cd6d67a01073b76b396c29c3ad933022c4ee94f 100644
--- a/app/code/Magento/MediaStorage/Model/Asset/Plugin/CleanMergedJsCss.php
+++ b/app/code/Magento/MediaStorage/Model/Asset/Plugin/CleanMergedJsCss.php
@@ -35,15 +35,13 @@ class CleanMergedJsCss
      * Clean files in database on cleaning merged assets
      *
      * @param \Magento\Framework\View\Asset\MergeService $subject
-     * @param callable $proceed
+     * @param void $result
      *
      * @return void
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundCleanMergedJsCss(\Magento\Framework\View\Asset\MergeService $subject, \Closure $proceed)
+    public function afterCleanMergedJsCss(\Magento\Framework\View\Asset\MergeService $subject, $result)
     {
-        $proceed();
-
         /** @var \Magento\Framework\Filesystem\Directory\ReadInterface $pubStaticDirectory */
         $pubStaticDirectory = $this->filesystem->getDirectoryRead(DirectoryList::STATIC_VIEW);
         $mergedDir = $pubStaticDirectory->getAbsolutePath() . '/'
diff --git a/app/code/Magento/MediaStorage/Test/Unit/Model/Asset/Plugin/CleanMergedJsCssTest.php b/app/code/Magento/MediaStorage/Test/Unit/Model/Asset/Plugin/CleanMergedJsCssTest.php
index aa6578ebc7effec18df4e88a0f99784aed580ad3..9ff391185952255ccc216f376bf7c65e595bd21a 100644
--- a/app/code/Magento/MediaStorage/Test/Unit/Model/Asset/Plugin/CleanMergedJsCssTest.php
+++ b/app/code/Magento/MediaStorage/Test/Unit/Model/Asset/Plugin/CleanMergedJsCssTest.php
@@ -3,9 +3,6 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
-// @codingStandardsIgnoreFile
-
 namespace Magento\MediaStorage\Test\Unit\Model\Asset\Plugin;
 
 use Magento\Framework\App\Filesystem\DirectoryList;
@@ -22,11 +19,6 @@ class CleanMergedJsCssTest extends \Magento\Framework\TestFramework\Unit\BaseTes
      */
     private $filesystemMock;
 
-    /**
-     * @var bool
-     */
-    private $hasBeenCalled = false;
-
     /**
      * @var \Magento\MediaStorage\Model\Asset\Plugin\CleanMergedJsCss
      */
@@ -46,11 +38,8 @@ class CleanMergedJsCssTest extends \Magento\Framework\TestFramework\Unit\BaseTes
         );
     }
 
-    public function testAroundCleanMergedJsCss()
+    public function testAfterCleanMergedJsCss()
     {
-        $callable = function () {
-            $this->hasBeenCalled = true;
-        };
         $readDir = 'read directory';
         $mergedDir = $readDir .  '/' . \Magento\Framework\View\Asset\Merged::getRelativeDir();
 
@@ -65,11 +54,9 @@ class CleanMergedJsCssTest extends \Magento\Framework\TestFramework\Unit\BaseTes
             ->with(DirectoryList::STATIC_VIEW)
             ->willReturn($readDirectoryMock);
 
-        $this->model->aroundCleanMergedJsCss(
+        $this->model->afterCleanMergedJsCss(
             $this->basicMock(\Magento\Framework\View\Asset\MergeService::class),
-            $callable
+            null
         );
-
-        $this->assertTrue($this->hasBeenCalled);
     }
 }
diff --git a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php
index d785b3a82aff76cf200a5c662ad1070acc83d944..3cae720825a04efae6277123f8ba56d62325a08f 100644
--- a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php
+++ b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php
@@ -31,46 +31,27 @@ class CustomerPlugin
     /**
      * Plugin after create customer that updates any newsletter subscription that may have existed.
      *
+     * If we have extension attribute (is_subscribed) we need to subscribe that customer
+     *
      * @param CustomerRepository $subject
+     * @param CustomerInterface $result
      * @param CustomerInterface $customer
      * @return CustomerInterface
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function afterSave(CustomerRepository $subject, CustomerInterface $customer)
+    public function afterSave(CustomerRepository $subject, CustomerInterface $result, CustomerInterface $customer)
     {
-        $this->subscriberFactory->create()->updateSubscription($customer->getId());
-        return $customer;
-    }
-
-    /**
-     * Plugin around customer repository save. If we have extension attribute (is_subscribed) we need to subscribe that customer
-     *
-     * @param CustomerRepository $subject
-     * @param \Closure $proceed
-     * @param CustomerInterface $customer
-     * @param null $passwordHash
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    public function aroundSave(
-        CustomerRepository $subject,
-        \Closure $proceed,
-        CustomerInterface $customer,
-        $passwordHash = null
-    ) {
-        /** @var CustomerInterface $savedCustomer */
-        $savedCustomer = $proceed($customer, $passwordHash);
-
-        if ($savedCustomer->getId() && $customer->getExtensionAttributes()) {
+        $this->subscriberFactory->create()->updateSubscription($result->getId());
+        if ($result->getId() && $customer->getExtensionAttributes()) {
             if ($customer->getExtensionAttributes()->getIsSubscribed() === true) {
-                $this->subscriberFactory->create()->subscribeCustomerById($savedCustomer->getId());
+                $this->subscriberFactory->create()->subscribeCustomerById($result->getId());
             } elseif ($customer->getExtensionAttributes()->getIsSubscribed() === false) {
-                $this->subscriberFactory->create()->unsubscribeCustomerById($savedCustomer->getId());
+                $this->subscriberFactory->create()->unsubscribeCustomerById($result->getId());
             }
         }
-
-        return $savedCustomer;
+        return $result;
     }
-    
+
     /**
      * Plugin around delete customer that updates any newsletter subscription that may have existed.
      *
@@ -96,21 +77,16 @@ class CustomerPlugin
     }
 
     /**
-     * Plugin around delete customer that updates any newsletter subscription that may have existed.
+     * Plugin after delete customer that updates any newsletter subscription that may have existed.
      *
      * @param CustomerRepository $subject
-     * @param callable $deleteCustomer Function we are wrapping around
-     * @param CustomerInterface $customer Input to the function
+     * @param bool $result
+     * @param CustomerInterface $customer
      * @return bool
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundDelete(
-        CustomerRepository $subject,
-        callable $deleteCustomer,
-        $customer
-    ) {
-        $result = $deleteCustomer($customer);
-        /** @var \Magento\Newsletter\Model\Subscriber $subscriber */
+    public function afterDelete(CustomerRepository $subject, $result, CustomerInterface $customer)
+    {
         $subscriber = $this->subscriberFactory->create();
         $subscriber->loadByEmail($customer->getEmail());
         if ($subscriber->getId()) {
diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php
index 36f3c0711038ff9a329cf663056008a01bae7986..6e614545b23d00dbcbee736beb7a2f687eb58d20 100644
--- a/app/code/Magento/Newsletter/Model/Subscriber.php
+++ b/app/code/Magento/Newsletter/Model/Subscriber.php
@@ -442,6 +442,7 @@ class Subscriber extends \Magento\Framework\Model\AbstractModel
         $this->setStatusChanged(true);
 
         try {
+            /* Save model before sending out email */
             $this->save();
             if ($isConfirmNeed === true
                 && $isOwnSubscribes === false
diff --git a/app/code/Magento/Newsletter/Test/Unit/Model/Plugin/CustomerPluginTest.php b/app/code/Magento/Newsletter/Test/Unit/Model/Plugin/CustomerPluginTest.php
index b4bc13043bf97409bfc6ceb7d8db47a5440fadca..458d6ea22b009323da9aee75dfe7a1a416833d19 100644
--- a/app/code/Magento/Newsletter/Test/Unit/Model/Plugin/CustomerPluginTest.php
+++ b/app/code/Magento/Newsletter/Test/Unit/Model/Plugin/CustomerPluginTest.php
@@ -60,26 +60,11 @@ class CustomerPluginTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testAfterSave()
+    public function testAfterSaveWithoutIsSubscribed()
     {
-        $customerId = 1;
-        $subject = $this->getMock(\Magento\Customer\Api\CustomerRepositoryInterface::class);
-        $customer = $this->getMock(\Magento\Customer\Api\Data\CustomerInterface::class);
-        $customer->expects($this->once())->method('getId')->willReturn($customerId);
-        $this->subscriber->expects($this->once())->method('updateSubscription')->with($customerId)->willReturnSelf();
-
-        $this->assertEquals($customer, $this->plugin->afterSave($subject, $customer));
-    }
-
-    public function testAroundSaveWithoutIsSubscribed()
-    {
-        $passwordHash = null;
         $customerId = 1;
         /** @var CustomerInterface | \PHPUnit_Framework_MockObject_MockObject $customer */
         $customer = $this->getMock(\Magento\Customer\Api\Data\CustomerInterface::class);
-        $proceed  = function (CustomerInterface $customer, $passwordHash = null) use ($customer) {
-            return $customer;
-        };
         /** @var CustomerRepository | \PHPUnit_Framework_MockObject_MockObject $subject */
         $subject = $this->getMock(\Magento\Customer\Api\CustomerRepositoryInterface::class);
 
@@ -87,26 +72,27 @@ class CustomerPluginTest extends \PHPUnit_Framework_TestCase
             ->method("getId")
             ->willReturn($customerId);
 
-        $this->assertEquals($customer, $this->plugin->aroundSave($subject, $proceed, $customer, $passwordHash));
+        $this->assertEquals($customer, $this->plugin->afterSave($subject, $customer, $customer));
     }
 
     /**
      * @return array
      */
-    public function provideExtensionAttributeDataForAroundSave()
+    public function afterSaveExtensionAttributeDataProvider()
     {
         return [
-            [true, true] ,
+            [true, true],
             [false, false]
         ];
     }
 
     /**
-     * @dataProvider provideExtensionAttributeDataForAroundSave
+     * @param boolean $isSubscribed
+     * @param boolean $subscribeIsCreated
+     * @dataProvider afterSaveExtensionAttributeDataProvider
      */
-    public function testAroundSaveWithIsSubscribed($isSubscribed, $subscribeIsCreated)
+    public function testAfterSaveWithIsSubscribed($isSubscribed, $subscribeIsCreated)
     {
-        $passwordHash = null;
         $customerId = 1;
         /** @var CustomerInterface | \PHPUnit_Framework_MockObject_MockObject $customer */
         $customer = $this->getMock(\Magento\Customer\Api\Data\CustomerInterface::class);
@@ -134,9 +120,6 @@ class CustomerPluginTest extends \PHPUnit_Framework_TestCase
                 ->with($customerId);
         }
 
-        $proceed  = function (CustomerInterface $customer, $passwordHash = null) use ($customer) {
-            return $customer;
-        };
         /** @var CustomerRepository | \PHPUnit_Framework_MockObject_MockObject $subject */
         $subject = $this->getMock(\Magento\Customer\Api\CustomerRepositoryInterface::class);
 
@@ -144,14 +127,11 @@ class CustomerPluginTest extends \PHPUnit_Framework_TestCase
             ->method("getId")
             ->willReturn($customerId);
 
-        $this->assertEquals($customer, $this->plugin->aroundSave($subject, $proceed, $customer, $passwordHash));
+        $this->assertEquals($customer, $this->plugin->afterSave($subject, $customer, $customer));
     }
 
-    public function testAroundDelete()
+    public function testAfterDelete()
     {
-        $deleteCustomer = function () {
-            return true;
-        };
         $subject = $this->getMock(\Magento\Customer\Api\CustomerRepositoryInterface::class);
         $customer = $this->getMock(\Magento\Customer\Api\Data\CustomerInterface::class);
         $customer->expects($this->once())->method('getEmail')->willReturn('test@test.com');
@@ -159,7 +139,7 @@ class CustomerPluginTest extends \PHPUnit_Framework_TestCase
         $this->subscriber->expects($this->once())->method('getId')->willReturn(1);
         $this->subscriber->expects($this->once())->method('delete')->willReturnSelf();
 
-        $this->assertEquals(true, $this->plugin->aroundDelete($subject, $deleteCustomer, $customer));
+        $this->assertEquals(true, $this->plugin->afterDelete($subject, true, $customer));
     }
 
     public function testAroundDeleteById()
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml
index 1c2d53b94a50227589aa8b717ce73624065ef98f..7383a8ece33dbd1dd80990cb1708637bcd10b145 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml
@@ -23,13 +23,13 @@
                     <?php foreach ($block->getStores($group) as $store): ?>
                         <?php if ($showWebsite == false): ?>
                             <?php $showWebsite = true; ?>
-                            <optgroup label="<?php /* @escapeNotVerified */ echo $website->getName() ?>"></optgroup>
+                            <optgroup label="<?php echo $block->escapeHtmlAttr($website->getName()) ?>"></optgroup>
                         <?php endif; ?>
                         <?php if ($showGroup == false): ?>
                             <?php $showGroup = true; ?>
-                            <optgroup label="&nbsp;&nbsp;&nbsp;<?php /* @escapeNotVerified */ echo $group->getName() ?>">
+                            <optgroup label="&nbsp;&nbsp;&nbsp;<?php echo $block->escapeHtmlAttr($group->getName()) ?>">
                         <?php endif; ?>
-                        <option value="<?php /* @escapeNotVerified */ echo $store->getId() ?>"<?php if ($block->getStoreId() == $store->getId()): ?> selected="selected"<?php endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;<?php /* @escapeNotVerified */ echo $store->getName() ?></option>
+                        <option value="<?php echo $block->escapeHtmlAttr($store->getId()) ?>"<?php if ($block->getStoreId() == $store->getId()): ?> selected="selected"<?php endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $block->escapeHtml($store->getName()) ?></option>
                     <?php endforeach; ?>
                     <?php if ($showGroup): ?>
                         </optgroup>
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml
index b7f36f51264e94ae91cc1304e473a18d13f1eaee..dbc2fcf0ea6d918bc515c8214ec967b22df6ead5 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml
@@ -7,6 +7,7 @@
 // @codingStandardsIgnoreFile
 
 /* @var $block \Magento\Newsletter\Block\Adminhtml\Queue\Edit */
+
 ?>
 <div data-mage-init='{"floatingHeader": {}}' class="page-actions">
     <?php echo $block->getBackButtonHtml() ?>
@@ -20,14 +21,14 @@
     <?php endif ?>
 </div>
 
-<form action="<?php /* @escapeNotVerified */ echo $block->getSaveUrl() ?>" method="post" id="queue_edit_form">
+<form action="<?php echo $block->escapeUrl($block->getSaveUrl()) ?>" method="post" id="queue_edit_form">
     <?php echo $block->getBlockHtml('formkey')?>
     <?php echo $block->getChildHtml('form') ?>
 </form>
-<form action="<?php /* @escapeNotVerified */ echo $block->getPreviewUrl() ?>" method="post" id="newsletter_queue_preview_form" target="_blank">
+<form action="<?php echo $block->escapeUrl($block->getPreviewUrl()) ?>" method="post" id="newsletter_queue_preview_form" target="_blank">
     <?php echo $block->getBlockHtml('formkey')?>
     <div class="no-display">
-        <input type="hidden" id="preview_type" name="type" value="<?php /* @escapeNotVerified */ echo $block->getIsTextType() ? 1 : 2 ?>" />
+        <input type="hidden" id="preview_type" name="type" value="<?php /* @noEscape */ echo $block->getIsTextType() ? 1 : 2 ?>" />
         <input type="hidden" id="preview_text" name="text" value="" />
         <input type="hidden" id="preview_styles" name="styles" value="" />
         <input type="hidden" id="preview_id" name="id" value="" />
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml
index b4bdb67b2771cb2f19096ae33d2e8745d0a4503d..c4092625f2094ecbe0feccf438616b3f0b16c4a8 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml
@@ -6,13 +6,15 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Newsletter\Block\Adminhtml\Subscriber $block */
+
 ?>
 <?php echo $block->getChildHtml('grid') ?>
 <?php if (count($block->getQueueAsOptions())>0 && $block->getShowQueueAdd()): ?>
 <div class="form-buttons">
     <select id="queueList" name="queue">
     <?php foreach ($block->getQueueAsOptions() as $_queue): ?>
-        <option value="<?php /* @escapeNotVerified */ echo $_queue['value'] ?>"><?php /* @escapeNotVerified */ echo $_queue['label'] ?> #<?php /* @escapeNotVerified */ echo $_queue['value'] ?></option>
+        <option value="<?php echo $block->escapeHtmlAttr($_queue['value']) ?>"><?php echo $block->escapeHtml($_queue['label']) ?> #<?php echo $block->escapeHtml($_queue['value']) ?></option>
     <?php endforeach; ?>
     </select>
     <button type="button" class="scalable" onclick="subscriberController.addToQueue();"><span><span><span><?php /* @escapeNotVerified */ echo __('Add to Queue'); ?></span></span></span></button>
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml
index 91db6c13eaed7a9bd76676c1f3f72da070afa758..61bfd057d45ddddf085621b2f1230d93047dfc21 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml
@@ -9,19 +9,20 @@ use Magento\Framework\App\TemplateTypesInterface;
 // @codingStandardsIgnoreFile
 
 /* @var $block \Magento\Newsletter\Block\Adminhtml\Template\Edit */
+
 ?>
-<form action="<?php /* @escapeNotVerified */ echo $block->getSaveUrl() ?>" method="post" id="newsletter_template_edit_form">
+<form action="<?php echo $block->escapeUrl($block->getSaveUrl()) ?>" method="post" id="newsletter_template_edit_form">
     <?php echo $block->getBlockHtml('formkey')?>
     <div class="no-display">
         <input type="hidden" id="change_flag_element" name="_change_type_flag" value="" />
-        <input type="hidden" id="save_as_flag" name="_save_as_flag" value="<?php /* @escapeNotVerified */ echo $block->getSaveAsFlag() ?>" />
+        <input type="hidden" id="save_as_flag" name="_save_as_flag" value="<?php echo $block->escapeHtmlAttr($block->getSaveAsFlag()) ?>" />
     </div>
-    <?php /* @escapeNotVerified */ echo $block->getForm() ?>
+    <?php /* @noEscape */ echo $block->getForm() ?>
 </form>
-<form action="<?php /* @escapeNotVerified */ echo $block->getPreviewUrl() ?>" method="post" id="newsletter_template_preview_form" target="_blank">
+<form action="<?php echo $block->escapeUrl($block->getPreviewUrl()) ?>" method="post" id="newsletter_template_preview_form" target="_blank">
     <?php echo $block->getBlockHtml('formkey')?>
     <div class="no-display">
-        <input type="hidden" id="preview_type" name="type" value="<?php /* @escapeNotVerified */ echo $block->isTextType() ? 1 : 2 ?>" />
+        <input type="hidden" id="preview_type" name="type" value="<?php /* @noEscape */ echo $block->isTextType() ? 1 : 2 ?>" />
         <input type="hidden" id="preview_text" name="text" value="" />
         <input type="hidden" id="preview_styles" name="styles" value="" />
         <input type="hidden" id="preview_id" name="id" value="" />
@@ -175,9 +176,9 @@ require([
 
         preview: function() {
             if (this.typeChange) {
-                $('preview_type').value = <?php /* @escapeNotVerified */ echo TemplateTypesInterface::TYPE_TEXT ?>;
+                $('preview_type').value = <?php echo $block->escapeJs(TemplateTypesInterface::TYPE_TEXT) ?>;
             } else {
-                $('preview_type').value = <?php /* @escapeNotVerified */ echo $block->getTemplateType() ?>;
+                $('preview_type').value = <?php echo $block->escapeJs($block->getTemplateType()) ?>;
             }
             if (this.isEditor() && tinyMCE.get(this.id)) {
                 tinyMCE.triggerSave();
@@ -202,7 +203,7 @@ require([
                 content: "<?php /* @escapeNotVerified */ echo __('Are you sure you want to delete this template?') ?>",
                 actions: {
                     confirm: function() {
-                        window.location.href = '<?php /* @escapeNotVerified */ echo $block->getDeleteUrl() ?>';
+                        window.location.href = '<?php echo $block->escapeUrl($block->getDeleteUrl()) ?>';
                     }
                 }
             });
@@ -218,7 +219,7 @@ require([
     };
 
     templateControl.init();
-    templateControl.templateName = "<?php /* @escapeNotVerified */ echo $block->getJsTemplateName() ?>";
+    templateControl.templateName = "<?php echo $block->escapeJs($block->getJsTemplateName()) ?>";
 //]]>
 
 });
diff --git a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml
index a8b63a30572680a2d8c969490e69a00771f1474f..5894c9f868191c387a456c78270a76e7bd10edef 100644
--- a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml
+++ b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml
@@ -6,13 +6,15 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Newsletter\Block\Subscribe $block */
+
 ?>
 <div class="block newsletter">
     <div class="title"><strong>Newsletter</strong></div>
     <div class="content">
         <form class="form subscribe"
             novalidate
-            action="<?php /* @escapeNotVerified */ echo $block->getFormActionUrl() ?>"
+            action="<?php echo $block->escapeUrl($block->getFormActionUrl()) ?>"
             method="post"
             data-mage-init='{"validation": {"errorClass": "mage-error"}}'
             id="newsletter-validate-detail">
diff --git a/app/code/Magento/OfflineShipping/Setup/InstallSchema.php b/app/code/Magento/OfflineShipping/Setup/InstallSchema.php
index 8ce77e6098b432e1d34221309ab03f5039bae1fa..0c2b62f908894f435fbe1e15551255ae40da92df 100644
--- a/app/code/Magento/OfflineShipping/Setup/InstallSchema.php
+++ b/app/code/Magento/OfflineShipping/Setup/InstallSchema.php
@@ -15,6 +15,16 @@ use Magento\Framework\Setup\SchemaSetupInterface;
  */
 class InstallSchema implements InstallSchemaInterface
 {
+    /**
+     * @var string
+     */
+    private static $quoteConnectionName = 'checkout';
+
+    /**
+     * @var string
+     */
+    private static $salesConnectionName = 'sales';
+
     /**
      * {@inheritdoc}
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
@@ -105,32 +115,32 @@ class InstallSchema implements InstallSchemaInterface
             ['unsigned' => true, 'nullable' => false, 'default' => '0'],
             'Simple Free Shipping'
         );
-        $installer->getConnection()->addColumn(
-            $installer->getTable('sales_order_item'),
+        $installer->getConnection(self::$salesConnectionName)->addColumn(
+            $installer->getTable('sales_order_item', self::$salesConnectionName),
             'free_shipping',
             \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
             null,
             ['unsigned' => true, 'nullable' => false, 'default' => '0'],
             'Free Shipping'
         );
-        $installer->getConnection()->addColumn(
-            $installer->getTable('quote_address'),
+        $installer->getConnection(self::$quoteConnectionName)->addColumn(
+            $installer->getTable('quote_address', self::$quoteConnectionName),
             'free_shipping',
             \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
             null,
             ['unsigned' => true, 'nullable' => false, 'default' => '0'],
             'Free Shipping'
         );
-        $installer->getConnection()->addColumn(
-            $installer->getTable('quote_item'),
+        $installer->getConnection(self::$quoteConnectionName)->addColumn(
+            $installer->getTable('quote_item', self::$quoteConnectionName),
             'free_shipping',
             \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
             null,
             ['unsigned' => true, 'nullable' => false, 'default' => '0'],
             'Free Shipping'
         );
-        $installer->getConnection()->addColumn(
-            $installer->getTable('quote_address_item'),
+        $installer->getConnection(self::$quoteConnectionName)->addColumn(
+            $installer->getTable('quote_address_item', self::$quoteConnectionName),
             'free_shipping',
             \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
             null,
diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json
index e9a759057d322074de433b3460162c3a883f3ebf..3c959b4dec766fe09cf81df46571051b714ee4e1 100644
--- a/app/code/Magento/OfflineShipping/composer.json
+++ b/app/code/Magento/OfflineShipping/composer.json
@@ -8,7 +8,6 @@
         "magento/module-backend": "100.2.*",
         "magento/module-shipping": "100.2.*",
         "magento/module-catalog": "101.1.*",
-        "magento/module-sales": "100.2.*",
         "magento/module-sales-rule": "100.2.*",
         "magento/module-directory": "100.2.*",
         "magento/module-quote": "100.2.*",
@@ -16,6 +15,7 @@
     },
     "suggest": {
         "magento/module-checkout": "100.2.*",
+        "magento/module-sales": "100.2.*",
         "magento/module-offline-shipping-sample-data": "Sample Data version:100.2.*"
     },
     "type": "magento2-module",
diff --git a/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php b/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php
index 1d716991f9d3f9dca62b76f12c0b1060d36ea31f..08b68447c9d4d8dd4f3612692e5488dd204d1e15 100644
--- a/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php
+++ b/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php
@@ -5,61 +5,67 @@
  */
 namespace Magento\PageCache\Model\App\FrontController;
 
+use Magento\PageCache\Model\Config;
+use Magento\Framework\App\PageCache\Version;
+use Magento\Framework\App\State as AppState;
+use Magento\Framework\App\FrontControllerInterface;
+use Magento\Framework\App\ResponseInterface;
+use Magento\Framework\App\Response\Http as ResponseHttp;
+use Magento\Framework\Controller\ResultInterface;
+
 /**
  * Varnish for processing builtin cache
  */
 class VarnishPlugin
 {
     /**
-     * @var \Magento\Framework\App\Config\ScopeConfigInterface
+     * @var Config
      */
-    protected $config;
+    private $config;
 
     /**
-     * @var \Magento\Framework\App\PageCache\Version
+     * @var Version
      */
-    protected $version;
+    private $version;
 
     /**
-     * @var \Magento\Framework\App\State
+     * @var AppState
      */
-    protected $state;
+    private $state;
 
     /**
-     * @param \Magento\PageCache\Model\Config $config
-     * @param \Magento\Framework\App\PageCache\Version $version
-     * @param \Magento\Framework\App\State $state
+     * @param Config $config
+     * @param Version $version
+     * @param AppState $state
      */
-    public function __construct(
-        \Magento\PageCache\Model\Config $config,
-        \Magento\Framework\App\PageCache\Version $version,
-        \Magento\Framework\App\State $state
-    ) {
+    public function __construct(Config $config, Version $version, AppState $state)
+    {
         $this->config = $config;
         $this->version = $version;
         $this->state = $state;
     }
 
     /**
-     * @param \Magento\Framework\App\FrontControllerInterface $subject
-     * @param callable $proceed
-     * @param \Magento\Framework\App\RequestInterface $request
-     * @return false|\Magento\Framework\App\Response\Http|\Magento\Framework\Controller\ResultInterface
+     * Perform response postprocessing
+     *
+     * @param FrontControllerInterface $subject
+     * @param ResponseInterface|ResultInterface $result
+     * @return ResponseHttp|ResultInterface
+     *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundDispatch(
-        \Magento\Framework\App\FrontControllerInterface $subject,
-        \Closure $proceed,
-        \Magento\Framework\App\RequestInterface $request
-    ) {
-        $response = $proceed($request);
-        if ($this->config->getType() == \Magento\PageCache\Model\Config::VARNISH && $this->config->isEnabled()
-            && $response instanceof \Magento\Framework\App\Response\Http) {
+    public function afterDispatch(FrontControllerInterface $subject, $result)
+    {
+        if ($this->config->getType() == Config::VARNISH && $this->config->isEnabled()
+            && $result instanceof ResponseHttp
+        ) {
             $this->version->process();
-            if ($this->state->getMode() == \Magento\Framework\App\State::MODE_DEVELOPER) {
-                $response->setHeader('X-Magento-Debug', 1);
+
+            if ($this->state->getMode() == AppState::MODE_DEVELOPER) {
+                $result->setHeader('X-Magento-Debug', 1);
             }
         }
-        return $response;
+
+        return $result;
     }
 }
diff --git a/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php b/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php
index 0fcad45130d3ebb0dfe94ae8eeafbd885fb5e38b..d2ef015fb69272586576a335ce7df3c9d81acf59 100644
--- a/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php
+++ b/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php
@@ -5,47 +5,50 @@
  */
 namespace Magento\PageCache\Model\Controller\Result;
 
+use Magento\PageCache\Model\Config;
+use Magento\Framework\App\PageCache\Kernel;
+use Magento\Framework\App\State as AppState;
+use Magento\Framework\Registry;
+use Magento\Framework\Controller\ResultInterface;
 use Magento\Framework\App\Response\Http as ResponseHttp;
+use Zend\Http\Header\HeaderInterface as HttpHeaderInterface;
+use Magento\PageCache\Model\Cache\Type as CacheType;
 
 /**
  * Plugin for processing builtin cache
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class BuiltinPlugin
 {
     /**
-     * @var \Magento\Framework\App\Config\ScopeConfigInterface
+     * @var Config
      */
-    protected $config;
+    private $config;
 
     /**
-     * @var \Magento\Framework\App\PageCache\Kernel
+     * @var Kernel
      */
-    protected $kernel;
+    private $kernel;
 
     /**
-     * @var \Magento\Framework\App\State
+     * @var AppState
      */
-    protected $state;
+    private $state;
 
     /**
-     * @var \Magento\Framework\Registry
+     * @var Registry
      */
-    protected $registry;
+    private $registry;
 
     /**
-     * Constructor
-     *
-     * @param \Magento\PageCache\Model\Config $config
-     * @param \Magento\Framework\App\PageCache\Kernel $kernel
-     * @param \Magento\Framework\App\State $state
-     * @param \Magento\Framework\Registry $registry
+     * @param Config $config
+     * @param Kernel $kernel
+     * @param AppState $state
+     * @param Registry $registry
      */
-    public function __construct(
-        \Magento\PageCache\Model\Config $config,
-        \Magento\Framework\App\PageCache\Kernel $kernel,
-        \Magento\Framework\App\State $state,
-        \Magento\Framework\Registry $registry
-    ) {
+    public function __construct(Config $config, Kernel $kernel, AppState $state, Registry $registry)
+    {
         $this->config = $config;
         $this->kernel = $kernel;
         $this->state = $state;
@@ -53,43 +56,45 @@ class BuiltinPlugin
     }
 
     /**
-     * @param \Magento\Framework\Controller\ResultInterface $subject
-     * @param callable $proceed
+     * Perform result postprocessing
+     *
+     * @param ResultInterface $subject
+     * @param ResultInterface $result
      * @param ResponseHttp $response
-     * @return \Magento\Framework\Controller\ResultInterface
+     * @return ResultInterface
+     *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundRenderResult(
-        \Magento\Framework\Controller\ResultInterface $subject,
-        \Closure $proceed,
-        ResponseHttp $response
-    ) {
-        $result = $proceed($response);
+    public function afterRenderResult(ResultInterface $subject, ResultInterface $result, ResponseHttp $response)
+    {
         $usePlugin = $this->registry->registry('use_page_cache_plugin');
-        if (!$usePlugin || !$this->config->isEnabled()
-            || $this->config->getType() != \Magento\PageCache\Model\Config::BUILT_IN
-        ) {
+
+        if (!$usePlugin || !$this->config->isEnabled() || $this->config->getType() != Config::BUILT_IN) {
             return $result;
         }
 
-        if ($this->state->getMode() == \Magento\Framework\App\State::MODE_DEVELOPER) {
+        if ($this->state->getMode() == AppState::MODE_DEVELOPER) {
             $cacheControlHeader = $response->getHeader('Cache-Control');
-            if ($cacheControlHeader instanceof \Zend\Http\Header\HeaderInterface) {
+
+            if ($cacheControlHeader instanceof HttpHeaderInterface) {
                 $response->setHeader('X-Magento-Cache-Control', $cacheControlHeader->getFieldValue());
             }
+
             $response->setHeader('X-Magento-Cache-Debug', 'MISS', true);
         }
 
         $tagsHeader = $response->getHeader('X-Magento-Tags');
         $tags = [];
+
         if ($tagsHeader) {
             $tags = explode(',', $tagsHeader->getFieldValue());
             $response->clearHeader('X-Magento-Tags');
         }
-        $tags = array_unique(array_merge($tags, [\Magento\PageCache\Model\Cache\Type::CACHE_TAG]));
-        $response->setHeader('X-Magento-Tags', implode(',', $tags));
 
+        $tags = array_unique(array_merge($tags, [CacheType::CACHE_TAG]));
+        $response->setHeader('X-Magento-Tags', implode(',', $tags));
         $this->kernel->process($response);
+
         return $result;
     }
 }
diff --git a/app/code/Magento/PageCache/Model/Controller/Result/VarnishPlugin.php b/app/code/Magento/PageCache/Model/Controller/Result/VarnishPlugin.php
index 19868a2261f1fd7d486fab066b1e4cc02704a6c5..368a6db80c7e01d7fdaafca710beb3470d870e33 100644
--- a/app/code/Magento/PageCache/Model/Controller/Result/VarnishPlugin.php
+++ b/app/code/Magento/PageCache/Model/Controller/Result/VarnishPlugin.php
@@ -5,7 +5,12 @@
  */
 namespace Magento\PageCache\Model\Controller\Result;
 
+use Magento\PageCache\Model\Config;
+use Magento\Framework\App\PageCache\Version;
+use Magento\Framework\App\State as AppState;
+use Magento\Framework\Registry;
 use Magento\Framework\App\Response\Http as ResponseHttp;
+use Magento\Framework\Controller\ResultInterface;
 
 /**
  * Plugin for processing varnish cache
@@ -13,74 +18,61 @@ use Magento\Framework\App\Response\Http as ResponseHttp;
 class VarnishPlugin
 {
     /**
-     * @var \Magento\Framework\App\Config\ScopeConfigInterface
+     * @var Config
      */
-    protected $config;
+    private $config;
 
     /**
-     * @var \Magento\Framework\App\PageCache\Version
+     * @var Version
      */
-    protected $version;
+    private $version;
 
     /**
-     * @var \Magento\Framework\App\PageCache\Kernel
+     * @var AppState
      */
-    protected $kernel;
+    private $state;
 
     /**
-     * @var \Magento\Framework\App\State
+     * @var Registry
      */
-    protected $state;
+    private $registry;
 
     /**
-     * @var \Magento\Framework\Registry
+     * @param Config $config
+     * @param Version $version
+     * @param AppState $state
+     * @param Registry $registry
      */
-    protected $registry;
-
-    /**
-     * Constructor
-     *
-     * @param \Magento\PageCache\Model\Config $config
-     * @param \Magento\Framework\App\PageCache\Version $version
-     * @param \Magento\Framework\App\PageCache\Kernel $kernel
-     * @param \Magento\Framework\App\State $state
-     * @param \Magento\Framework\Registry $registry
-     */
-    public function __construct(
-        \Magento\PageCache\Model\Config $config,
-        \Magento\Framework\App\PageCache\Version $version,
-        \Magento\Framework\App\PageCache\Kernel $kernel,
-        \Magento\Framework\App\State $state,
-        \Magento\Framework\Registry $registry
-    ) {
+    public function __construct(Config $config, Version $version, AppState $state, Registry $registry)
+    {
         $this->config = $config;
         $this->version = $version;
-        $this->kernel = $kernel;
         $this->state = $state;
         $this->registry = $registry;
     }
 
     /**
-     * @param \Magento\Framework\Controller\ResultInterface $subject
-     * @param callable $proceed
+     * Perform result postprocessing
+     *
+     * @param ResultInterface $subject
+     * @param ResultInterface $result
      * @param ResponseHttp $response
-     * @return \Magento\Framework\Controller\ResultInterface
+     * @return ResultInterface
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundRenderResult(
-        \Magento\Framework\Controller\ResultInterface $subject,
-        \Closure $proceed,
-        ResponseHttp $response
-    ) {
-        $proceed($response);
+    public function afterRenderResult(ResultInterface $subject, ResultInterface $result, ResponseHttp $response)
+    {
         $usePlugin = $this->registry->registry('use_page_cache_plugin');
-        if ($this->config->getType() == \Magento\PageCache\Model\Config::VARNISH && $this->config->isEnabled()
-            && $usePlugin) {
+
+        if ($this->config->getType() == Config::VARNISH && $this->config->isEnabled() && $usePlugin) {
             $this->version->process();
-            if ($this->state->getMode() == \Magento\Framework\App\State::MODE_DEVELOPER) {
+
+            if ($this->state->getMode() == AppState::MODE_DEVELOPER) {
                 $response->setHeader('X-Magento-Debug', 1);
             }
         }
 
-        return $subject;
+        return $result;
     }
 }
diff --git a/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/VarnishPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/VarnishPluginTest.php
index 32328d7d027930b768683f9773366f6be9b92f84..a9b0e10307ae37d556f9c4cc96224f01fcd2bb9d 100644
--- a/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/VarnishPluginTest.php
+++ b/app/code/Magento/PageCache/Test/Unit/Model/App/FrontController/VarnishPluginTest.php
@@ -3,148 +3,169 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
 namespace Magento\PageCache\Test\Unit\Model\App\FrontController;
 
 use Magento\PageCache\Model\App\FrontController\VarnishPlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\PageCache\Model\Config;
+use Magento\Framework\App\PageCache\Version;
+use Magento\Framework\App\State as AppState;
+use Magento\Framework\App\FrontControllerInterface;
+use Magento\Framework\App\Response\Http as ResponseHttp;
+use Magento\Framework\Controller\ResultInterface;
 
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class VarnishPluginTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * @var VarnishPlugin
      */
-    protected $plugin;
+    private $plugin;
 
     /**
-     * @var \Magento\PageCache\Model\Config|\PHPUnit_Framework_MockObject_MockObject
+     * @var ObjectManagerHelper
      */
-    protected $configMock;
+    private $objectManagerHelper;
 
     /**
-     * @var \Magento\Framework\App\PageCache\Version|\PHPUnit_Framework_MockObject_MockObject
+     * @var Config|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $versionMock;
+    private $configMock;
 
     /**
-     * @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject
+     * @var Version|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $stateMock;
+    private $versionMock;
 
     /**
-     * @var \Magento\Framework\App\Response\Http|\PHPUnit_Framework_MockObject_MockObject
+     * @var AppState|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $responseMock;
+    private $stateMock;
 
     /**
-     * @var \Magento\Framework\App\FrontControllerInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var FrontControllerInterface|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $frontControllerMock;
+    private $frontControllerMock;
 
     /**
-     * @var \Closure
+     * @var ResponseHttp|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $closure;
+    private $responseMock;
 
     /**
-     * @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var ResultInterface|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $requestMock;
+    private $resultMock;
 
-    /**
-     * SetUp
-     */
     protected function setUp()
     {
-        $this->configMock = $this->getMock(\Magento\PageCache\Model\Config::class, [], [], '', false);
-        $this->versionMock = $this->getMock(\Magento\Framework\App\PageCache\Version::class, [], [], '', false);
-        $this->stateMock = $this->getMock(\Magento\Framework\App\State::class, [], [], '', false);
-        $this->frontControllerMock = $this->getMock(
-            \Magento\Framework\App\FrontControllerInterface::class,
-            [],
-            [],
-            '',
-            false
-        );
-        $this->requestMock = $this->getMock(\Magento\Framework\App\RequestInterface::class, [], [], '', false);
-        $this->responseMock = $this->getMock(\Magento\Framework\App\Response\Http::class, [], [], '', false);
-        $response = $this->responseMock;
-        $this->closure = function () use ($response) {
-            return $response;
-        };
-        $this->plugin = new \Magento\PageCache\Model\App\FrontController\VarnishPlugin(
-            $this->configMock,
-            $this->versionMock,
-            $this->stateMock
+        $this->configMock = $this->getMockBuilder(Config::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->versionMock = $this->getMockBuilder(Version::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->stateMock = $this->getMockBuilder(AppState::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->frontControllerMock = $this->getMockBuilder(FrontControllerInterface::class)
+            ->getMockForAbstractClass();
+        $this->responseMock = $this->getMockBuilder(ResponseHttp::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->resultMock = $this->getMockBuilder(ResultInterface::class)
+            ->getMockForAbstractClass();
+
+        $this->objectManagerHelper = new ObjectManagerHelper($this);
+        $this->plugin = $this->objectManagerHelper->getObject(
+            VarnishPlugin::class,
+            [
+                'config' => $this->configMock,
+                'version' => $this->versionMock,
+                'state' => $this->stateMock
+            ]
         );
     }
 
     /**
-     * @dataProvider dataProvider
+     * @param string $state
+     * @param int $countHeader
+     *
+     * @dataProvider afterDispatchDataProvider
      */
-    public function testAroundDispatchReturnsCache($state, $countHeader, $countProcess, $countGetMode, $response)
+    public function testAfterDispatchReturnsCache($state, $countHeader)
     {
-        $this->configMock
-            ->expects($this->once())
+        $this->configMock->expects(static::once())
             ->method('isEnabled')
-            ->will($this->returnValue(true));
-        $this->configMock
-            ->expects($this->once())
+            ->willReturn(true);
+        $this->configMock->expects(static::once())
             ->method('getType')
-            ->will($this->returnValue(\Magento\PageCache\Model\Config::VARNISH));
-        $this->versionMock
-            ->expects($countProcess)
+            ->willReturn(Config::VARNISH);
+        $this->versionMock->expects(static::once())
             ->method('process');
-        $this->stateMock->expects($countGetMode)
+        $this->stateMock->expects(static::once())
             ->method('getMode')
-            ->will($this->returnValue($state));
-        $response->expects($countHeader)
+            ->willReturn($state);
+        $this->responseMock->expects(static::exactly($countHeader))
             ->method('setHeader')
             ->with('X-Magento-Debug');
 
-        $this->closure = function () use ($response) {
-            return $response;
-        };
+        $this->assertSame(
+            $this->responseMock,
+            $this->plugin->afterDispatch($this->frontControllerMock, $this->responseMock)
+        );
+    }
 
-        $this->plugin->aroundDispatch($this->frontControllerMock, $this->closure, $this->requestMock);
+    public function testAfterDispatchNotResponse()
+    {
+        $this->configMock->expects(static::once())
+            ->method('isEnabled')
+            ->willReturn(true);
+        $this->configMock->expects(static::once())
+            ->method('getType')
+            ->willReturn(Config::VARNISH);
+        $this->versionMock->expects(static::never())
+            ->method('process');
+        $this->stateMock->expects(static::never())
+            ->method('getMode');
+        $this->resultMock->expects(static::never())
+            ->method('setHeader');
+
+        $this->assertSame(
+            $this->resultMock,
+            $this->plugin->afterDispatch($this->frontControllerMock, $this->resultMock)
+        );
     }
 
-    /**
-     * @dataProvider dataProvider
-     */
-    public function testAroundDispatchDisabled($state)
+    public function testAfterDispatchDisabled()
     {
-        $this->configMock
-            ->expects($this->any())
+        $this->configMock->expects(static::any())
             ->method('getType')
-            ->will($this->returnValue(null));
-        $this->versionMock
-            ->expects($this->never())
+            ->willReturn(null);
+        $this->versionMock->expects(static::never())
             ->method('process');
-        $this->stateMock->expects($this->any())
+        $this->stateMock->expects(static::any())
             ->method('getMode')
-            ->will($this->returnValue($state));
-        $this->responseMock->expects($this->never())
+            ->willReturn(AppState::MODE_DEVELOPER);
+        $this->responseMock->expects(static::never())
             ->method('setHeader');
-        $this->plugin->aroundDispatch($this->frontControllerMock, $this->closure, $this->requestMock);
+
+        $this->assertSame(
+            $this->responseMock,
+            $this->plugin->afterDispatch($this->frontControllerMock, $this->responseMock)
+        );
     }
 
-    public function dataProvider()
+    /**
+     * @return array
+     */
+    public function afterDispatchDataProvider()
     {
         return [
-            'developer_mode' => [
-                \Magento\Framework\App\State::MODE_DEVELOPER,
-                $this->once(),
-                $this->once(),
-                $this->once(),
-                $this->getMock(\Magento\Framework\App\Response\Http::class, [], [], '', false),
-            ],
-            'production' => [
-                \Magento\Framework\App\State::MODE_PRODUCTION,
-                $this->never(),
-                $this->never(),
-                $this->never(),
-                $this->getMock(\Magento\Framework\Controller\ResultInterface::class, [], [], '', false),
-            ],
+            'developer_mode' => [AppState::MODE_DEVELOPER, 1],
+            'production' => [AppState::MODE_PRODUCTION, 0]
         ];
     }
 }
diff --git a/app/code/Magento/PageCache/Test/Unit/Model/Controller/Result/BuiltinPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/Controller/Result/BuiltinPluginTest.php
index 15934f3104b2305c00a8a0f2b23c3ab8717daba7..f0ba7b22dad2d5126b6b1481f8776f5bacc7843f 100644
--- a/app/code/Magento/PageCache/Test/Unit/Model/Controller/Result/BuiltinPluginTest.php
+++ b/app/code/Magento/PageCache/Test/Unit/Model/Controller/Result/BuiltinPluginTest.php
@@ -3,141 +3,195 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
-// @codingStandardsIgnoreFile
-
 namespace Magento\PageCache\Test\Unit\Model\Controller\Result;
 
+use Magento\PageCache\Model\Controller\Result\BuiltinPlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\PageCache\Model\Config;
+use Magento\Framework\App\PageCache\Kernel;
+use Magento\Framework\App\State as AppState;
+use Magento\Framework\Registry;
+use Magento\Framework\Controller\ResultInterface;
+use Magento\Framework\App\Response\Http as ResponseHttp;
+use Zend\Http\Header\HeaderInterface as HttpHeaderInterface;
+use Magento\PageCache\Model\Cache\Type as CacheType;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class BuiltinPluginTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\PageCache\Model\Controller\Result\BuiltinPlugin
+     * @var BuiltinPlugin
+     */
+    private $plugin;
+
+    /**
+     * @var ObjectManagerHelper
      */
-    protected $plugin;
+    private $objectManagerHelper;
 
     /**
-     * @var \Magento\Framework\Controller\ResultInterface
+     * @var Config|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $subject;
+    private $configMock;
 
     /**
-     * @var \Closure
+     * @var Kernel|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $closure;
+    private $kernelMock;
 
     /**
-     * @var \Magento\Framework\App\Response\Http|\PHPUnit_Framework_MockObject_MockObject
+     * @var AppState|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $response;
+    private $stateMock;
 
     /**
-     * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject
+     * @var Registry|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $registry;
+    private $registryMock;
 
     /**
-     * @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject
+     * @var ResultInterface|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $state;
+    private $resultMock;
 
     /**
-     * @var \Zend\Http\Header\HeaderInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var ResponseHttp|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $header;
+    private $responseMock;
 
     /**
-     * @var \Magento\Framework\App\PageCache\Kernel|\PHPUnit_Framework_MockObject_MockObject
+     * @var HttpHeaderInterface|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $kernel;
+    private $httpHeaderMock;
 
     protected function setUp()
     {
-        $result = $this->getMock(\Magento\Framework\Controller\ResultInterface::class, [], [], '', false);
-        $this->closure = function() use ($result) {
-            return $result;
-        };
-
-        $this->header = $this->getMock(\Zend\Http\Header\HeaderInterface::class, [], [], '', false);
-        $this->subject = $this->getMock(\Magento\Framework\Controller\ResultInterface::class, [], [], '', false);
-        $this->response = $this->getMock(
-            \Magento\Framework\App\Response\Http::class,
-            ['getHeader', 'clearHeader', 'setHeader'],
-            [],
-            '',
-            false
-        );
-        $this->response->expects($this->any())->method('getHeader')->willReturnMap(
+        $this->configMock = $this->getMockBuilder(Config::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->kernelMock = $this->getMockBuilder(Kernel::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->stateMock = $this->getMockBuilder(AppState::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->registryMock = $this->getMockBuilder(Registry::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->resultMock = $this->getMockBuilder(ResultInterface::class)
+            ->getMockForAbstractClass();
+        $this->responseMock = $this->getMockBuilder(ResponseHttp::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->httpHeaderMock = $this->getMockBuilder(HttpHeaderInterface::class)
+            ->getMockForAbstractClass();
+
+        $this->responseMock->expects(static::any())
+            ->method('getHeader')
+            ->willReturnMap(
+                [
+                    ['X-Magento-Tags', $this->httpHeaderMock],
+                    ['Cache-Control', $this->httpHeaderMock]
+                ]
+            );
+        $this->configMock->expects(static::any())
+            ->method('isEnabled')
+            ->willReturn(true);
+        $this->configMock->expects(static::any())
+            ->method('getType')
+            ->willReturn(Config::BUILT_IN);
+
+        $this->objectManagerHelper = new ObjectManagerHelper($this);
+        $this->plugin = $this->objectManagerHelper->getObject(
+            BuiltinPlugin::class,
             [
-                ['X-Magento-Tags', $this->header],
-                ['Cache-Control', $this->header]
-            ]
-        );
-
-        $this->registry = $this->getMock(\Magento\Framework\Registry::class, [], [], '', false);
-
-        $config = $this->getMock(\Magento\PageCache\Model\Config::class, ['isEnabled', 'getType'], [], '', false);
-        $config->expects($this->any())->method('isEnabled')->willReturn(true);
-        $config->expects($this->any())->method('getType')->willReturn(\Magento\PageCache\Model\Config::BUILT_IN);
-
-        $this->kernel = $this->getMock(\Magento\Framework\App\PageCache\Kernel::class, [], [], '', false);
-
-        $this->state = $this->getMock(\Magento\Framework\App\State::class, [], [], '', false);
-        $this->plugin = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))->getObject(
-            \Magento\PageCache\Model\Controller\Result\BuiltinPlugin::class,
-            [
-                'registry' => $this->registry,
-                'config' => $config,
-                'kernel' => $this->kernel,
-                'state' => $this->state
+                'registry' => $this->registryMock,
+                'config' => $this->configMock,
+                'kernel' => $this->kernelMock,
+                'state' => $this->stateMock
             ]
         );
     }
 
-    public function testAroundResultWithoutPlugin()
+    public function testAfterResultWithoutPlugin()
     {
-        $this->registry->expects($this->once())->method('registry')->with('use_page_cache_plugin')->willReturn(false);
-        $this->kernel->expects($this->never())->method('process')->with($this->response);
+        $this->registryMock->expects(static::once())
+            ->method('registry')
+            ->with('use_page_cache_plugin')
+            ->willReturn(false);
+        $this->kernelMock->expects(static::never())
+            ->method('process')
+            ->with($this->responseMock);
+
         $this->assertSame(
-            call_user_func($this->closure),
-            $this->plugin->aroundRenderResult($this->subject, $this->closure, $this->response)
+            $this->resultMock,
+            $this->plugin->afterRenderResult($this->resultMock, $this->resultMock, $this->responseMock)
         );
     }
 
-    public function testAroundResultWithPlugin()
+    public function testAfterResultWithPlugin()
     {
-        $this->registry->expects($this->once())->method('registry')->with('use_page_cache_plugin')->willReturn(true);
-        $this->state->expects($this->once())->method('getMode')->willReturn(null);
-        $this->header->expects($this->any())->method('getFieldValue')->willReturn('tag,tag');
-        $this->response->expects($this->once())->method('clearHeader')->with('X-Magento-Tags');
-        $this->response->expects($this->once())->method('setHeader')->with(
-            'X-Magento-Tags',
-            'tag,' . \Magento\PageCache\Model\Cache\Type::CACHE_TAG
+        $this->registryMock->expects(static::once())
+            ->method('registry')
+            ->with('use_page_cache_plugin')
+            ->willReturn(true);
+        $this->stateMock->expects(static::once())
+            ->method('getMode')
+            ->willReturn(null);
+        $this->httpHeaderMock->expects(static::any())
+            ->method('getFieldValue')
+            ->willReturn('tag,tag');
+        $this->responseMock->expects(static::once())
+            ->method('clearHeader')
+            ->with('X-Magento-Tags');
+        $this->responseMock->expects(static::once())
+            ->method('setHeader')
+            ->with('X-Magento-Tags', 'tag,' . CacheType::CACHE_TAG);
+        $this->kernelMock->expects(static::once())
+            ->method('process')
+            ->with($this->responseMock);
+
+        $this->assertSame(
+            $this->resultMock,
+            $this->plugin->afterRenderResult($this->resultMock, $this->resultMock, $this->responseMock)
         );
-        $this->kernel->expects($this->once())->method('process')->with($this->response);
-        $result = call_user_func($this->closure);
-        $this->assertSame($result, $this->plugin->aroundRenderResult($this->subject, $this->closure, $this->response));
     }
 
-    public function testAroundResultWithPluginDeveloperMode()
+    public function testAfterResultWithPluginDeveloperMode()
     {
-        $this->registry->expects($this->once())->method('registry')->with('use_page_cache_plugin')->willReturn(true);
-        $this->state->expects($this->once())->method('getMode')
-            ->willReturn(\Magento\Framework\App\State::MODE_DEVELOPER);
-
-        $this->header->expects($this->any())->method('getFieldValue')->willReturnOnConsecutiveCalls('test', 'tag,tag2');
+        $this->registryMock->expects(static::once())
+            ->method('registry')
+            ->with('use_page_cache_plugin')
+            ->willReturn(true);
+        $this->stateMock->expects(static::once())
+            ->method('getMode')
+            ->willReturn(AppState::MODE_DEVELOPER);
+        $this->httpHeaderMock->expects(static::any())
+            ->method('getFieldValue')
+            ->willReturnOnConsecutiveCalls('test', 'tag,tag2');
+        $this->responseMock->expects(static::any())
+            ->method('setHeader')
+            ->withConsecutive(
+                ['X-Magento-Cache-Control', 'test'],
+                ['X-Magento-Cache-Debug', 'MISS', true],
+                ['X-Magento-Tags', 'tag,tag2,' . CacheType::CACHE_TAG]
+            );
+        $this->responseMock->expects(static::once())
+            ->method('clearHeader')
+            ->with('X-Magento-Tags');
+        $this->registryMock->expects(static::once())
+            ->method('registry')
+            ->with('use_page_cache_plugin')
+            ->willReturn(true);
+        $this->kernelMock->expects(static::once())
+            ->method('process')
+            ->with($this->responseMock);
 
-        $this->response->expects($this->any())->method('setHeader')->withConsecutive(
-            ['X-Magento-Cache-Control', 'test'],
-            ['X-Magento-Cache-Debug', 'MISS', true],
-            ['X-Magento-Tags', 'tag,tag2,' . \Magento\PageCache\Model\Cache\Type::CACHE_TAG]
+        $this->assertSame(
+            $this->resultMock,
+            $this->plugin->afterRenderResult($this->resultMock, $this->resultMock, $this->responseMock)
         );
-
-        $this->response->expects($this->once())->method('clearHeader')->with('X-Magento-Tags');
-        $this->registry->expects($this->once())->method('registry')->with('use_page_cache_plugin')
-            ->will($this->returnValue(true));
-        $this->kernel->expects($this->once())->method('process')->with($this->response);
-
-        $result = call_user_func($this->closure);
-        $this->assertSame($result, $this->plugin->aroundRenderResult($this->subject, $this->closure, $this->response));
     }
 }
diff --git a/app/code/Magento/PageCache/Test/Unit/Model/Controller/Result/VarnishPluginTest.php b/app/code/Magento/PageCache/Test/Unit/Model/Controller/Result/VarnishPluginTest.php
index e58aae1668ff8dbaeda016465d126b63c1fc4924..a54dc5bacb5a6dc31dc317622c74a9f7b18ba2d0 100644
--- a/app/code/Magento/PageCache/Test/Unit/Model/Controller/Result/VarnishPluginTest.php
+++ b/app/code/Magento/PageCache/Test/Unit/Model/Controller/Result/VarnishPluginTest.php
@@ -5,72 +5,135 @@
  */
 namespace Magento\PageCache\Test\Unit\Model\Controller\Result;
 
+use Magento\PageCache\Model\Controller\Result\VarnishPlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\PageCache\Model\Config;
+use Magento\Framework\App\PageCache\Version;
+use Magento\Framework\App\State as AppState;
+use Magento\Framework\Registry;
+use Magento\Framework\Controller\ResultInterface;
+use Magento\Framework\App\Response\Http as ResponseHttp;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class VarnishPluginTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @param bool $usePlugin
-     * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setCacheDebugHeaderCount
-     * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getModeCount
-     * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $processCount
-     * @dataProvider dataProvider
+     * @var VarnishPlugin
      */
-    public function testAroundResult($usePlugin, $setCacheDebugHeaderCount, $getModeCount, $processCount)
-    {
-        /** @var \Magento\Framework\App\Response\Http|\PHPUnit_Framework_MockObject_MockObject $response */
-        $response = $this->getMock(\Magento\Framework\App\Response\Http::class, [], [], '', false);
-        $response->expects($setCacheDebugHeaderCount)->method('setHeader')
-            ->with('X-Magento-Debug', 1);
+    private $plugin;
+
+    /**
+     * @var ObjectManagerHelper
+     */
+    private $objectManagerHelper;
+
+    /**
+     * @var Config|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $configMock;
 
-        /** @var \Magento\Framework\Controller\ResultInterface $result */
-        $result = $this->getMock(\Magento\Framework\Controller\ResultInterface::class, [], [], '', false);
-        $closure = function () use ($result) {
-            return $result;
-        };
+    /**
+     * @var Version|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $versionMock;
 
-        /** @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject $registry */
-        $registry = $this->getMock(\Magento\Framework\Registry::class, [], [], '', false);
-        $registry->expects($this->once())->method('registry')->with('use_page_cache_plugin')
-            ->will($this->returnValue($usePlugin));
+    /**
+     * @var AppState|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $appStateMock;
 
-        /** @var \Magento\PageCache\Model\Config|\PHPUnit_Framework_MockObject_MockObject $config */
-        $config = $this->getMock(\Magento\PageCache\Model\Config::class, [], [], '', false);
-        $config->expects($this->once())->method('isEnabled')->will($this->returnValue(true));
-        $config->expects($this->once())->method('getType')
-            ->will($this->returnValue(\Magento\PageCache\Model\Config::VARNISH));
+    /**
+     * @var Registry|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $registryMock;
 
-        /** @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject $state */
-        $state = $this->getMock(\Magento\Framework\App\State::class, [], [], '', false);
-        $state->expects($getModeCount)->method('getMode')
-            ->will($this->returnValue(\Magento\Framework\App\State::MODE_DEVELOPER));
+    /**
+     * @var ResultInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $resultMock;
 
-        /** @var \Magento\Framework\Controller\ResultInterface|\PHPUnit_Framework_MockObject_MockObject $subject */
-        $subject = $this->getMock(\Magento\Framework\Controller\ResultInterface::class, [], [], '', false);
+    /**
+     * @var ResponseHttp|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $responseMock;
 
-        /** @var \Magento\Framework\App\PageCache\Version|\PHPUnit_Framework_MockObject_MockObject $version */
-        $version = $this->getMock(\Magento\Framework\App\PageCache\Version::class, [], [], '', false);
-        $version->expects($processCount)->method('process');
+    protected function setUp()
+    {
+        $this->configMock = $this->getMockBuilder(Config::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->versionMock = $this->getMockBuilder(Version::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->appStateMock = $this->getMockBuilder(AppState::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->registryMock = $this->getMockBuilder(Registry::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->resultMock = $this->getMockBuilder(ResultInterface::class)
+            ->getMockForAbstractClass();
+        $this->responseMock = $this->getMockBuilder(ResponseHttp::class)
+            ->disableOriginalConstructor()
+            ->getMock();
 
-        /** @var \Magento\PageCache\Model\Controller\Result\VarnishPlugin $plugin */
-        $plugin = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))->getObject(
-            \Magento\PageCache\Model\Controller\Result\VarnishPlugin::class,
+        $this->objectManagerHelper = new ObjectManagerHelper($this);
+        $this->plugin = $this->objectManagerHelper->getObject(
+            VarnishPlugin::class,
             [
-                'registry' => $registry,
-                'config' => $config,
-                'state' => $state,
-                'version' => $version
+                'registry' => $this->registryMock,
+                'config' => $this->configMock,
+                'state' => $this->appStateMock,
+                'version' => $this->versionMock
             ]
         );
-        $this->assertSame($subject, $plugin->aroundRenderResult($subject, $closure, $response));
+    }
+
+    /**
+     * @param bool $usePlugin
+     * @param int $setCacheDebugHeaderCount
+     * @param int $getModeCount
+     * @param int $processCount
+     *
+     * @dataProvider afterRenderResultDataProvider
+     */
+    public function testAfterRenderResult($usePlugin, $setCacheDebugHeaderCount, $getModeCount, $processCount)
+    {
+        $this->responseMock->expects(static::exactly($setCacheDebugHeaderCount))
+            ->method('setHeader')
+            ->with('X-Magento-Debug', 1);
+        $this->registryMock->expects(static::once())
+            ->method('registry')
+            ->with('use_page_cache_plugin')
+            ->willReturn($usePlugin);
+        $this->configMock->expects(static::once())
+            ->method('isEnabled')
+            ->willReturn(true);
+        $this->configMock->expects(static::once())
+            ->method('getType')
+            ->willReturn(Config::VARNISH);
+        $this->appStateMock->expects(static::exactly($getModeCount))
+            ->method('getMode')
+            ->willReturn(AppState::MODE_DEVELOPER);
+        $this->versionMock->expects(static::exactly($processCount))
+            ->method('process');
+
+        $this->assertSame(
+            $this->resultMock,
+            $this->plugin->afterRenderResult($this->resultMock, $this->resultMock, $this->responseMock)
+        );
     }
 
     /**
      * @return array
      */
-    public function dataProvider()
+    public function afterRenderResultDataProvider()
     {
         return [
-            [true, $this->once(), $this->once(), $this->once()],
-            [false, $this->never(), $this->never(), $this->never()]
+            [true, 1, 1, 1],
+            [false, 0, 0, 0]
         ];
     }
 }
diff --git a/app/code/Magento/Payment/Model/Method/Adapter.php b/app/code/Magento/Payment/Model/Method/Adapter.php
index 1d693e11fe51f5311ede057ffcdb7b7fd73a2338..07a4dcdef5f3c0e228b59de729139fc4ee781961 100644
--- a/app/code/Magento/Payment/Model/Method/Adapter.php
+++ b/app/code/Magento/Payment/Model/Method/Adapter.php
@@ -268,14 +268,17 @@ class Adapter implements MethodInterface
         $checkResult = new DataObject();
         $checkResult->setData('is_available', true);
         try {
-            $validator = $this->getValidatorPool()->get('availability');
-            $result = $validator->validate(
-                [
-                    'payment' => $this->paymentDataObjectFactory->create($this->getInfoInstance())
-                ]
-            );
-
-            $checkResult->setData('is_available', $result->isValid());
+            $infoInstance = $this->getInfoInstance();
+            if ($infoInstance !== null) {
+                $validator = $this->getValidatorPool()->get('availability');
+                $result = $validator->validate(
+                    [
+                        'payment' => $this->paymentDataObjectFactory->create($infoInstance)
+                    ]
+                );
+
+                $checkResult->setData('is_available', $result->isValid());
+            }
         } catch (\Exception $e) {
             // pass
         }
diff --git a/app/code/Magento/Payment/Test/Unit/Model/Method/AdapterTest.php b/app/code/Magento/Payment/Test/Unit/Model/Method/AdapterTest.php
index b5229b57875f0ea6c14d907d4c5e232c81670661..d8fefb7345e0f075a7858b8d109dd86a0556eb01 100644
--- a/app/code/Magento/Payment/Test/Unit/Model/Method/AdapterTest.php
+++ b/app/code/Magento/Payment/Test/Unit/Model/Method/AdapterTest.php
@@ -13,9 +13,12 @@ use Magento\Payment\Gateway\Config\ValueHandlerInterface;
 use Magento\Payment\Gateway\Config\ValueHandlerPoolInterface;
 use Magento\Payment\Gateway\Data\PaymentDataObjectFactory;
 use Magento\Payment\Gateway\Data\PaymentDataObjectInterface;
+use Magento\Payment\Gateway\Validator\ResultInterface;
+use Magento\Payment\Gateway\Validator\ValidatorInterface;
 use Magento\Payment\Gateway\Validator\ValidatorPoolInterface;
 use Magento\Payment\Model\InfoInterface;
 use Magento\Payment\Model\Method\Adapter;
+use PHPUnit_Framework_MockObject_MockObject as MockObject;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -23,27 +26,27 @@ use Magento\Payment\Model\Method\Adapter;
 class AdapterTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject | ManagerInterface
+     * @var MockObject|ManagerInterface
      */
     private $eventManager;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject | ValueHandlerPoolInterface
+     * @var MockObject|ValueHandlerPoolInterface
      */
     private $valueHandlerPool;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject | ValidatorPoolInterface
+     * @var MockObject|ValidatorPoolInterface
      */
     private $validatorPool;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject | CommandPoolInterface
+     * @var MockObject|CommandPoolInterface
      */
     private $commandPool;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject | PaymentDataObjectFactory
+     * @var MockObject|PaymentDataObjectFactory
      */
     private $paymentDataObjectFactory;
 
@@ -69,21 +72,11 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->eventManager = $this->getMock(
-            \Magento\Framework\Event\ManagerInterface::class
-        );
-        $this->valueHandlerPool = $this->getMock(
-            \Magento\Payment\Gateway\Config\ValueHandlerPoolInterface::class
-        );
-        $this->validatorPool = $this->getMock(
-            \Magento\Payment\Gateway\Validator\ValidatorPoolInterface::class
-        );
-        $this->commandPool = $this->getMock(
-            \Magento\Payment\Gateway\Command\CommandPoolInterface::class
-        );
-        $this->paymentDataObjectFactory = $this->getMockBuilder(
-            \Magento\Payment\Gateway\Data\PaymentDataObjectFactory::class
-        )
+        $this->eventManager = $this->getMock(ManagerInterface::class);
+        $this->valueHandlerPool = $this->getMock(ValueHandlerPoolInterface::class);
+        $this->validatorPool = $this->getMock(ValidatorPoolInterface::class);
+        $this->commandPool = $this->getMock(CommandPoolInterface::class);
+        $this->paymentDataObjectFactory = $this->getMockBuilder(PaymentDataObjectFactory::class)
             ->disableOriginalConstructor()
             ->getMock();
 
@@ -103,11 +96,12 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
         );
     }
 
+    /**
+     * @covers \Magento\Payment\Model\Method\Adapter::isAvailable
+     */
     public function testIsAvailableNotActive()
     {
-        $activeValueHandler = $this->getMock(
-            \Magento\Payment\Gateway\Config\ValueHandlerInterface::class
-        );
+        $activeValueHandler = $this->getMock(ValueHandlerInterface::class);
 
         $this->valueHandlerPool->expects(static::once())
             ->method('get')
@@ -124,17 +118,16 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
         static::assertFalse($this->adapter->isAvailable(null));
     }
 
+    /**
+     * @covers \Magento\Payment\Model\Method\Adapter::isAvailable
+     */
     public function testIsAvailableEmptyQuote()
     {
-        $activeValueHandler = $this->getMock(
-            \Magento\Payment\Gateway\Config\ValueHandlerInterface::class
-        );
-        $availabilityValidator = $this->getMock(
-            \Magento\Payment\Gateway\Validator\ValidatorInterface::class
-        );
-        $paymentDO = $this->getMock(\Magento\Payment\Gateway\Data\PaymentDataObjectInterface::class);
-        $validationResult = $this->getMock(\Magento\Payment\Gateway\Validator\ResultInterface::class);
-        $paymentInfo = $this->getMock(\Magento\Payment\Model\InfoInterface::class);
+        $activeValueHandler = $this->getMock(ValueHandlerInterface::class);
+        $availabilityValidator = $this->getMock(ValidatorInterface::class);
+        $paymentDO = $this->getMock(PaymentDataObjectInterface::class);
+        $validationResult = $this->getMock(ResultInterface::class);
+        $paymentInfo = $this->getMock(InfoInterface::class);
 
         $this->valueHandlerPool->expects(static::once())
             ->method('get')
@@ -167,24 +160,49 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
         static::assertTrue($this->adapter->isAvailable(null));
     }
 
+    /**
+     * @covers \Magento\Payment\Model\Method\Adapter::isAvailable
+     */
+    public function testIsAvailableWithEmptyInfoInstance()
+    {
+        $activeValueHandler = $this->getMock(ValueHandlerInterface::class);
+        $this->valueHandlerPool->expects(static::once())
+            ->method('get')
+            ->with('active')
+            ->willReturn($activeValueHandler);
+        $activeValueHandler->expects(static::once())
+            ->method('handle')
+            ->with(['field' => 'active'])
+            ->willReturn(true);
+
+        $this->validatorPool->expects(static::never())
+            ->method('get')
+            ->with('availability');
+
+        $this->eventManager->expects(static::once())
+            ->method('dispatch');
+
+        static::assertTrue($this->adapter->isAvailable(null));
+    }
+
     public function testExecuteCommandWithCommandExecutor()
     {
-        /** @var ManagerInterface|\PHPUnit_Framework_MockObject_MockObject $eventManager */
+        /** @var ManagerInterface|MockObject $eventManager */
         $eventManager = $this->getMock(
             ManagerInterface::class
         );
 
-        /** @var ValueHandlerPoolInterface|\PHPUnit_Framework_MockObject_MockObject $valueHandlerPool */
+        /** @var ValueHandlerPoolInterface|MockObject $valueHandlerPool */
         $valueHandlerPool = $this->getMock(
             ValueHandlerPoolInterface::class
         );
 
-        /** @var CommandManagerInterface|\PHPUnit_Framework_MockObject_MockObject $commandManager */
+        /** @var CommandManagerInterface|MockObject $commandManager */
         $commandManager = $this->getMock(
             CommandManagerInterface::class
         );
 
-        /** @var PaymentDataObjectFactory|\PHPUnit_Framework_MockObject_MockObject $paymentDataObjectFactory */
+        /** @var PaymentDataObjectFactory|MockObject $paymentDataObjectFactory */
         $paymentDataObjectFactory = $this->getMockBuilder(
             PaymentDataObjectFactory::class
         )
@@ -232,25 +250,17 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
 
     public function testExecuteCommandWithCommandPool()
     {
-        /** @var ManagerInterface|\PHPUnit_Framework_MockObject_MockObject $eventManager */
-        $eventManager = $this->getMock(
-            ManagerInterface::class
-        );
+        /** @var ManagerInterface|MockObject $eventManager */
+        $eventManager = $this->getMock(ManagerInterface::class);
 
-        /** @var ValueHandlerPoolInterface|\PHPUnit_Framework_MockObject_MockObject $valueHandlerPool */
-        $valueHandlerPool = $this->getMock(
-            ValueHandlerPoolInterface::class
-        );
+        /** @var ValueHandlerPoolInterface|MockObject $valueHandlerPool */
+        $valueHandlerPool = $this->getMock(ValueHandlerPoolInterface::class);
 
-        /** @var CommandPoolInterface|\PHPUnit_Framework_MockObject_MockObject $commandPool */
-        $commandPool = $this->getMock(
-            CommandPoolInterface::class
-        );
+        /** @var CommandPoolInterface|MockObject $commandPool */
+        $commandPool = $this->getMock(CommandPoolInterface::class);
 
-        /** @var PaymentDataObjectFactory|\PHPUnit_Framework_MockObject_MockObject $paymentDataObjectFactory */
-        $paymentDataObjectFactory = $this->getMockBuilder(
-            PaymentDataObjectFactory::class
-        )
+        /** @var PaymentDataObjectFactory|MockObject $paymentDataObjectFactory */
+        $paymentDataObjectFactory = $this->getMockBuilder(PaymentDataObjectFactory::class)
             ->disableOriginalConstructor()
             ->getMock();
 
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Store/SwitcherPlugin.php b/app/code/Magento/Paypal/Block/Adminhtml/Store/SwitcherPlugin.php
index 3af4493e61e1f869a9c5288c076f609add10b4fe..23b7fa31fb578056dba1e4e9ea440dd0ec53bc63 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/Store/SwitcherPlugin.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/Store/SwitcherPlugin.php
@@ -5,26 +5,28 @@
  */
 namespace Magento\Paypal\Block\Adminhtml\Store;
 
+use Magento\Backend\Block\Store\Switcher as StoreSwitcherBlock;
+use Magento\Paypal\Model\Config\StructurePlugin as ConfigStructurePlugin;
+
+/**
+ * Plugin for \Magento\Backend\Block\Store\Switcher
+ */
 class SwitcherPlugin
 {
     /**
      * Remove country request param from url
      *
-     * @param \Magento\Backend\Block\Store\Switcher $subject
-     * @param \Closure $proceed
+     * @param StoreSwitcherBlock $subject
      * @param string $route
      * @param array $params
-     * @return string
+     * @return array
      */
-    public function aroundGetUrl(
-        \Magento\Backend\Block\Store\Switcher $subject,
-        \Closure $proceed,
-        $route = '',
-        $params = []
-    ) {
-        if ($subject->getRequest()->getParam(\Magento\Paypal\Model\Config\StructurePlugin::REQUEST_PARAM_COUNTRY)) {
-            $params[\Magento\Paypal\Model\Config\StructurePlugin::REQUEST_PARAM_COUNTRY] = null;
+    public function beforeGetUrl(StoreSwitcherBlock $subject, $route = '', $params = [])
+    {
+        if ($subject->getRequest()->getParam(ConfigStructurePlugin::REQUEST_PARAM_COUNTRY)) {
+            $params[ConfigStructurePlugin::REQUEST_PARAM_COUNTRY] = null;
         }
-        return $proceed($route, $params);
+
+        return [$route, $params];
     }
 }
diff --git a/app/code/Magento/Paypal/Block/Express/InContext/Minicart/Button.php b/app/code/Magento/Paypal/Block/Express/InContext/Minicart/Button.php
index 56e32da15c908ae4785b489a5112a13edb151af5..6785b95dadeea08b22556252a1a4e33a44f95956 100644
--- a/app/code/Magento/Paypal/Block/Express/InContext/Minicart/Button.php
+++ b/app/code/Magento/Paypal/Block/Express/InContext/Minicart/Button.php
@@ -54,7 +54,6 @@ class Button extends Template implements ShortcutInterface
     private $session;
 
     /**
-     * Constructor
      * @param Context $context
      * @param ResolverInterface $localeResolver
      * @param ConfigFactory $configFactory
@@ -80,6 +79,8 @@ class Button extends Template implements ShortcutInterface
     }
 
     /**
+     * Check `in_context` config value
+     *
      * @return bool
      */
     private function isInContext()
@@ -88,13 +89,27 @@ class Button extends Template implements ShortcutInterface
     }
 
     /**
+     * Check `visible_on_cart` config value
+     *
+     * @return bool
+     */
+    private function isVisibleOnCart()
+    {
+        return (bool)(int) $this->config->getValue('visible_on_cart');
+    }
+
+    /**
+     * Check is Paypal In-Context Express Checkout button
+     * should render in cart/mini-cart
+     *
      * @return bool
      */
     protected function shouldRender()
     {
         return $this->payment->isAvailable($this->session->getQuote())
             && $this->isMiniCart
-            && $this->isInContext();
+            && $this->isInContext()
+            && $this->isVisibleOnCart();
     }
 
     /**
diff --git a/app/code/Magento/Paypal/Model/Config/Structure/Element/FieldPlugin.php b/app/code/Magento/Paypal/Model/Config/Structure/Element/FieldPlugin.php
index 2d49ddfcb3d01955fefd089052f4b444d9c91134..a6288b8fc685c45aa823e807433c1df896c5dc9f 100644
--- a/app/code/Magento/Paypal/Model/Config/Structure/Element/FieldPlugin.php
+++ b/app/code/Magento/Paypal/Model/Config/Structure/Element/FieldPlugin.php
@@ -5,39 +5,45 @@
  */
 namespace Magento\Paypal\Model\Config\Structure\Element;
 
+use Magento\Framework\App\RequestInterface;
+use Magento\Config\Model\Config\Structure\Element\Field as FieldConfigStructure;
+use Magento\Paypal\Model\Config\StructurePlugin as ConfigStructurePlugin;
+
+/**
+ * Plugin for \Magento\Config\Model\Config\Structure\Element\Field
+ */
 class FieldPlugin
 {
     /**
-     * @var \Magento\Framework\App\RequestInterface
+     * @var RequestInterface
      */
-    protected $_request;
+    private $request;
 
     /**
-     * @param \Magento\Framework\App\RequestInterface $request
+     * @param RequestInterface $request
      */
-    public function __construct(\Magento\Framework\App\RequestInterface $request)
+    public function __construct(RequestInterface $request)
     {
-        $this->_request = $request;
+        $this->request = $request;
     }
 
     /**
      * Get original configPath (not changed by PayPal configuration inheritance)
      *
-     * @param \Magento\Config\Model\Config\Structure\Element\Field $subject
-     * @param \Closure $proceed
+     * @param FieldConfigStructure $subject
+     * @param string|null $result
      * @return string|null
      */
-    public function aroundGetConfigPath(
-        \Magento\Config\Model\Config\Structure\Element\Field $subject,
-        \Closure $proceed
-    ) {
-        $configPath = $proceed();
-        if (!isset($configPath) && $this->_request->getParam('section') == 'payment') {
-            $configPath = preg_replace('@^(' . implode(
-                '|',
-                \Magento\Paypal\Model\Config\StructurePlugin::getPaypalConfigCountries(true)
-            ) . ')/@', 'payment/', $subject->getPath());
+    public function afterGetConfigPath(FieldConfigStructure $subject, $result)
+    {
+        if (!$result && $this->request->getParam('section') == 'payment') {
+            $result = preg_replace(
+                '@^(' . implode('|', ConfigStructurePlugin::getPaypalConfigCountries(true)) . ')/@',
+                'payment/',
+                $subject->getPath()
+            );
         }
-        return $configPath;
+
+        return $result;
     }
 }
diff --git a/app/code/Magento/Paypal/Model/Config/StructurePlugin.php b/app/code/Magento/Paypal/Model/Config/StructurePlugin.php
index 52f46a8411c0257d1f894ce0693d6b77d8dd35c0..f45a7948906253ec53a4dd710b37825363f39877 100644
--- a/app/code/Magento/Paypal/Model/Config/StructurePlugin.php
+++ b/app/code/Magento/Paypal/Model/Config/StructurePlugin.php
@@ -11,6 +11,9 @@ use Magento\Config\Model\Config\Structure\Element\Section;
 use Magento\Config\Model\Config\Structure\ElementInterface;
 use Magento\Paypal\Helper\Backend as BackendHelper;
 
+/**
+ * Plugin for \Magento\Config\Model\Config\Structure
+ */
 class StructurePlugin
 {
     /**
@@ -21,17 +24,17 @@ class StructurePlugin
     /**
      * @var BackendHelper
      */
-    protected $_helper;
+    private $backendHelper;
 
     /**
      * @var ScopeDefiner
      */
-    protected $_scopeDefiner;
+    private $scopeDefiner;
 
     /**
      * @var string[]
      */
-    private static $_paypalConfigCountries = [
+    private static $paypalConfigCountries = [
         'payment_us',
         'payment_ca',
         'payment_au',
@@ -49,12 +52,10 @@ class StructurePlugin
      * @param ScopeDefiner $scopeDefiner
      * @param BackendHelper $helper
      */
-    public function __construct(
-        ScopeDefiner $scopeDefiner,
-        BackendHelper $helper
-    ) {
-        $this->_scopeDefiner = $scopeDefiner;
-        $this->_helper = $helper;
+    public function __construct(ScopeDefiner $scopeDefiner, BackendHelper $helper)
+    {
+        $this->scopeDefiner = $scopeDefiner;
+        $this->backendHelper = $helper;
     }
 
     /**
@@ -65,10 +66,12 @@ class StructurePlugin
      */
     public static function getPaypalConfigCountries($addOther = false)
     {
-        $countries = self::$_paypalConfigCountries;
+        $countries = self::$paypalConfigCountries;
+
         if ($addOther) {
             $countries[] = 'payment_other';
         }
+
         return $countries;
     }
 
@@ -78,39 +81,45 @@ class StructurePlugin
      * @param Structure $subject
      * @param \Closure $proceed
      * @param array $pathParts
-     * @return ElementInterface
+     * @return ElementInterface|null
+     *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundGetElementByPathParts(
-        Structure $subject,
-        \Closure $proceed,
-        array $pathParts
-    ) {
+    public function aroundGetElementByPathParts(Structure $subject, \Closure $proceed, array $pathParts)
+    {
         $isSectionChanged = $pathParts[0] == 'payment';
+
         if ($isSectionChanged) {
-            $requestedCountrySection = 'payment_' . strtolower($this->_helper->getConfigurationCountryCode());
+            $requestedCountrySection = 'payment_' . strtolower($this->backendHelper->getConfigurationCountryCode());
+
             if (in_array($requestedCountrySection, self::getPaypalConfigCountries())) {
                 $pathParts[0] = $requestedCountrySection;
             } else {
                 $pathParts[0] = 'payment_other';
             }
         }
-        /** @var ElementInterface $result */
+
         $result = $proceed($pathParts);
-        if ($isSectionChanged && isset($result)) {
+
+        if ($isSectionChanged && $result) {
             if ($result instanceof Section) {
                 $this->restructurePayments($result);
-                $result->setData(array_merge(
-                    $result->getData(),
-                    ['showInDefault' => true, 'showInWebsite' => true, 'showInStore' => true]
-                ), $this->_scopeDefiner->getScope());
+                $result->setData(
+                    array_merge(
+                        $result->getData(),
+                        ['showInDefault' => true, 'showInWebsite' => true, 'showInStore' => true]
+                    ),
+                    $this->scopeDefiner->getScope()
+                );
             }
         }
+
         return $result;
     }
 
     /**
-     * Changes payment config structure.
+     * Change payment config structure
+     *
      * Groups which have `displayIn` element, transfer to appropriate group.
      * Groups without `displayIn` transfer to other payment methods group.
      *
@@ -139,7 +148,7 @@ class StructurePlugin
         }
 
         $configuration['children'] = $sectionMap;
-        $result->setData($configuration, $this->_scopeDefiner->getScope());
+        $result->setData($configuration, $this->scopeDefiner->getScope());
     }
 
     /**
diff --git a/app/code/Magento/Paypal/Model/Method/Checks/SpecificationPlugin.php b/app/code/Magento/Paypal/Model/Method/Checks/SpecificationPlugin.php
index a171cd5628f0fb90dcb57ec521d5c47533f9ccc7..f2b650b95e9e8cdfaa86f2bf7e398f9fad74abb2 100644
--- a/app/code/Magento/Paypal/Model/Method/Checks/SpecificationPlugin.php
+++ b/app/code/Magento/Paypal/Model/Method/Checks/SpecificationPlugin.php
@@ -11,49 +11,54 @@ use Magento\Paypal\Model\Config;
 use Magento\Paypal\Model\Billing\AgreementFactory;
 use Magento\Quote\Model\Quote;
 
+/**
+ * Plugin for \Magento\Payment\Model\Checks\Composite
+ */
 class SpecificationPlugin
 {
     /**
      * @var AgreementFactory
      */
-    protected $_agreementFactory;
+    private $agreementFactory;
 
     /**
      * @param AgreementFactory $agreementFactory
      */
     public function __construct(AgreementFactory $agreementFactory)
     {
-        $this->_agreementFactory = $agreementFactory;
+        $this->agreementFactory = $agreementFactory;
     }
 
     /**
      * Override check for Billing Agreements
      *
      * @param SpecificationInterface $specification
-     * @param \Closure $proceed
+     * @param bool $result
      * @param MethodInterface $paymentMethod
      * @param Quote $quote
      * @return bool
+     *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundIsApplicable(
+    public function afterIsApplicable(
         SpecificationInterface $specification,
-        \Closure $proceed,
+        $result,
         MethodInterface $paymentMethod,
         Quote $quote
     ) {
-        $originallyIsApplicable = $proceed($paymentMethod, $quote);
-        if (!$originallyIsApplicable) {
+        if (!$result) {
             return false;
         }
 
         if ($paymentMethod->getCode() == Config::METHOD_BILLING_AGREEMENT) {
             if ($quote->getCustomerId()) {
-                $availableBA = $this->_agreementFactory->create()->getAvailableCustomerBillingAgreements(
+                $availableBA = $this->agreementFactory->create()->getAvailableCustomerBillingAgreements(
                     $quote->getCustomerId()
                 );
+
                 return count($availableBA) > 0;
             }
+
             return false;
         }
 
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/Store/SwitcherPluginTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/Store/SwitcherPluginTest.php
index 320e89d567b9cac8155c45885671d20ed569ef99..a97fb0ad2a6fcc5723635b980571559e82742e70 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/Store/SwitcherPluginTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/Store/SwitcherPluginTest.php
@@ -5,42 +5,72 @@
  */
 namespace Magento\Paypal\Test\Unit\Block\Adminhtml\Store;
 
+use Magento\Paypal\Block\Adminhtml\Store\SwitcherPlugin as StoreSwitcherBlockPlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\Backend\Block\Store\Switcher as StoreSwitcherBlock;
+use Magento\Framework\App\RequestInterface;
+use Magento\Paypal\Model\Config\StructurePlugin as ConfigStructurePlugin;
+
 class SwitcherPluginTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var SwitcherPlugin
+     * @var StoreSwitcherBlockPlugin
+     */
+    private $plugin;
+
+    /**
+     * @var ObjectManagerHelper
+     */
+    private $objectManagerHelper;
+
+    /**
+     * @var StoreSwitcherBlock|\PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_model;
+    private $subjectMock;
+
+    /**
+     * @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $requestMock;
 
     protected function setUp()
     {
-        $this->_model = new \Magento\Paypal\Block\Adminhtml\Store\SwitcherPlugin();
+        $this->subjectMock = $this->getMockBuilder(StoreSwitcherBlock::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->requestMock = $this->getMockBuilder(RequestInterface::class)
+            ->getMockForAbstractClass();
+
+        $this->objectManagerHelper = new ObjectManagerHelper($this);
+        $this->plugin = $this->objectManagerHelper->getObject(StoreSwitcherBlockPlugin::class);
     }
 
     /**
-     * @param null|string $countryParam
+     * @param string|null $countryParam
      * @param array $getUrlParams
-     * @dataProvider aroundGetUrlDataProvider
+     *
+     * @dataProvider beforeGetUrlDataProvider
      */
-    public function testAroundGetUrl($countryParam, $getUrlParams)
+    public function testBeforeGetUrl($countryParam, $getUrlParams)
     {
-        $subjectRequest = $this->getMockForAbstractClass(\Magento\Framework\App\RequestInterface::class);
-        $subjectRequest->expects($this->once())
+        $this->requestMock->expects(static::once())
             ->method('getParam')
-            ->with(\Magento\Paypal\Model\Config\StructurePlugin::REQUEST_PARAM_COUNTRY)
-            ->will($this->returnValue($countryParam));
-        $subject = $this->getMock(\Magento\Backend\Block\Store\Switcher::class, ['getRequest'], [], '', false);
-        $subject->expects($this->any())->method('getRequest')->will($this->returnValue($subjectRequest));
-        $getUrl = function ($route, $params) {
-            return [$route, $params];
-        };
-        $this->assertEquals(['', $getUrlParams], $this->_model->aroundGetUrl($subject, $getUrl, '', []));
+            ->with(ConfigStructurePlugin::REQUEST_PARAM_COUNTRY)
+            ->willReturn($countryParam);
+        $this->subjectMock->expects(static::any())
+            ->method('getRequest')
+            ->willReturn($this->requestMock);
+
+        $this->assertEquals(['', $getUrlParams], $this->plugin->beforeGetUrl($this->subjectMock, '', []));
     }
 
-    public function aroundGetUrlDataProvider()
+    /**
+     * @return array
+     */
+    public function beforeGetUrlDataProvider()
     {
         return [
-            ['any value', [\Magento\Paypal\Model\Config\StructurePlugin::REQUEST_PARAM_COUNTRY => null]],
+            ['any value', [ConfigStructurePlugin::REQUEST_PARAM_COUNTRY => null]],
             [null, []]
         ];
     }
diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/Element/FieldPluginTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/Element/FieldPluginTest.php
index e630e3c57207c113e502da623dd77f116de6bc53..48314c28ceb983b5ca660aa6e3e34345cc0d1cd3 100644
--- a/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/Element/FieldPluginTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Model/Config/Structure/Element/FieldPluginTest.php
@@ -3,80 +3,96 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
 namespace Magento\Paypal\Test\Unit\Model\Config\Structure\Element;
 
+use Magento\Paypal\Model\Config\Structure\Element\FieldPlugin as FieldConfigStructurePlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\Framework\App\RequestInterface;
+use Magento\Config\Model\Config\Structure\Element\Field as FieldConfigStructureMock;
+
 class FieldPluginTest extends \PHPUnit_Framework_TestCase
 {
-    /** @var FieldPlugin */
-    protected $model;
+    /**
+     * @var FieldConfigStructurePlugin
+     */
+    private $plugin;
 
-    /** @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject */
-    protected $request;
+    /**
+     * @var ObjectManagerHelper
+     */
+    private $objectManagerHelper;
+
+    /**
+     * @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $requestMock;
 
-    /** @var  \Magento\Config\Model\Config\Structure\Element\Field|\PHPUnit_Framework_MockObject_MockObject */
-    protected $subject;
+    /**
+     * @var FieldConfigStructureMock|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $subjectMock;
 
     protected function setUp()
     {
-        $this->request = $this->getMockForAbstractClass(\Magento\Framework\App\RequestInterface::class);
-        $this->subject = $this->getMock(\Magento\Config\Model\Config\Structure\Element\Field::class, [], [], '', false);
+        $this->requestMock = $this->getMockBuilder(RequestInterface::class)
+            ->getMockForAbstractClass();
+        $this->subjectMock = $this->getMockBuilder(FieldConfigStructureMock::class)
+            ->disableOriginalConstructor()
+            ->getMock();
 
-        $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
-        $this->model = $helper->getObject(
-            \Magento\Paypal\Model\Config\Structure\Element\FieldPlugin::class,
-            ['request' => $this->request]
+        $this->objectManagerHelper = new ObjectManagerHelper($this);
+        $this->plugin = $this->objectManagerHelper->getObject(
+            FieldConfigStructurePlugin::class,
+            ['request' => $this->requestMock]
         );
     }
 
     public function testAroundGetConfigPathHasResult()
     {
         $someResult = 'some result';
-        $callback = function () use ($someResult) {
-            return $someResult;
-        };
-        $this->assertEquals($someResult, $this->model->aroundGetConfigPath($this->subject, $callback));
+
+        $this->assertEquals($someResult, $this->plugin->afterGetConfigPath($this->subjectMock, $someResult));
     }
 
     public function testAroundGetConfigPathNonPaymentSection()
     {
-        $callback = function () {
-            return null;
-        };
-        $this->request->expects($this->once())
+        $this->requestMock->expects(static::once())
             ->method('getParam')
             ->with('section')
-            ->will($this->returnValue('non-payment'));
-        $this->assertNull($this->model->aroundGetConfigPath($this->subject, $callback));
+            ->willReturn('non-payment');
+
+        $this->assertNull($this->plugin->afterGetConfigPath($this->subjectMock, null));
     }
 
     /**
      * @param string $subjectPath
      * @param string $expectedConfigPath
-     * @dataProvider aroundGetConfigPathDataProvider
+     *
+     * @dataProvider afterGetConfigPathDataProvider
      */
     public function testAroundGetConfigPath($subjectPath, $expectedConfigPath)
     {
-        $callback = function () {
-            return null;
-        };
-        $this->request->expects($this->once())
+        $this->requestMock->expects(static::once())
             ->method('getParam')
             ->with('section')
-            ->will($this->returnValue('payment'));
-        $this->subject->expects($this->once())
+            ->willReturn('payment');
+        $this->subjectMock->expects(static::once())
             ->method('getPath')
-            ->will($this->returnValue($subjectPath));
-        $this->assertEquals($expectedConfigPath, $this->model->aroundGetConfigPath($this->subject, $callback));
+            ->willReturn($subjectPath);
+
+        $this->assertEquals($expectedConfigPath, $this->plugin->afterGetConfigPath($this->subjectMock, null));
     }
 
-    public function aroundGetConfigPathDataProvider()
+    /**
+     * @return array
+     */
+    public function afterGetConfigPathDataProvider()
     {
         return [
             ['payment_us/group/field', 'payment/group/field'],
             ['payment_other/group/field', 'payment/group/field'],
             ['payment_us', 'payment_us'],
-            ['payment_wrong_country/group/field', 'payment_wrong_country/group/field'],
+            ['payment_wrong_country/group/field', 'payment_wrong_country/group/field']
         ];
     }
 }
diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Config/StructurePluginTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Config/StructurePluginTest.php
index 4479f0a1233515039e499f73cc4595c5369007f7..63abcd660425abd7173fbd2528e047498c7cce62 100644
--- a/app/code/Magento/Paypal/Test/Unit/Model/Config/StructurePluginTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Model/Config/StructurePluginTest.php
@@ -3,45 +3,80 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
 namespace Magento\Paypal\Test\Unit\Model\Config;
 
-use Magento\Paypal\Model\Config\StructurePlugin;
+use Magento\Paypal\Model\Config\StructurePlugin as ConfigStructurePlugin;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\Config\Model\Config\ScopeDefiner as ConfigScopeDefiner;
+use Magento\Paypal\Helper\Backend as BackendHelper;
+use Magento\Config\Model\Config\Structure as ConfigStructure;
+use Magento\Config\Model\Config\Structure\ElementInterface as ElementConfigStructure;
 
 class StructurePluginTest extends \PHPUnit_Framework_TestCase
 {
-    /** @var \Magento\Paypal\Model\Config\StructurePlugin */
-    protected $_model;
+    /**
+     * @var ConfigStructurePlugin
+     */
+    private $plugin;
+
+    /**
+     * @var ObjectManagerHelper
+     */
+    private $objectManagerHelper;
+
+    /**
+     * @var ConfigScopeDefiner|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $configScopeDefinerMock;
+
+    /**
+     * @var BackendHelper|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $backendHelperMock;
 
-    /** @var \Magento\Config\Model\Config\ScopeDefiner|\PHPUnit_Framework_MockObject_MockObject */
-    protected $_scopeDefiner;
+    /**
+     * @var ConfigStructure|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $configStructureMock;
 
-    /** @var \Magento\Paypal\Helper\Backend|\PHPUnit_Framework_MockObject_MockObject */
-    protected $_helper;
+    /**
+     * @var ElementConfigStructure|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $elementConfigStructureMock;
 
     protected function setUp()
     {
-        $this->_scopeDefiner = $this->getMock(\Magento\Config\Model\Config\ScopeDefiner::class, [], [], '', false);
-        $this->_helper = $this->getMock(\Magento\Paypal\Helper\Backend::class, [], [], '', false);
-
-        $objectManagerHelper = new ObjectManagerHelper($this);
-        $this->_model = $objectManagerHelper->getObject(
-            \Magento\Paypal\Model\Config\StructurePlugin::class,
-            ['scopeDefiner' => $this->_scopeDefiner, 'helper' => $this->_helper]
+        $this->configScopeDefinerMock = $this->getMockBuilder(ConfigScopeDefiner::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->backendHelperMock = $this->getMockBuilder(BackendHelper::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->configStructureMock = $this->getMockBuilder(ConfigStructure::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->elementConfigStructureMock = $this->getMockBuilder(ElementConfigStructure::class)
+            ->getMockForAbstractClass();
+
+        $this->objectManagerHelper = new ObjectManagerHelper($this);
+        $this->plugin = $this->objectManagerHelper->getObject(
+            ConfigStructurePlugin::class,
+            ['scopeDefiner' => $this->configScopeDefinerMock, 'helper' => $this->backendHelperMock]
         );
     }
 
     public function testGetPaypalConfigCountriesWithOther()
     {
-        $countries = StructurePlugin::getPaypalConfigCountries(true);
+        $countries = ConfigStructurePlugin::getPaypalConfigCountries(true);
+
         $this->assertContains('payment_us', $countries);
         $this->assertContains('payment_other', $countries);
     }
 
     public function testGetPaypalConfigCountries()
     {
-        $countries = StructurePlugin::getPaypalConfigCountries(false);
+        $countries = ConfigStructurePlugin::getPaypalConfigCountries(false);
+
         $this->assertContains('payment_us', $countries);
         $this->assertNotContains('payment_other', $countries);
     }
@@ -49,20 +84,25 @@ class StructurePluginTest extends \PHPUnit_Framework_TestCase
     /**
      * @param array $pathParts
      * @param bool $returnResult
+     *
      * @dataProvider aroundGetElementByPathPartsNonPaymentDataProvider
      */
     public function testAroundGetElementByPathPartsNonPayment($pathParts, $returnResult)
     {
-        $result = $returnResult
-            ? $this->getMockForAbstractClass(\Magento\Config\Model\Config\Structure\ElementInterface::class)
-            : null;
-        $this->_aroundGetElementByPathPartsAssertResult(
+        $result = $returnResult ? $this->elementConfigStructureMock : null;
+        $proceed = function () use ($result) {
+            return $result;
+        };
+
+        $this->assertSame(
             $result,
-            $this->_getElementByPathPartsCallback($pathParts, $result),
-            $pathParts
+            $this->plugin->aroundGetElementByPathParts($this->configStructureMock, $proceed, $pathParts)
         );
     }
 
+    /**
+     * @return array
+     */
     public function aroundGetElementByPathPartsNonPaymentDataProvider()
     {
         return [
@@ -76,146 +116,62 @@ class StructurePluginTest extends \PHPUnit_Framework_TestCase
     /**
      * @param array $pathParts
      * @param string $countryCode
-     * @param array $expectedPathParts
+     *
      * @dataProvider aroundGetElementByPathPartsDataProvider
      */
-    public function testAroundGetElementByPathPartsNoResult($pathParts, $countryCode, $expectedPathParts)
+    public function testAroundGetElementByPathPartsNoResult($pathParts, $countryCode)
     {
-        $this->_getElementByPathPartsPrepareHelper($countryCode);
-        $this->_aroundGetElementByPathPartsAssertResult(
+        $proceed = function () {
+            return null;
+        };
+
+        $this->backendHelperMock->expects(static::once())
+            ->method('getConfigurationCountryCode')
+            ->willReturn($countryCode);
+
+        $this->assertEquals(
             null,
-            $this->_getElementByPathPartsCallback($expectedPathParts, null),
-            $pathParts
+            $this->plugin->aroundGetElementByPathParts($this->configStructureMock, $proceed, $pathParts)
         );
     }
 
     /**
      * @param array $pathParts
      * @param string $countryCode
-     * @param array $expectedPathParts
+     *
      * @dataProvider aroundGetElementByPathPartsDataProvider
      */
-    public function testAroundGetElementByPathParts($pathParts, $countryCode, $expectedPathParts)
+    public function testAroundGetElementByPathParts($pathParts, $countryCode)
     {
-        $this->_getElementByPathPartsPrepareHelper($countryCode);
-        $result = $this->getMockForAbstractClass(\Magento\Config\Model\Config\Structure\ElementInterface::class);
-        $this->_aroundGetElementByPathPartsAssertResult(
-            $result,
-            $this->_getElementByPathPartsCallback($expectedPathParts, $result),
-            $pathParts
+        $result = $this->elementConfigStructureMock;
+        $proceed = function () use ($result) {
+            return $result;
+        };
+
+        $this->backendHelperMock->expects(static::once())
+            ->method('getConfigurationCountryCode')
+            ->willReturn($countryCode);
+
+        $this->assertSame(
+            $this->elementConfigStructureMock,
+            $this->plugin->aroundGetElementByPathParts($this->configStructureMock, $proceed, $pathParts)
         );
     }
 
+    /**
+     * @return array
+     */
     public function aroundGetElementByPathPartsDataProvider()
     {
         return [
             [
                 ['payment', 'group1', 'group2', 'field'],
                 'any',
-                ['payment_other', 'group1', 'group2', 'field'],
             ],
             [
                 ['payment', 'group1', 'group2', 'field'],
                 'DE',
-                ['payment_de', 'group1', 'group2', 'field']
-            ],
+            ]
         ];
     }
-
-    /**
-     * @param array $pathParts
-     * @param string $countryCode
-     * @param array $expectedPathParts
-     * @dataProvider aroundGetSectionByPathPartsDataProvider
-     */
-    public function testAroundGetSectionByPathParts($pathParts, $countryCode, $expectedPathParts)
-    {
-        $this->_getElementByPathPartsPrepareHelper($countryCode);
-        $result = $this->getMock(\Magento\Config\Model\Config\Structure\Element\Section::class, [], [], '', false);
-        $self = $this;
-        $getElementByPathParts = function ($pathParts) use ($self, $expectedPathParts, $result) {
-            $self->assertEquals($expectedPathParts, $pathParts);
-            $scope = 'any scope';
-            $sectionMap = [
-                'account' => [],
-                'recommended_solutions' => [],
-                'other_paypal_payment_solutions' => [],
-                'other_payment_methods' => []
-            ];
-            $self->_scopeDefiner->expects($self->any())
-                ->method('getScope')
-                ->will($self->returnValue($scope));
-            $result->expects($self->at(0))
-                ->method('getData')
-                ->will($self->returnValue(['children' => []]));
-            $result->expects($self->at(2))
-                ->method('getData')
-                ->will($self->returnValue(['children' => $sectionMap]));
-            $result->expects($self->at(1))
-                ->method('setData')
-                ->with(['children' => $sectionMap], $scope)
-                ->will($self->returnSelf());
-            $result->expects($self->at(3))
-                ->method('setData')
-                ->with(['children' => $sectionMap,
-                    'showInDefault' => true,
-                    'showInWebsite' => true,
-                    'showInStore' => true], $scope)
-                ->will($self->returnSelf());
-            return $result;
-        };
-        $this->_aroundGetElementByPathPartsAssertResult($result, $getElementByPathParts, $pathParts);
-    }
-
-    public function aroundGetSectionByPathPartsDataProvider()
-    {
-        return [
-            [['payment'], 'GB', ['payment_gb']],
-            [['payment'], 'any', ['payment_other']],
-        ];
-    }
-
-    /**
-     * Assert result of aroundGetElementByPathParts method
-     *
-     * @param \PHPUnit_Framework_MockObject_MockObject|null $result
-     * @param \Closure $getElementByPathParts
-     * @param array $pathParts
-     */
-    private function _aroundGetElementByPathPartsAssertResult($result, $getElementByPathParts, $pathParts)
-    {
-        $this->assertEquals($result, $this->_model->aroundGetElementByPathParts(
-            $this->getMock(\Magento\Config\Model\Config\Structure::class, [], [], '', false),
-            $getElementByPathParts,
-            $pathParts
-        ));
-    }
-
-    /**
-     * Get callback for aroundGetElementByPathParts method
-     *
-     * @param array $expectedPathParts
-     * @param \PHPUnit_Framework_MockObject_MockObject|null $result
-     * @return \Closure
-     */
-    private function _getElementByPathPartsCallback($expectedPathParts, $result)
-    {
-        $self = $this;
-        return function ($pathParts) use ($self, $expectedPathParts, $result) {
-            $self->assertEquals($expectedPathParts, $pathParts);
-            return $result;
-        };
-    }
-
-    /**
-     * Prepare helper for test
-     *
-     * @param string $countryCode
-     */
-    private function _getElementByPathPartsPrepareHelper($countryCode)
-    {
-        $this->_helper->expects($this->once())
-            ->method('getConfigurationCountryCode')
-            ->will($this->returnValue($countryCode));
-    }
 }
diff --git a/app/code/Magento/Paypal/Test/Unit/Model/Method/Checks/SpecificationPluginTest.php b/app/code/Magento/Paypal/Test/Unit/Model/Method/Checks/SpecificationPluginTest.php
index eb8eb1091b083d70d0ee7b1c69d26da87525d113..0994088d84a259f3596065e1ffdc9bb423110b52 100644
--- a/app/code/Magento/Paypal/Test/Unit/Model/Method/Checks/SpecificationPluginTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Model/Method/Checks/SpecificationPluginTest.php
@@ -3,155 +3,179 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
 namespace Magento\Paypal\Test\Unit\Model\Method\Checks;
 
+use Magento\Paypal\Model\Method\Checks\SpecificationPlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\Paypal\Model\Billing\AgreementFactory as BillingAgreementFactory;
+use Magento\Payment\Model\Checks\SpecificationInterface;
 use Magento\Payment\Model\MethodInterface;
-use Magento\Paypal\Model\Billing\AgreementFactory;
 use Magento\Quote\Model\Quote;
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\Paypal\Model\ResourceModel\Billing\Agreement\Collection as BillingAgreementCollection;
+use Magento\Paypal\Model\Billing\Agreement as BillingAgreement;
 
 class SpecificationPluginTest extends \PHPUnit_Framework_TestCase
 {
-    /** @var SpecificationPlugin */
-    protected $model;
+    /**
+     * @var SpecificationPlugin
+     */
+    private $plugin;
+
+    /**
+     * @var ObjectManagerHelper
+     */
+    private $objectManagerHelper;
 
-    /** @var AgreementFactory|\PHPUnit_Framework_MockObject_MockObject */
-    protected $agreementFactory;
+    /**
+     * @var BillingAgreementFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $billingAgreementFactoryMock;
+
+    /**
+     * @var SpecificationInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $specificationMock;
+
+    /**
+     * @var MethodInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $paymentMethodMock;
+
+    /**
+     * @var Quote|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $quoteMock;
+
+    /**
+     * @var BillingAgreementCollection|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $billingAgreementCollectionMock;
+
+    /**
+     * @var BillingAgreement|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $billingAgreementMock;
 
     protected function setUp()
     {
-        $this->agreementFactory = $this->getMockBuilder(\Magento\Paypal\Model\Billing\AgreementFactory::class)
+        $this->billingAgreementFactoryMock = $this->getMockBuilder(BillingAgreementFactory::class)
             ->disableOriginalConstructor()
             ->setMethods(['create'])
             ->getMock();
+        $this->specificationMock = $this->getMockBuilder(SpecificationInterface::class)
+            ->getMockForAbstractClass();
+        $this->paymentMethodMock = $this->getMockBuilder(MethodInterface::class)
+            ->getMockForAbstractClass();
+        $this->quoteMock = $this->getMockBuilder(Quote::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getCustomerId'])
+            ->getMock();
+        $this->billingAgreementCollectionMock = $this->getMockBuilder(BillingAgreementCollection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->billingAgreementMock = $this->getMockBuilder(BillingAgreement::class)
+            ->disableOriginalConstructor()
+            ->getMock();
 
-        $objectManagerHelper = new ObjectManagerHelper($this);
-        $this->model = $objectManagerHelper->getObject(
-            \Magento\Paypal\Model\Method\Checks\SpecificationPlugin::class,
+        $this->objectManagerHelper = new ObjectManagerHelper($this);
+        $this->plugin = $this->objectManagerHelper->getObject(
+            SpecificationPlugin::class,
             [
-                'agreementFactory' => $this->agreementFactory
+                'agreementFactory' => $this->billingAgreementFactoryMock
             ]
         );
     }
 
-    public function testAroundIsApplicableNotOriginallyApplicable()
+    public function testAfterIsApplicableNotOriginallyApplicable()
     {
-        $paymentMethod = $this->getPaymentMethod('any');
-        $quote = $this->getQuote('any');
-        $proceed = $this->getProceedClosure(false, $paymentMethod, $quote);
-        $this->assertFalse($this->callAroundIsApplicable($proceed, $paymentMethod, $quote));
+        $this->setExpectations('any', 'any');
+
+        $this->assertFalse(
+            $this->plugin->afterIsApplicable(
+                $this->specificationMock,
+                false,
+                $this->paymentMethodMock,
+                $this->quoteMock
+            )
+        );
     }
 
-    public function testAroundIsApplicableNotAgreement()
+    public function testAfterIsApplicableNotAgreement()
     {
-        $paymentMethod = $this->getPaymentMethod('not_agreement');
-        $quote = $this->getQuote('any');
-        $proceed = $this->getProceedClosure(true, $paymentMethod, $quote);
-        $this->assertTrue($this->callAroundIsApplicable($proceed, $paymentMethod, $quote));
+        $this->setExpectations('not_agreement', 'any');
+
+        $this->assertTrue(
+            $this->plugin->afterIsApplicable(
+                $this->specificationMock,
+                true,
+                $this->paymentMethodMock,
+                $this->quoteMock
+            )
+        );
     }
 
-    public function testAroundIsApplicableNoCustomerId()
+    public function testAfterIsApplicableNoCustomerId()
     {
-        $paymentMethod = $this->getPaymentMethod('paypal_billing_agreement');
-        $quote = $this->getQuote(null);
-        $proceed = $this->getProceedClosure(true, $paymentMethod, $quote);
-        $this->assertFalse($this->callAroundIsApplicable($proceed, $paymentMethod, $quote));
+        $this->setExpectations('paypal_billing_agreement', null);
+
+        $this->assertFalse(
+            $this->plugin->afterIsApplicable(
+                $this->specificationMock,
+                true,
+                $this->paymentMethodMock,
+                $this->quoteMock
+            )
+        );
     }
 
     /**
      * @param int $count
-     * @dataProvider aroundIsApplicableDataProvider
+     *
+     * @dataProvider afterIsApplicableDataProvider
      */
-    public function testAroundIsApplicable($count)
+    public function testAfterIsApplicable($count)
     {
-        $paymentMethod = $this->getPaymentMethod('paypal_billing_agreement');
-        $quote = $this->getQuote(1);
-        $proceed = $this->getProceedClosure(true, $paymentMethod, $quote);
-        $agreementCollection = $this->getMock(
-            \Magento\Paypal\Model\ResourceModel\Billing\Agreement\Collection::class,
-            [],
-            [],
-            '',
-            false
-        );
-        $agreementCollection->expects($this->once())
-            ->method('count')
-            ->will($this->returnValue($count));
-        $agreement = $this->getMock(\Magento\Paypal\Model\Billing\Agreement::class, [], [], '', false);
-        $agreement->expects($this->once())
+        $this->setExpectations('paypal_billing_agreement', 1);
+
+        $this->billingAgreementFactoryMock->expects(static::once())
+            ->method('create')
+            ->willReturn($this->billingAgreementMock);
+        $this->billingAgreementMock->expects(static::once())
             ->method('getAvailableCustomerBillingAgreements')
             ->with(1)
-            ->will($this->returnValue($agreementCollection));
-        $this->agreementFactory->expects($this->once())
-            ->method('create')
-            ->will($this->returnValue($agreement));
-        $this->assertEquals($count > 0, $this->callAroundIsApplicable($proceed, $paymentMethod, $quote));
-    }
-
-    public function aroundIsApplicableDataProvider()
-    {
-        return [[0], [1], [2]];
-    }
+            ->willReturn($this->billingAgreementCollectionMock);
+        $this->billingAgreementCollectionMock->expects(static::once())
+            ->method('count')
+            ->willReturn($count);
 
-    /**
-     * @param bool $result
-     * @param MethodInterface $paymentMethod
-     * @param Quote $quote
-     * @return \Closure
-     */
-    private function getProceedClosure($result, MethodInterface $paymentMethod, Quote $quote)
-    {
-        $self = $this;
-        return function ($parameter1, $parameter2) use ($result, $paymentMethod, $quote, $self) {
-            $self->assertSame($paymentMethod, $parameter1);
-            $self->assertSame($quote, $parameter2);
-            return $result;
-        };
+        $this->assertEquals(
+            $count > 0,
+            $this->plugin->afterIsApplicable($this->specificationMock, true, $this->paymentMethodMock, $this->quoteMock)
+        );
     }
 
     /**
-     * Get payment method parameter
-     *
-     * @param string $code
-     * @return MethodInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @return array
      */
-    private function getPaymentMethod($code)
+    public function afterIsApplicableDataProvider()
     {
-        $paymentMethod = $this->getMockForAbstractClass(\Magento\Payment\Model\MethodInterface::class);
-        $paymentMethod->expects($this->any())
-            ->method('getCode')
-            ->will($this->returnValue($code));
-        return $paymentMethod;
+        return [[0], [1], [2]];
     }
 
     /**
-     * Get quote parameter
+     * Set expectations
      *
+     * @param mixed $paymentMethodCode
      * @param mixed $customerId
-     * @return Quote|\PHPUnit_Framework_MockObject_MockObject
+     * @return void
      */
-    private function getQuote($customerId)
+    private function setExpectations($paymentMethodCode, $customerId)
     {
-        $quote = $this->getMock(\Magento\Quote\Model\Quote::class, ['__wakeup'], [], '', false);
-        $quote->setCustomerId($customerId);
-        return $quote;
-    }
-
-    /**
-     * Call aroundIsApplicable method
-     *
-     * @param \Closure $proceed
-     * @param MethodInterface $paymentMethod
-     * @param Quote $quote
-     * @return bool
-     */
-    private function callAroundIsApplicable(
-        \Closure $proceed,
-        MethodInterface $paymentMethod,
-        Quote $quote
-    ) {
-        $specification = $this->getMockForAbstractClass(\Magento\Payment\Model\Checks\SpecificationInterface::class);
-        return $this->model->aroundIsApplicable($specification, $proceed, $paymentMethod, $quote);
+        $this->paymentMethodMock->expects(static::any())
+            ->method('getCode')
+            ->willReturn($paymentMethodCode);
+        $this->quoteMock->expects(static::any())
+            ->method('getCustomerId')
+            ->willReturn($customerId);
     }
 }
diff --git a/app/code/Magento/Persistent/Setup/InstallSchema.php b/app/code/Magento/Persistent/Setup/InstallSchema.php
index 940133fcf5dd776b14c5f0622016948ca8df8b08..89e7d88fbd06632db2285a31e71c28d0491eb58c 100644
--- a/app/code/Magento/Persistent/Setup/InstallSchema.php
+++ b/app/code/Magento/Persistent/Setup/InstallSchema.php
@@ -15,6 +15,11 @@ use Magento\Framework\Setup\SchemaSetupInterface;
  */
 class InstallSchema implements InstallSchemaInterface
 {
+    /**
+     * @var string
+     */
+    private static $connectionName = 'checkout';
+
     /**
      * {@inheritdoc}
      */
@@ -97,8 +102,8 @@ class InstallSchema implements InstallSchemaInterface
          * Alter quote table with is_persistent flag
          *
          */
-        $installer->getConnection()->addColumn(
-            $installer->getTable('quote'),
+        $installer->getConnection(self::$connectionName)->addColumn(
+            $installer->getTable('quote', self::$connectionName),
             'is_persistent',
             [
                 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
diff --git a/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml b/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml
index c233b54e12964501b6c7fda3ac6afa97d3be7df7..40cbb7dc64bfb818fde1af263a7acc23cf5c61de 100644
--- a/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml
+++ b/app/code/Magento/Persistent/view/frontend/templates/remember_me.phtml
@@ -13,11 +13,12 @@
  *
  * @var $block \Magento\Persistent\Block\Form\Remember
  */
+
 ?>
 <div id="remember-me-box" class="field choice persistent">
     <?php $rememberMeId = 'remember_me' . $block->getRandomString(10); ?>
-    <input type="checkbox" name="persistent_remember_me" class="checkbox" id="<?php /* @escapeNotVerified */ echo $rememberMeId; ?>"<?php if ($block->isRememberMeChecked()): ?> checked="checked"<?php endif; ?> title="<?php /* @escapeNotVerified */ echo __('Remember Me') ?>" />
-    <label for="<?php /* @escapeNotVerified */ echo $rememberMeId; ?>" class="label"><span><?php /* @escapeNotVerified */ echo __('Remember Me') ?></span></label>
+    <input type="checkbox" name="persistent_remember_me" class="checkbox" id="<?php echo $block->escapeHtmlAttr($rememberMeId); ?>"<?php if ($block->isRememberMeChecked()): ?> checked="checked"<?php endif; ?> title="<?php /* @escapeNotVerified */ echo __('Remember Me') ?>" />
+    <label for="<?php echo $block->escapeHtmlAttr($rememberMeId); ?>" class="label"><span><?php /* @escapeNotVerified */ echo __('Remember Me') ?></span></label>
     <span class="tooltip wrapper">
         <a class="link tooltip toggle" href="#"><?php /* @escapeNotVerified */ echo __('What\'s this?') ?></a>
         <span class="tooltip content">
diff --git a/app/code/Magento/ProductAlert/view/frontend/templates/product/view.phtml b/app/code/Magento/ProductAlert/view/frontend/templates/product/view.phtml
index de9137be0b040bd4fc18b79fa5a7b4480a3a6bac..3847759e19c0c05816b8c8d11e3fe87f1eefa2c1 100644
--- a/app/code/Magento/ProductAlert/view/frontend/templates/product/view.phtml
+++ b/app/code/Magento/ProductAlert/view/frontend/templates/product/view.phtml
@@ -6,7 +6,7 @@
 ?>
 <?php /* @var $block \Magento\ProductAlert\Block\Product\View */?>
 <div class="product alert <?php echo $block->getHtmlClass() ?>">
-    <a href="#" data-post='<?php /* @escapeNotVerified */ echo $block->getPostAction(); ?>'
+    <a href="#" data-post='<?php /* @noEscape */ echo $block->getPostAction(); ?>'
        title="<?php echo $block->escapeHtml(__($block->getSignupLabel())); ?>" class="action alert">
         <?php echo $block->escapeHtml(__($block->getSignupLabel())); ?>
     </a>
diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php
index e6946c6bd3de12b4708c30d796580f437b5166e6..3cdcf70cf24266ae7613e7e6f790c4b6777ff23b 100644
--- a/app/code/Magento/Quote/Model/Quote.php
+++ b/app/code/Magento/Quote/Model/Quote.php
@@ -841,6 +841,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
      * Loading quote data by customer
      *
      * @param \Magento\Customer\Model\Customer|int $customer
+     * @deprecated 
      * @return $this
      */
     public function loadByCustomer($customer)
diff --git a/app/code/Magento/Quote/Model/QuoteRepository.php b/app/code/Magento/Quote/Model/QuoteRepository.php
index 427d3313b1734d4b11802a628c36c7abd5ac07f3..c73b7715d77e95aa470d5425fcd23d5a94786c7d 100644
--- a/app/code/Magento/Quote/Model/QuoteRepository.php
+++ b/app/code/Magento/Quote/Model/QuoteRepository.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Quote\Model;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Api\SortOrder;
 use Magento\Framework\Exception\NoSuchEntityException;
@@ -71,12 +72,16 @@ class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface
      */
     private $loadHandler;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
      * @param QuoteFactory $quoteFactory
      * @param StoreManagerInterface $storeManager
      * @param \Magento\Quote\Model\ResourceModel\Quote\Collection $quoteCollection
      * @param \Magento\Quote\Api\Data\CartSearchResultsInterfaceFactory $searchResultsDataFactory
      * @param JoinProcessorInterface $extensionAttributesJoinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function __construct(
@@ -84,12 +89,14 @@ class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface
         StoreManagerInterface $storeManager,
         \Magento\Quote\Model\ResourceModel\Quote\Collection $quoteCollection,
         \Magento\Quote\Api\Data\CartSearchResultsInterfaceFactory $searchResultsDataFactory,
-        JoinProcessorInterface $extensionAttributesJoinProcessor
+        JoinProcessorInterface $extensionAttributesJoinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->quoteFactory = $quoteFactory;
         $this->storeManager = $storeManager;
         $this->searchResultsDataFactory = $searchResultsDataFactory;
         $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -223,30 +230,14 @@ class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface
         $searchData = $this->searchResultsDataFactory->create();
         $searchData->setSearchCriteria($searchCriteria);
 
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $this->quoteCollection);
-        }
-
-        $searchData->setTotalCount($this->quoteCollection->getSize());
-        $sortOrders = $searchCriteria->getSortOrders();
-        if ($sortOrders) {
-            /** @var SortOrder $sortOrder */
-            foreach ($sortOrders as $sortOrder) {
-                $this->quoteCollection->addOrder(
-                    $sortOrder->getField(),
-                    $sortOrder->getDirection() == SortOrder::SORT_ASC ? 'ASC' : 'DESC'
-                );
-            }
-        }
-        $this->quoteCollection->setCurPage($searchCriteria->getCurrentPage());
-        $this->quoteCollection->setPageSize($searchCriteria->getPageSize());
+        $this->collectionProcessor->process($searchCriteria, $this->quoteCollection);
         $this->extensionAttributesJoinProcessor->process($this->quoteCollection);
         foreach ($this->quoteCollection->getItems() as $quote) {
             /** @var CartInterface $quote */
             $this->getLoadHandler()->load($quote);
         }
         $searchData->setItems($this->quoteCollection->getItems());
-
+        $searchData->setTotalCount($this->quoteCollection->getSize());
         return $searchData;
     }
 
@@ -256,6 +247,7 @@ class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface
      * @param FilterGroup $filterGroup The filter group.
      * @param QuoteCollection $collection The quote collection.
      * @return void
+     * @deprecated
      * @throws InputException The specified filter group or quote collection does not exist.
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, QuoteCollection $collection)
@@ -296,4 +288,20 @@ class QuoteRepository implements \Magento\Quote\Api\CartRepositoryInterface
         }
         return $this->loadHandler;
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessor::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Quote/Setup/QuoteSetup.php b/app/code/Magento/Quote/Setup/QuoteSetup.php
index 2608580cf8fa321714c05536d0f5ba2e286085f5..1ef5f4b0dae2ee91a9580ae9097f6d129ce8f24e 100644
--- a/app/code/Magento/Quote/Setup/QuoteSetup.php
+++ b/app/code/Magento/Quote/Setup/QuoteSetup.php
@@ -29,6 +29,11 @@ class QuoteSetup extends EavSetup
      */
     protected $_encryptor;
 
+    /**
+     * @var string
+     */
+    private static $connectionName = 'checkout';
+
     /**
      * @param ModuleDataSetupInterface $setup
      * @param Context $context
@@ -70,8 +75,11 @@ class QuoteSetup extends EavSetup
      */
     protected function _flatTableExist($table)
     {
-        $tablesList = $this->getSetup()->getConnection()->listTables();
-        return in_array(strtoupper($this->getSetup()->getTable($table)), array_map('strtoupper', $tablesList));
+        $tablesList = $this->getSetup()->getConnection(self::$connectionName)->listTables();
+        return in_array(
+            strtoupper($this->getSetup()->getTable($table, self::$connectionName)),
+            array_map('strtoupper', $tablesList)
+        );
     }
 
     /**
@@ -107,13 +115,15 @@ class QuoteSetup extends EavSetup
      */
     protected function _addFlatAttribute($table, $attribute, $attr)
     {
-        $tableInfo = $this->getSetup()->getConnection()->describeTable($this->getSetup()->getTable($table));
+        $tableInfo = $this->getSetup()
+            ->getConnection(self::$connectionName)
+            ->describeTable($this->getSetup()->getTable($table, self::$connectionName));
         if (isset($tableInfo[$attribute])) {
             return $this;
         }
         $columnDefinition = $this->_getAttributeColumnDefinition($attribute, $attr);
-        $this->getSetup()->getConnection()->addColumn(
-            $this->getSetup()->getTable($table),
+        $this->getSetup()->getConnection(self::$connectionName)->addColumn(
+            $this->getSetup()->getTable($table, self::$connectionName),
             $attribute,
             $columnDefinition
         );
diff --git a/app/code/Magento/Quote/Setup/UpgradeSchema.php b/app/code/Magento/Quote/Setup/UpgradeSchema.php
index d2163035bdcbf8ecf98bd048265c09bcbbda97b6..0ea04377eaa39ecf100c28f3d04eaf955a474b6f 100644
--- a/app/code/Magento/Quote/Setup/UpgradeSchema.php
+++ b/app/code/Magento/Quote/Setup/UpgradeSchema.php
@@ -14,6 +14,11 @@ use Magento\Framework\Setup\SchemaSetupInterface;
  */
 class UpgradeSchema implements UpgradeSchemaInterface
 {
+    /**
+     * @var string
+     */
+    private static $connectionName = 'checkout';
+
     /**
      * {@inheritdoc}
      */
@@ -22,16 +27,16 @@ class UpgradeSchema implements UpgradeSchemaInterface
         $setup->startSetup();
 
         if (version_compare($context->getVersion(), '2.0.1', '<')) {
-            $setup->getConnection()->addIndex(
-                $setup->getTable('quote_id_mask'),
-                $setup->getIdxName('quote_id_mask', ['masked_id']),
+            $setup->getConnection(self::$connectionName)->addIndex(
+                $setup->getTable('quote_id_mask', self::$connectionName),
+                $setup->getIdxName('quote_id_mask', ['masked_id'], '', self::$connectionName),
                 ['masked_id']
             );
         }
 
         if (version_compare($context->getVersion(), '2.0.2', '<')) {
-            $setup->getConnection()->changeColumn(
-                $setup->getTable('quote_address'),
+            $setup->getConnection(self::$connectionName)->changeColumn(
+                $setup->getTable('quote_address', self::$connectionName),
                 'street',
                 'street',
                 [
diff --git a/app/code/Magento/Quote/Test/Unit/Model/QuoteRepositoryTest.php b/app/code/Magento/Quote/Test/Unit/Model/QuoteRepositoryTest.php
index 462ce8381fd96f28253f0b21efb52243138ef91d..3bd838d9d4b75f0c8d0fe1ab7188883283e61b72 100644
--- a/app/code/Magento/Quote/Test/Unit/Model/QuoteRepositoryTest.php
+++ b/app/code/Magento/Quote/Test/Unit/Model/QuoteRepositoryTest.php
@@ -9,7 +9,9 @@ namespace Magento\Quote\Test\Unit\Model;
 
 use Magento\Framework\Api\SortOrder;
 use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface;
+use Magento\Quote\Api\Data\CartInterface;
 use Magento\Quote\Model\QuoteRepository\LoadHandler;
+use Magento\Quote\Model\ResourceModel\Quote\CollectionFactory;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -61,10 +63,21 @@ class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     private $loadHandlerMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
+    /** @var \PHPUnit_Framework_MockObject_MockObject  */
+    private $objectManagerMock;
+
     protected function setUp()
     {
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
 
+        $this->objectManagerMock = $this->getMock(\Magento\Framework\ObjectManagerInterface::class);
+        \Magento\Framework\App\ObjectManager::setInstance($this->objectManagerMock);
+
         $this->quoteFactoryMock = $this->getMock(\Magento\Quote\Model\QuoteFactory::class, ['create'], [], '', false);
         $this->storeManagerMock = $this->getMock(\Magento\Store\Model\StoreManagerInterface::class);
         $this->quoteMock = $this->getMock(
@@ -103,7 +116,13 @@ class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->model = $objectManager->getObject(
             \Magento\Quote\Model\QuoteRepository::class,
             [
@@ -111,7 +130,8 @@ class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase
                 'storeManager' => $this->storeManagerMock,
                 'searchResultsDataFactory' => $this->searchResultsDataFactory,
                 'quoteCollection' => $this->quoteCollectionMock,
-                'extensionAttributesJoinProcessor' => $this->extensionAttributesJoinProcessorMock
+                'extensionAttributesJoinProcessor' => $this->extensionAttributesJoinProcessorMock,
+                'collectionProcessor' => $this->collectionProcessor
             ]
         );
 
@@ -399,88 +419,53 @@ class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->model->delete($this->quoteMock);
     }
 
-    /**
-     * @param int $direction
-     * @param string $expectedDirection
-     * @dataProvider getListSuccessDataProvider
-     */
-    public function testGetListSuccess($direction, $expectedDirection)
+    public function testGetList()
     {
-        $this->markTestSkipped('MAGETWO-48531');
-        $searchResult = $this->getMock(\Magento\Quote\Api\Data\CartSearchResultsInterface::class, [], [], '', false);
-        $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteria::class, [], [], '', false);
-        $cartMock = $this->getMock(\Magento\Payment\Model\Cart::class, [], [], '', false);
-        $filterMock = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
         $pageSize = 10;
-
-        $this->searchResultsDataFactory
-            ->expects($this->once())
-            ->method('create')
-            ->will($this->returnValue($searchResult));
-
-        $searchResult
-            ->expects($this->once())
-            ->method('setSearchCriteria');
-
-        $filterGroupMock = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $searchCriteriaMock
-            ->expects($this->any())
-            ->method('getFilterGroups')
-            ->will($this->returnValue([$filterGroupMock]));
-
-        //addFilterGroupToCollection() checks
-        $filterGroupMock->expects($this->any())->method('getFilters')->will($this->returnValue([$filterMock]));
-        $filterMock->expects($this->once())->method('getField')->will($this->returnValue('store_id'));
-        $filterMock->expects($this->any())->method('getConditionType')->will($this->returnValue('eq'));
-        $filterMock->expects($this->once())->method('getValue')->will($this->returnValue('filter_value'));
-
-        //back in getList()
-        $this->quoteCollectionMock->expects($this->once())->method('getSize')->willReturn($pageSize);
-        $searchResult->expects($this->once())->method('setTotalCount')->with($pageSize);
-        $sortOrderMock = $this->getMockBuilder(\Magento\Framework\Api\SortOrder::class)
-            ->setMethods(['getField', 'getDirection'])
+        $collectionFactoryMock = $this->getMockBuilder(CollectionFactory::class)
+            ->setMethods(['create'])
             ->disableOriginalConstructor()
             ->getMock();
+        $collectionFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($this->quoteCollectionMock);
+        $cartMock = $this->getMock(CartInterface::class, [], [], '', false);
+        $this->loadHandlerMock->expects($this->once())
+            ->method('load')
+            ->with($cartMock);
+        $this->objectManagerMock->expects($this->atLeastOnce())
+            ->method('get')
+            ->willReturnOnConsecutiveCalls($collectionFactoryMock);
 
-        //foreach cycle
-        $searchCriteriaMock
+        $searchResult = $this->getMock(\Magento\Quote\Api\Data\CartSearchResultsInterface::class, [], [], '', false);
+        $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteria::class, [], [], '', false);
+        $this->searchResultsDataFactory
             ->expects($this->once())
-            ->method('getSortOrders')
-            ->will($this->returnValue([$sortOrderMock]));
-        $sortOrderMock->expects($this->once())->method('getField')->will($this->returnValue('id'));
-        $sortOrderMock->expects($this->once())->method('getDirection')->will($this->returnValue($direction));
-        $this->quoteCollectionMock->expects($this->once())->method('addOrder')->with('id', $expectedDirection);
+            ->method('create')
+            ->willReturn($searchResult);
 
-        $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->will($this->returnValue(1));
-        $searchCriteriaMock->expects($this->once())->method('getPageSize')->will($this->returnValue(10));
-        $this->quoteCollectionMock->expects($this->once())->method('setCurPage')->with(1);
-        $this->quoteCollectionMock->expects($this->once())->method('setPageSize')->with(10);
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $this->quoteCollectionMock);
 
         $this->extensionAttributesJoinProcessorMock->expects($this->once())
             ->method('process')
             ->with(
                 $this->isInstanceOf(\Magento\Quote\Model\ResourceModel\Quote\Collection::class)
             );
-
-        $this->quoteCollectionMock->expects($this->once())->method('getItems')->willReturn([$cartMock]);
-        $searchResult->expects($this->once())->method('setItems')->with([$cartMock]);
-
-        $this->model = $this->getMock(
-            \Magento\Quote\Model\QuoteRepository::class,
-            ['getQuoteCollection'],
-            [
-                'quoteFactory' => $this->quoteFactoryMock,
-                'storeManager' => $this->storeManagerMock,
-                'quoteCollection' => $this->quoteCollectionMock,
-                'searchResultsDataFactory' => $this->searchResultsDataFactory,
-                'extensionAttributesJoinProcessor' => $this->extensionAttributesJoinProcessorMock
-            ]
-        );
-        $this->model->expects($this->once())->method('getQuoteCollection')->willReturn($this->quoteCollectionMock);
+        $this->quoteCollectionMock->expects($this->atLeastOnce())->method('getItems')->willReturn([$cartMock]);
+        $searchResult->expects($this->once())->method('setTotalCount')->with($pageSize);
+        $this->quoteCollectionMock->expects($this->once())
+            ->method('getSize')
+            ->willReturn($pageSize);
+        $searchResult->expects($this->once())
+            ->method('setItems')
+            ->with([$cartMock]);
         $this->assertEquals($searchResult, $this->model->getList($searchCriteriaMock));
     }
 
     /**
+     * @deprecated
      * @return array
      */
     public function getListSuccessDataProvider()
diff --git a/app/code/Magento/Review/Block/Customer/ListCustomer.php b/app/code/Magento/Review/Block/Customer/ListCustomer.php
index 4ab75e2c99e0ee827b901e084fff6398ed228c5b..d596f1d46dbd442e37f006d8fad09de5c702339a 100644
--- a/app/code/Magento/Review/Block/Customer/ListCustomer.php
+++ b/app/code/Magento/Review/Block/Customer/ListCustomer.php
@@ -118,22 +118,46 @@ class ListCustomer extends \Magento\Customer\Block\Account\Dashboard
      * Get review link
      *
      * @return string
+     * @deprecated
      */
     public function getReviewLink()
     {
         return $this->getUrl('review/customer/view/');
     }
 
+    /**
+     * Get review URL
+     *
+     * @param \Magento\Review\Model\Review $review
+     * @return string
+     */
+    public function getReviewUrl($review)
+    {
+        return $this->getUrl('review/customer/view', ['id' => $review->getReviewId()]);
+    }
+
     /**
      * Get product link
      *
      * @return string
+     * @deprecated
      */
     public function getProductLink()
     {
         return $this->getUrl('catalog/product/view/');
     }
 
+    /**
+     * Get product URL
+     *
+     * @param \Magento\Review\Model\Review $review
+     * @return string
+     */
+    public function getProductUrl($review)
+    {
+        return $this->getUrl('catalog/product/view', ['id' => $review->getEntityPkValue()]);
+    }
+
     /**
      * Format date in short format
      *
diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml
index cd095874006e77225efa0cd919e6d362b090a204..89073febf02b62300c31f0880138a35826ee7682 100644
--- a/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml
+++ b/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml
@@ -6,6 +6,8 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Review\Block\Adminhtml\Rating\Detailed $block */
+
 ?>
 <?php if ($block->getRating() && $block->getRating()->getSize()): ?>
     <?php foreach ($block->getRating() as $_rating): ?>
@@ -15,8 +17,8 @@
         <?php $_options = ($_rating->getRatingOptions()) ? $_rating->getRatingOptions() : $_rating->getOptions() ?>
         <div class="admin__field-control" data-widget="ratingControl">
         <?php foreach (array_reverse($_options) as $_option): ?>
-            <input type="radio" name="ratings[<?php /* @escapeNotVerified */ echo($_rating->getVoteId()) ? $_rating->getVoteId() : $_rating->getId() ?>]" id="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>" value="<?php /* @escapeNotVerified */ echo $_option->getId() ?>" <?php if ($block->isSelected($_option, $_rating)): ?>checked="checked"<?php endif; ?> />
-            <label for="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>">&#9733;</label>
+            <input type="radio" name="ratings[<?php echo $block->escapeHtmlAttr($_rating->getVoteId() ? $_rating->getVoteId() : $_rating->getId()) ?>]" id="<?php echo $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?php echo $block->escapeHtmlAttr($_option->getValue()) ?>" value="<?php echo $block->escapeHtmlAttr($_option->getId()) ?>" <?php if ($block->isSelected($_option, $_rating)): ?>checked="checked"<?php endif; ?> />
+            <label for="<?php echo $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?php echo $block->escapeHtmlAttr($_option->getValue()) ?>">&#9733;</label>
         <?php $_iterator++ ?>
         <?php endforeach; ?>
         </div>
diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml
index 19885077f1efa4fb4c3fd548d119b0917ede303e..8fe776fb345fb2246040a44faf8f9980884bd373 100644
--- a/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml
+++ b/app/code/Magento/Review/view/adminhtml/templates/rating/options.phtml
@@ -5,24 +5,23 @@
  */
 
 // @codingStandardsIgnoreFile
-
 ?>
 <div class="entry-edit-head">
     <h4 class="icon-head head-edit-form fieldset-legend"><?php /* @escapeNotVerified */ echo __('Assigned Options') ?></h4>
 </div>
 <fieldset id="options_form">
 <?php if (!$options): ?>
-    <?php for ($_i = 1;$_i <= 5;$_i++): ?>
+    <?php for ($_i = 1; $_i <= 5; $_i++): ?>
         <span class="field-row">
-            <label for="option_<?php /* @escapeNotVerified */ echo $_i ?>"><?php /* @escapeNotVerified */ echo __('Option Title:') ?></label>
-            <input id="option_<?php /* @escapeNotVerified */ echo $_i ?>" name="option[<?php /* @escapeNotVerified */ echo $_i ?>][code]" value="<?php /* @escapeNotVerified */ echo $_i ?>" class="input-text" type="text" />
+            <label for="option_<?php /* @noEscape */ echo $_i ?>"><?php /* @escapeNotVerified */ echo __('Option Title:') ?></label>
+            <input id="option_<?php /* @noEscape */ echo $_i ?>" name="option[<?php /* @noEscape */ echo $_i ?>][code]" value="<?php /* @noEscape */ echo $_i ?>" class="input-text" type="text" />
         </span>
     <?php endfor; ?>
 <?php elseif ($options->getSize() > 0): ?>
     <?php foreach ($options->getItems() as $_item): ?>
         <span class="field-row">
-            <label for="option_<?php /* @escapeNotVerified */ echo $_item->getId() ?>"><?php /* @escapeNotVerified */ echo __('Option Title:') ?></label>
-            <input id="option_<?php /* @escapeNotVerified */ echo $_item->getId() ?>" name="option[<?php /* @escapeNotVerified */ echo $_item->getId() ?>][code]" value="<?php /* @escapeNotVerified */ echo $_item->getCode() ?>" class="input-text" type="text" />
+            <label for="option_<?php echo $block->escapeHtmlAttr($_item->getId()) ?>"><?php /* @escapeNotVerified */ echo __('Option Title:') ?></label>
+            <input id="option_<?php echo $block->escapeHtmlAttr($_item->getId()) ?>" name="option[<?php echo $block->escapeHtmlAttr($_item->getId()) ?>][code]" value="<?php echo $block->escapeHtmlAttr($_item->getCode()) ?>" class="input-text" type="text" />
         </span>
     <?php endforeach; ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml
index fab5a826616f1d9212a8075c9605adf900ae46ce..86ae33dae3e6ae649e6e3fcd3b1cbe156e100f83 100644
--- a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml
+++ b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/detailed.phtml
@@ -5,7 +5,6 @@
  */
 
 // @codingStandardsIgnoreFile
-
 ?>
 <?php if ($block->getRating() && $block->getRating()->getSize()): ?>
     <div class="ratings-container">
@@ -14,7 +13,7 @@
             <div class="ratings">
                <?php echo $block->escapeHtml($_rating->getRatingCode()) ?>
                 <div class="rating-box">
-                    <div class="rating" style="width:<?php /* @escapeNotVerified */ echo ceil($_rating->getPercent()) ?>%;"></div>
+                    <div class="rating" style="width:<?php /* @noEscape */ echo ceil($_rating->getPercent()) ?>%;"></div>
                 </div>
             </div>
         <?php endif; ?>
diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml
index 83ec4feafff737d2f0c22e124cbf857b5929e077..1badd86990758e4d59f1a5311ecc55b2cc5fcc01 100644
--- a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml
+++ b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml
@@ -6,10 +6,11 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Review\Block\Adminhtml\Rating\Summary $block */
 ?>
 <?php if ($block->getRatingSummary()->getCount()): ?>
     <div class="rating-box">
-        <div class="rating" style="width:<?php /* @escapeNotVerified */ echo ceil($block->getRatingSummary()->getSum() / ($block->getRatingSummary()->getCount())) ?>%;"></div>
+        <div class="rating" style="width:<?php /* @noEscape */ echo ceil($block->getRatingSummary()->getSum() / ($block->getRatingSummary()->getCount())) ?>%;"></div>
     </div>
 <?php else: ?>
     <?php /* @escapeNotVerified */ echo __("Rating isn't Available") ?>
diff --git a/app/code/Magento/Review/view/adminhtml/templates/rss/grid/link.phtml b/app/code/Magento/Review/view/adminhtml/templates/rss/grid/link.phtml
index 457b1e73f94572a6ff734f1fd437cd80c5542772..763d8e8ed29fb9d144a0a8ee45999efe21106045 100644
--- a/app/code/Magento/Review/view/adminhtml/templates/rss/grid/link.phtml
+++ b/app/code/Magento/Review/view/adminhtml/templates/rss/grid/link.phtml
@@ -9,5 +9,5 @@
 /** @var $block \Magento\Review\Block\Adminhtml\Grid\Rss\Link */
 ?>
 <?php if ($block->isRssAllowed() && $block->getLink()): ?>
-<a href="<?php /* @escapeNotVerified */ echo $block->getLink() ?>" class="link-feed"><?php /* @escapeNotVerified */ echo $block->getLabel() ?></a>
+<a href="<?php echo $block->escapeUrl($block->getLink()) ?>" class="link-feed"><?php echo $block->escapeHtml($block->getLabel()) ?></a>
 <?php endif; ?>
diff --git a/app/code/Magento/Review/view/frontend/templates/customer/list.phtml b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml
index 24ab3a2b9054702afa979d89454fabe7f9f63104..578f8d19c22b5fe48879d6c3854c1d0c5a2d5ab8 100644
--- a/app/code/Magento/Review/view/frontend/templates/customer/list.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml
@@ -5,6 +5,7 @@
  */
 
 // @codingStandardsIgnoreFile
+
 /** @var \Magento\Review\Block\Customer\ListCustomer $block */
 ?>
 <?php if ($block->getReviews() && count($block->getReviews())): ?>
@@ -23,10 +24,10 @@
             <tbody>
                 <?php foreach ($block->getReviews() as $_review): ?>
                 <tr>
-                    <td data-th="<?php echo $block->escapeHtml(__('Created')) ?>" class="col date"><?php /* @escapeNotVerified */ echo $block->dateFormat($_review->getReviewCreatedAt()); ?></td>
+                    <td data-th="<?php echo $block->escapeHtml(__('Created')) ?>" class="col date"><?php echo $block->escapeHtml($block->dateFormat($_review->getReviewCreatedAt())); ?></td>
                     <td data-th="<?php echo $block->escapeHtml(__('Product Name')) ?>" class="col item">
                         <strong class="product-name">
-                            <a href="<?php /* @escapeNotVerified */ echo $block->getProductLink() ?>id/<?php /* @escapeNotVerified */ echo $_review->getEntityPkValue() ?>"><?php echo $block->escapeHtml($_review->getName()) ?></a>
+                            <a href="<?php echo $block->escapeUrl($block->getProductUrl($_review)) ?>"><?php echo $block->escapeHtml($_review->getName()) ?></a>
                         </strong>
                     </td>
                     <td data-th="<?php echo $block->escapeHtml(__('Rating')) ?>" class="col summary">
@@ -43,7 +44,7 @@
                         <?php echo $this->helper('Magento\Review\Helper\Data')->getDetailHtml($_review->getDetail()) ?>
                     </td>
                     <td data-th="<?php echo $block->escapeHtml(__('Actions')) ?>" class="col actions">
-                        <a href="<?php /* @escapeNotVerified */ echo $block->getReviewLink() ?>id/<?php /* @escapeNotVerified */ echo $_review->getReviewId() ?>" class="action more">
+                        <a href="<?php echo $block->escapeUrl($block->getReviewUrl($_review)) ?>" class="action more">
                             <span><?php /* @escapeNotVerified */ echo __('See Details') ?></span>
                         </a>
                     </td>
diff --git a/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml
index 143ad3ac0cee38b41e7b5dd6b1bd01e6ee5950eb..b232b832b86acb1002ef4f7dd4cf7f64c3627852 100644
--- a/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml
@@ -6,29 +6,25 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Review\Block\Customer\Recent $block */
 ?>
-
-<?php
-/** @var $block \Magento\Review\Block\Customer\Recent */
-?>
-
 <?php if ($block->getReviews() && count($block->getReviews())): ?>
 <div class="block block-reviews-dashboard">
     <div class="block-title">
         <strong><?php /* @escapeNotVerified */ echo __('My Recent Reviews') ?></strong>
-        <a class="action view" href="<?php /* @escapeNotVerified */ echo $block->getAllReviewsUrl() ?>"><span><?php /* @escapeNotVerified */ echo __('View All') ?></span></a>
+        <a class="action view" href="<?php echo $block->escapeUrl($block->getAllReviewsUrl()) ?>"><span><?php /* @escapeNotVerified */ echo __('View All') ?></span></a>
     </div>
     <div class="block-content">
         <ol class="items">
         <?php foreach ($block->getReviews() as $_review): ?>
             <li class="item">
-                <strong class="product-name"><a href="<?php /* @escapeNotVerified */ echo $block->getReviewUrl($_review->getReviewId()) ?>"><?php echo $block->escapeHtml($_review->getName()) ?></a></strong>
+                <strong class="product-name"><a href="<?php echo $block->escapeUrl($block->getReviewUrl($_review->getReviewId())) ?>"><?php echo $block->escapeHtml($_review->getName()) ?></a></strong>
                 <?php if ($_review->getSum()): ?>
                 <?php $rating = $_review->getSum() / $_review->getCount() ?>
                     <div class="rating-summary">
                          <span class="label"><span><?php /* @escapeNotVerified */ echo __('Rating') ?>:</span></span>
-                         <div class="rating-result" title="<?php /* @escapeNotVerified */ echo $rating; ?>%">
-                             <span style="width:<?php /* @escapeNotVerified */ echo $rating; ?>%"><span><?php /* @escapeNotVerified */ echo $rating; ?>%</span></span>
+                         <div class="rating-result" title="<?php echo $block->escapeHtmlAttr($rating); ?>%">
+                             <span style="width:<?php echo $block->escapeHtmlAttr($rating); ?>%"><span><?php echo $block->escapeHtml($rating); ?>%</span></span>
                          </div>
                      </div>
                 <?php endif; ?>
diff --git a/app/code/Magento/Review/view/frontend/templates/customer/view.phtml b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml
index 1e031d02b497a915ae48e45dce60ea1852327bb9..9937fce922f54f0faa9b87a8206bd9e48cbf35b1 100644
--- a/app/code/Magento/Review/view/frontend/templates/customer/view.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml
@@ -6,15 +6,15 @@
 
 // @codingStandardsIgnoreFile
 
-?>
-<?php
+/** @var \Magento\Review\Block\Customer\View $block */
+
 $product = $block->getProductData();
 ?>
 <?php if ($product->getId()): ?>
 <div class="customer-review view">
     <div class="product-details">
         <div class="product-media">
-            <a class="product-photo" href="<?php /* @escapeNotVerified */ echo $product->getProductUrl() ?>">
+            <a class="product-photo" href="<?php echo $block->escapeUrl($product->getProductUrl()) ?>">
                 <?php /* customer_account_product_review_page */ ?>
                 <?php echo $block->getImage($block->getProductData(), 'customer_account_product_review_page')->toHtml() ?>
             </a>
@@ -39,9 +39,9 @@ $product = $block->getProductData();
                     <?php $rating = ceil($_rating->getPercent()) ?>
                     <div class="rating-summary item">
                         <span class="rating-label"><span><?php echo $block->escapeHtml($_rating->getRatingCode()) ?></span></span>
-                        <div class="rating-result" title="<?php /* @escapeNotVerified */ echo $rating; ?>%">
-                            <span style="width:<?php /* @escapeNotVerified */ echo $rating; ?>%">
-                                <span><?php /* @escapeNotVerified */ echo $rating; ?>%</span>
+                        <div class="rating-result" title="<?php /* @noEscape */ echo $rating; ?>%">
+                            <span style="width:<?php /* @noEscape */ echo $rating; ?>%">
+                                <span><?php /* @noEscape */ echo $rating; ?>%</span>
                             </span>
                         </div>
                     </div>
@@ -59,7 +59,7 @@ $product = $block->getProductData();
 </div>
 <div class="actions-toolbar">
     <div class="secondary">
-        <a class="action back" href="<?php /* @escapeNotVerified */ echo $block->getBackUrl() ?>"><span><?php /* @escapeNotVerified */ echo __('Back to My Reviews') ?></span></a>
+        <a class="action back" href="<?php echo $block->escapeUrl($block->getBackUrl()) ?>"><span><?php /* @escapeNotVerified */ echo __('Back to My Reviews') ?></span></a>
     </div>
 </div>
 <?php endif; ?>
diff --git a/app/code/Magento/Review/view/frontend/templates/detailed.phtml b/app/code/Magento/Review/view/frontend/templates/detailed.phtml
index adc9a0d2b4b9eb68495c9f33e3cb6d024e348c42..72bd4fcaca377ea4dbf702f9fa31324fd18e72ec 100644
--- a/app/code/Magento/Review/view/frontend/templates/detailed.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/detailed.phtml
@@ -6,6 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Review\Block\Rating\Entity\Detailed $block */
 ?>
 <?php if (!empty($collection) && $collection->getSize()): ?>
     <div class="table-wrapper">
@@ -18,7 +19,7 @@
                         <th class="label" scope="row"><?php echo __($block->escapeHtml($_rating->getRatingCode())) ?></th>
                         <td class="value">
                             <div class="rating box">
-                                <div class="rating" style="width:<?php /* @escapeNotVerified */ echo ceil($_rating->getSummary()) ?>%;"></div>
+                                <div class="rating" style="width:<?php /* @noEscape */ echo ceil($_rating->getSummary()) ?>%;"></div>
                             </div>
                         </td>
                     </tr>
diff --git a/app/code/Magento/Review/view/frontend/templates/form.phtml b/app/code/Magento/Review/view/frontend/templates/form.phtml
index b912cf0173f6299ef40750f266c90fe7ffc7d101..611416586ddf8b37672b9417700bc7efcf1b8282 100644
--- a/app/code/Magento/Review/view/frontend/templates/form.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/form.phtml
@@ -6,18 +6,16 @@
 
 // @codingStandardsIgnoreFile
 
-/**
- * @var $block \Magento\Review\Block\Form
- */
+/** @var \Magento\Review\Block\Form $block */
 ?>
 <div class="block review-add">
     <div class="block-title"><strong><?php /* @escapeNotVerified */ echo __('Write Your Own Review') ?></strong></div>
 <div class="block-content">
 <?php if ($block->getAllowWriteReviewFlag()): ?>
-<form action="<?php /* @escapeNotVerified */ echo $block->getAction() ?>" class="review-form" method="post" id="review-form" data-role="product-review-form" data-bind="scope: 'review-form'">
+<form action="<?php echo $block->escapeUrl($block->getAction()) ?>" class="review-form" method="post" id="review-form" data-role="product-review-form" data-bind="scope: 'review-form'">
     <?php echo $block->getBlockHtml('formkey'); ?>
     <?php echo $block->getChildHtml('form_fields_before')?>
-    <fieldset class="fieldset review-fieldset" data-hasrequired="<?php __('* Required Fields'); ?>">
+    <fieldset class="fieldset review-fieldset" data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields'); ?>">
         <legend class="legend review-legend"><span><?php /* @escapeNotVerified */ echo __("You're reviewing:"); ?></span><strong><?php echo $block->escapeHtml($block->getProductInfo()->getName()) ?></strong></legend><br />
         <?php if ($block->getRatings() && $block->getRatings()->getSize()): ?>
         <span id="input-message-box"></span>
@@ -33,17 +31,17 @@
                             <?php $iterator = 1; foreach ($options as $_option): ?>
                                 <input
                                     type="radio"
-                                    name="ratings[<?php /* @escapeNotVerified */ echo $_rating->getId() ?>]"
-                                    id="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>"
-                                    value="<?php /* @escapeNotVerified */ echo $_option->getId() ?>"
+                                    name="ratings[<?php echo $block->escapeHtmlAttr($_rating->getId()) ?>]"
+                                    id="<?php echo $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?php echo $block->escapeHtmlAttr($_option->getValue()) ?>"
+                                    value="<?php echo $block->escapeHtmlAttr($_option->getId()) ?>"
                                     class="radio"
                                     data-validate="{required:true, messages:{required:'Please select one of each of the ratings above.'}}"
-                                    aria-labelledby="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_rating_label <?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>_label" />
+                                    aria-labelledby="<?php echo $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_rating_label <?php echo $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?php echo $block->escapeHtmlAttr($_option->getValue()) ?>_label" />
                                 <label
-                                    class="rating-<?php /* @escapeNotVerified */ echo $iterator; ?>"
-                                    for="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>"
+                                    class="rating-<?php echo $block->escapeHtmlAttr($iterator); ?>"
+                                    for="<?php echo $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?php echo $block->escapeHtmlAttr($_option->getValue()) ?>"
                                     title="<?php /* @escapeNotVerified */ echo __('%1 %2', $iterator, $iterator > 1 ? 'stars' : 'star') ?>"
-                                    id="<?php echo $block->escapeHtml($_rating->getRatingCode()) ?>_<?php /* @escapeNotVerified */ echo $_option->getValue() ?>_label">
+                                    id="<?php echo $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?php echo $block->escapeHtmlAttr($_option->getValue()) ?>_label">
                                     <span><?php /* @escapeNotVerified */ echo __('%1 %2', $iterator, $iterator > 1 ? 'stars' : 'star') ?></span>
                                 </label>
                             <?php $iterator++; ?>
@@ -84,7 +82,7 @@
 <script type="text/x-magento-init">
 {
     "[data-role=product-review-form]": {
-        "Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?>
+        "Magento_Ui/js/core/app": <?php /* @noEscape */ echo $block->getJsLayout(); ?>
     },
     "#review-form": {
         "Magento_Review/js/error-placement": {}
diff --git a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml
index 6aceecfe69278eae3d106e81a3ef781c6531c831..cc5d8a0b6aed9969b36753800259bc83674423d9 100644
--- a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml
@@ -6,29 +6,31 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Review\Block\Product\ReviewRenderer $block */
+
+$url = $block->getReviewsUrl() . '#reviews';
+$urlForm = $block->getReviewsUrl() . '#review-form';
 ?>
-<?php $url = $block->getReviewsUrl() . '#reviews'; ?>
-<?php $urlForm = $block->getReviewsUrl() . '#review-form'; ?>
 <?php if ($block->getReviewsCount()): ?>
 <?php $rating = $block->getRatingSummary(); ?>
 <div class="product-reviews-summary<?php echo !$rating ? ' no-rating' : ''?>" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
     <?php if ($rating):?>
     <div class="rating-summary">
          <span class="label"><span><?php /* @escapeNotVerified */ echo __('Rating') ?>:</span></span>
-         <div class="rating-result" title="<?php /* @escapeNotVerified */ echo $rating; ?>%">
-             <span style="width:<?php /* @escapeNotVerified */ echo $rating; ?>%"><span><span itemprop="ratingValue"><?php /* @escapeNotVerified */ echo $rating; ?></span>% of <span itemprop="bestRating">100</span></span></span>
+         <div class="rating-result" title="<?php echo $block->escapeHtmlAttr($rating); ?>%">
+             <span style="width:<?php echo $block->escapeHtmlAttr($rating); ?>%"><span><span itemprop="ratingValue"><?php echo $block->escapeHtml($rating); ?></span>% of <span itemprop="bestRating">100</span></span></span>
          </div>
      </div>
     <?php endif;?>
     <div class="reviews-actions">
-        <a class="action view" href="<?php /* @escapeNotVerified */ echo $url ?>"><span itemprop="reviewCount"><?php /* @escapeNotVerified */ echo $block->getReviewsCount() ?></span>&nbsp;<span><?php /* @escapeNotVerified */ echo($block->getReviewsCount() == 1) ? __('Review') : __('Reviews') ?></span></a>
-        <a class="action add" href="<?php /* @escapeNotVerified */ echo $urlForm ?>"><?php /* @escapeNotVerified */ echo __('Add Your Review') ?></a>
+        <a class="action view" href="<?php echo $block->escapeUrl($url) ?>"><span itemprop="reviewCount"><?php echo $block->escapeHtml($block->getReviewsCount()) ?></span>&nbsp;<span><?php /* @escapeNotVerified */ echo($block->getReviewsCount() == 1) ? __('Review') : __('Reviews') ?></span></a>
+        <a class="action add" href="<?php echo $block->escapeUrl($urlForm) ?>"><?php /* @escapeNotVerified */ echo __('Add Your Review') ?></a>
     </div>
 </div>
 <?php elseif ($block->getDisplayIfEmpty()): ?>
 <div class="product-reviews-summary empty">
     <div class="reviews-actions">
-        <a class="action add" href="<?php /* @escapeNotVerified */ echo $urlForm; ?>">
+        <a class="action add" href="<?php echo $block->escapeUrl($urlForm); ?>">
             <?php /* @escapeNotVerified */ echo __('Be the first to review this product') ?>
         </a>
     </div>
diff --git a/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml
index 45f5515dd5a8660d823c60f3580618d83715a8ca..14650e7b0e0d14057113a32ed1f2b9bd41453698 100644
--- a/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml
@@ -6,28 +6,30 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Review\Block\Product\ReviewRenderer $block */
+
+$url = $block->getReviewsUrl() . '#reviews';
+$urlForm = $block->getReviewsUrl() . '#review-form';
 ?>
-<?php $url = $block->getReviewsUrl() . '#reviews'; ?>
-<?php $urlForm = $block->getReviewsUrl() . '#review-form'; ?>
 <?php if ($block->getReviewsCount()): ?>
 <?php $rating = $block->getRatingSummary(); ?>
 <div class="product-reviews-summary short<?php echo !$rating ? ' no-rating' : ''?>">
     <?php if ($rating):?>
     <div class="rating-summary">
         <span class="label"><span><?php /* @escapeNotVerified */ echo __('Rating') ?>:</span></span>
-        <div class="rating-result" title="<?php /* @escapeNotVerified */ echo $rating; ?>%">
-            <span style="width:<?php /* @escapeNotVerified */ echo $rating; ?>%"><span><?php /* @escapeNotVerified */ echo $rating; ?>%</span></span>
+        <div class="rating-result" title="<?php echo $block->escapeHtmlAttr($rating); ?>%">
+            <span style="width:<?php echo $block->escapeHtmlAttr($rating); ?>%"><span><?php echo $block->escapeHtml($rating); ?>%</span></span>
         </div>
     </div>
     <?php endif;?>
     <div class="reviews-actions">
-        <a class="action view" href="<?php /* @escapeNotVerified */ echo $url ?>"><?php /* @escapeNotVerified */ echo $block->getReviewsCount() ?>&nbsp;<span><?php /* @escapeNotVerified */ echo($block->getReviewsCount() == 1) ? __('Review') : __('Reviews') ?></span></a>
+        <a class="action view" href="<?php echo $block->escapeUrl($url) ?>"><?php echo $block->escapeHtml($block->getReviewsCount()) ?>&nbsp;<span><?php /* @escapeNotVerified */ echo($block->getReviewsCount() == 1) ? __('Review') : __('Reviews') ?></span></a>
     </div>
 </div>
 <?php elseif ($block->getDisplayIfEmpty()): ?>
 <div class="product-reviews-summary short empty">
     <div class="reviews-actions">
-        <a class="action add" href="<?php /* @escapeNotVerified */ echo $urlForm; ?>">
+        <a class="action add" href="<?php echo $block->escapeUrl($urlForm); ?>">
             <?php /* @escapeNotVerified */ echo __('Be the first to review this product') ?>
         </a>
     </div>
diff --git a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml
index 585ffe01de0db4df4baab0caff39bf9e90054ed2..9eb4fd10fece10e160247f8ea5fe9f72bdc2395c 100644
--- a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml
@@ -6,16 +6,10 @@
 
 // @codingStandardsIgnoreFile
 
-?>
-<?php
-/**
- * @description:
- *
- */
-?>
-<?php
-    $_items = $block->getReviewsCollection()->getItems();
-    $format = $block->getDateFormat() ?: \IntlDateFormatter::SHORT;
+/** @var Magento\Review\Block\Product\View\ListView $block */
+
+$_items = $block->getReviewsCollection()->getItems();
+$format = $block->getDateFormat() ?: \IntlDateFormatter::SHORT;
 ?>
 <?php if (count($_items)):?>
 <div class="block review-list" id="customer-reviews">
@@ -35,11 +29,11 @@
                     <?php foreach ($_review->getRatingVotes() as $_vote): ?>
                     <div class="rating-summary item" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
                         <span class="label rating-label"><span><?php echo $block->escapeHtml($_vote->getRatingCode()) ?></span></span>
-                        <div class="rating-result" title="<?php /* @escapeNotVerified */ echo $_vote->getPercent() ?>%">
+                        <div class="rating-result" title="<?php echo $block->escapeHtmlAttr($_vote->getPercent()) ?>%">
 	                        <meta itemprop="worstRating" content = "1"/>
 	                        <meta itemprop="bestRating" content = "100"/>
-                            <span style="width:<?php /* @escapeNotVerified */ echo $_vote->getPercent() ?>%">
-                                <span itemprop="ratingValue"><?php /* @escapeNotVerified */ echo $_vote->getPercent() ?>%</span>
+                            <span style="width:<?php echo $block->escapeHtmlAttr($_vote->getPercent()) ?>%">
+                                <span itemprop="ratingValue"><?php echo $block->escapeHtml($_vote->getPercent()) ?>%</span>
                             </span>
                         </div>
                     </div>
@@ -56,7 +50,7 @@
                     </p>
                     <p class="review-date">
                         <span class="review-details-label"><?php /* @escapeNotVerified */ echo __('Posted on') ?></span>
-                        <time class="review-details-value" itemprop="datePublished" datetime="<?php /* @escapeNotVerified */ echo $block->formatDate($_review->getCreatedAt(), $format) ?>"><?php /* @escapeNotVerified */ echo $block->formatDate($_review->getCreatedAt(), $format) ?></time>
+                        <time class="review-details-value" itemprop="datePublished" datetime="<?php echo $block->escapeHtmlAttr($block->formatDate($_review->getCreatedAt(), $format)) ?>"><?php echo $block->escapeHtml($block->formatDate($_review->getCreatedAt(), $format)) ?></time>
                     </p>
                 </div>
             </li>
diff --git a/app/code/Magento/Review/view/frontend/templates/product/view/other.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/other.phtml
index 5e56f99483c277cf5ff4ae3457c8c99b2945ccf0..3c8d626b31748d3b1afb4b904f95fb077375445b 100644
--- a/app/code/Magento/Review/view/frontend/templates/product/view/other.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/product/view/other.phtml
@@ -6,10 +6,9 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Review\Block\Product\View\Other $block */
 ?>
-
-<?php /** @var $block \Magento\Review\Block\Product\View\Other */ ?>
 <?php $_product = $block->getProduct(); ?>
 <div class="actions">
-    <a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="action back"><span><?php /* @escapeNotVerified */ echo __('Back to Main Product Info') ?></span></a>
+    <a href="<?php echo $block->escapeUrl($_product->getProductUrl()) ?>" class="action back"><span><?php /* @escapeNotVerified */ echo __('Back to Main Product Info') ?></span></a>
 </div>
diff --git a/app/code/Magento/Review/view/frontend/templates/review.phtml b/app/code/Magento/Review/view/frontend/templates/review.phtml
index 93dfe7766c249f282e131cbd61e1189d877ecc5f..a7459ca7e1b4285c2131114422015b1be7340ee6 100644
--- a/app/code/Magento/Review/view/frontend/templates/review.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/review.phtml
@@ -3,8 +3,9 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-?>
 
+/** @var \Magento\Review\Block\Product\Review $block */
+?>
 <div id="product-review-container" data-role="product-review"></div>
 <?php echo $block->getChildHtml(); ?>
 
@@ -12,7 +13,7 @@
     {
         "*": {
             "Magento_Review/js/process-reviews": {
-                "productReviewUrl": "<?php /* @escapeNotVerified */ echo $block->getProductReviewUrl();?>"
+                "productReviewUrl": "<?php echo $block->escapeUrl($block->getProductReviewUrl()); ?>"
             }
         }
     }
diff --git a/app/code/Magento/Review/view/frontend/templates/view.phtml b/app/code/Magento/Review/view/frontend/templates/view.phtml
index 3fdd53c050cf684eb22d1be5b29f05b1cd749eac..f44d31d63f7b7e699c1411f4d097c7c37619d608 100644
--- a/app/code/Magento/Review/view/frontend/templates/view.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/view.phtml
@@ -14,7 +14,7 @@
         <h1><?php /* @escapeNotVerified */ echo __('Review Details') ?></h1>
     </div>
     <div class="product-img-box">
-        <a href="<?php /* @escapeNotVerified */ echo $block->getProductData()->getProductUrl() ?>">
+        <a href="<?php echo $block->escapeUrl($block->getProductData()->getProductUrl()) ?>">
             <?php echo $block->getImage($block->getProductData(), 'product_base_image', ['class' => 'product-image'])->toHtml(); ?>
         </a>
         <?php if ($block->getRating() && $block->getRating()->getSize()): ?>
@@ -35,7 +35,7 @@
                                 <td class="label"><?php echo __($block->escapeHtml($_rating->getRatingCode())) ?></td>
                                 <td class="value">
                                     <div class="rating-box">
-                                        <div class="rating" style="width:<?php /* @escapeNotVerified */ echo ceil($_rating->getPercent()) ?>%;"></div>
+                                        <div class="rating" style="width:<?php /* @noEscape */ echo ceil($_rating->getPercent()) ?>%;"></div>
                                     </div></td>
                             </tr>
                         <?php endif; ?>
@@ -48,7 +48,7 @@
     </div>
     <div class="actions">
         <div class="secondary">
-            <a class="action back" href="<?php /* @escapeNotVerified */ echo $block->getBackUrl() ?>">
+            <a class="action back" href="<?php echo $block->escapeUrl($block->getBackUrl()) ?>">
                 <span><?php /* @escapeNotVerified */ echo __('Back to Product Reviews') ?></a></span>
             </a>
         </div>
diff --git a/app/code/Magento/Rss/view/frontend/templates/feeds.phtml b/app/code/Magento/Rss/view/frontend/templates/feeds.phtml
index 81ac6fd803259eeeddfd87e9bc8b63e03ef8bc19..7c7c3a48390ba9b2170f0518e91098484c87805c 100644
--- a/app/code/Magento/Rss/view/frontend/templates/feeds.phtml
+++ b/app/code/Magento/Rss/view/frontend/templates/feeds.phtml
@@ -7,6 +7,7 @@
 // @codingStandardsIgnoreFile
 
 ?>
+<?php /** @var $block \Magento\Rss\Block\Feeds */ ?>
 <table class="data table rss">
     <caption class="table-caption"><?php /* @escapeNotVerified */ echo __('Feed'); ?></caption>
     <tbody>
@@ -16,16 +17,16 @@
         <tr>
             <td class="col feed"><?php echo $block->escapeHtml($feed['label']) ?></td>
             <td class="col action">
-                <a href="<?php /* @escapeNotVerified */ echo $feed['link'] ?>" class="action get"><span><?php /* @escapeNotVerified */ echo __('Get Feed'); ?></span></a>
+                <a href="<?php echo $block->escapeUrl($feed['link']) ?>" class="action get"><span><?php /* @escapeNotVerified */ echo __('Get Feed'); ?></span></a>
             </td>
         </tr>
         <?php else: ?>
-            <th colspan="2" scope="col"><?php /* @escapeNotVerified */ echo $feed['group'] ?></th>
+            <th colspan="2" scope="col"><?php echo $block->escapeHtml($feed['group']) ?></th>
             <?php foreach ($feed['feeds'] as $item) :?>
                 <tr>
                     <td class="col feed"><?php echo $block->escapeHtml($item['label']) ?></td>
                     <td class="col action">
-                        <a href="<?php /* @escapeNotVerified */ echo $item['link'] ?>" class="action get"><span><?php /* @escapeNotVerified */ echo __('Get Feed'); ?></span></a>
+                        <a href="<?php echo $block->escapeUrl($item['link']) ?>" class="action get"><span><?php /* @escapeNotVerified */ echo __('Get Feed'); ?></span></a>
                     </td>
                 </tr>
             <?php endforeach; ?>
diff --git a/app/code/Magento/Sales/Api/Data/CommentInterface.php b/app/code/Magento/Sales/Api/Data/CommentInterface.php
index d7021dc9f9546b76f427a282a38a31d64f033775..fcab786319340535c1c6309c884a678a91341d90 100644
--- a/app/code/Magento/Sales/Api/Data/CommentInterface.php
+++ b/app/code/Magento/Sales/Api/Data/CommentInterface.php
@@ -12,6 +12,16 @@ namespace Magento\Sales\Api\Data;
  */
 interface CommentInterface
 {
+    /*
+     * Is-visible-on-storefront flag.
+     */
+    const IS_VISIBLE_ON_FRONT = 'is_visible_on_front';
+
+    /*
+     * Comment.
+     */
+    const COMMENT = 'comment';
+
     /**
      * Gets the comment for the invoice.
      *
diff --git a/app/code/Magento/Sales/Api/Data/EntityInterface.php b/app/code/Magento/Sales/Api/Data/EntityInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..d09b25920f899aa652f87dad269047136892a061
--- /dev/null
+++ b/app/code/Magento/Sales/Api/Data/EntityInterface.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api\Data;
+
+/**
+ * Interface EntityInterface
+ * @api
+ */
+interface EntityInterface
+{
+    /*
+     * Entity ID.
+     */
+    const ENTITY_ID = 'entity_id';
+
+    /*
+     * Created-at timestamp.
+     */
+    const CREATED_AT = 'created_at';
+
+    /**
+     * Gets the created-at timestamp for the invoice.
+     *
+     * @return string|null Created-at timestamp.
+     */
+    public function getCreatedAt();
+
+    /**
+     * Sets the created-at timestamp for the invoice.
+     *
+     * @param string $createdAt timestamp
+     * @return $this
+     */
+    public function setCreatedAt($createdAt);
+
+    /**
+     * Gets the ID for the invoice.
+     *
+     * @return int|null Invoice ID.
+     */
+    public function getEntityId();
+
+    /**
+     * Sets entity ID.
+     *
+     * @param int $entityId
+     * @return $this
+     */
+    public function setEntityId($entityId);
+}
diff --git a/app/code/Magento/Sales/Api/Data/InvoiceCommentCreationInterface.php b/app/code/Magento/Sales/Api/Data/InvoiceCommentCreationInterface.php
index 85c114da3821eb7cb0d98538c37513ddd10fed84..5e4d85e93cb98969580df87b71d7bcc9f6c916f6 100644
--- a/app/code/Magento/Sales/Api/Data/InvoiceCommentCreationInterface.php
+++ b/app/code/Magento/Sales/Api/Data/InvoiceCommentCreationInterface.php
@@ -6,11 +6,29 @@
 
 namespace Magento\Sales\Api\Data;
 
+use Magento\Framework\Api\ExtensibleDataInterface;
+
 /**
  * Interface InvoiceCommentCreationInterface
  *
  * @api
  */
-interface InvoiceCommentCreationInterface extends \Magento\Sales\Api\Data\CommentInterface
+interface InvoiceCommentCreationInterface extends ExtensibleDataInterface, CommentInterface
 {
+    /**
+     * Retrieve existing extension attributes object or create a new one.
+     *
+     * @return \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes();
+
+    /**
+     * Set an extension attributes object.
+     *
+     * @param \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface $extensionAttributes
+    );
 }
diff --git a/app/code/Magento/Sales/Api/Data/InvoiceCommentInterface.php b/app/code/Magento/Sales/Api/Data/InvoiceCommentInterface.php
index 1447fab476ad9cad5a4f498450952324264b9eec..f661a1ab6a4ca1755f003304c9ff55ee287bba98 100644
--- a/app/code/Magento/Sales/Api/Data/InvoiceCommentInterface.php
+++ b/app/code/Magento/Sales/Api/Data/InvoiceCommentInterface.php
@@ -5,6 +5,8 @@
  */
 namespace Magento\Sales\Api\Data;
 
+use Magento\Framework\Api\ExtensibleDataInterface;
+
 /**
  * Invoice comment interface.
  *
@@ -12,16 +14,11 @@ namespace Magento\Sales\Api\Data;
  * invoice history.
  * @api
  */
-interface InvoiceCommentInterface extends \Magento\Framework\Api\ExtensibleDataInterface,
-\Magento\Sales\Api\Data\InvoiceCommentCreationInterface
+interface InvoiceCommentInterface extends ExtensibleDataInterface, CommentInterface, EntityInterface
 {
     /**#@+
      * Constants for keys of data array. Identical to the name of the getter in snake case.
      */
-    /*
-     * Entity ID.
-     */
-    const ENTITY_ID = 'entity_id';
     /*
      * Parent ID.
      */
@@ -30,48 +27,6 @@ interface InvoiceCommentInterface extends \Magento\Framework\Api\ExtensibleDataI
      * Is-customer-notified flag.
      */
     const IS_CUSTOMER_NOTIFIED = 'is_customer_notified';
-    /*
-     * Is-visible-on-storefront flag.
-     */
-    const IS_VISIBLE_ON_FRONT = 'is_visible_on_front';
-    /*
-     * Comment.
-     */
-    const COMMENT = 'comment';
-    /*
-     * Created-at timestamp.
-     */
-    const CREATED_AT = 'created_at';
-
-    /**
-     * Gets the created-at timestamp for the invoice.
-     *
-     * @return string|null Created-at timestamp.
-     */
-    public function getCreatedAt();
-
-    /**
-     * Sets the created-at timestamp for the invoice.
-     *
-     * @param string $createdAt timestamp
-     * @return $this
-     */
-    public function setCreatedAt($createdAt);
-
-    /**
-     * Gets the ID for the invoice.
-     *
-     * @return int|null Invoice ID.
-     */
-    public function getEntityId();
-
-    /**
-     * Sets entity ID.
-     *
-     * @param int $entityId
-     * @return $this
-     */
-    public function setEntityId($entityId);
 
     /**
      * Gets the is-customer-notified flag value for the invoice.
diff --git a/app/code/Magento/Sales/Api/Data/InvoiceItemCreationInterface.php b/app/code/Magento/Sales/Api/Data/InvoiceItemCreationInterface.php
index 4b5c6fa2c6136f4d5896a418636d87632af5d603..2f2ddfbf758a0de4341b60b840263704bf6968ab 100644
--- a/app/code/Magento/Sales/Api/Data/InvoiceItemCreationInterface.php
+++ b/app/code/Magento/Sales/Api/Data/InvoiceItemCreationInterface.php
@@ -6,6 +6,8 @@
 
 namespace Magento\Sales\Api\Data;
 
+use Magento\Framework\Api\ExtensibleDataInterface;
+
 /**
  * Input argument for invoice creation
  *
@@ -13,6 +15,22 @@ namespace Magento\Sales\Api\Data;
  *
  * @api
  */
-interface InvoiceItemCreationInterface extends LineItemInterface
+interface InvoiceItemCreationInterface extends LineItemInterface, ExtensibleDataInterface
 {
+    /**
+     * Retrieve existing extension attributes object or create a new one.
+     *
+     * @return \Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes();
+
+    /**
+     * Set an extension attributes object.
+     *
+     * @param \Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface $extensionAttributes
+    );
 }
diff --git a/app/code/Magento/Sales/Api/Data/InvoiceItemInterface.php b/app/code/Magento/Sales/Api/Data/InvoiceItemInterface.php
index ecdcd07bc0ca5b90f4970dcffbfcbcdd3757774d..37a933f97a29ab26a192735e808c031ede534900 100644
--- a/app/code/Magento/Sales/Api/Data/InvoiceItemInterface.php
+++ b/app/code/Magento/Sales/Api/Data/InvoiceItemInterface.php
@@ -5,14 +5,15 @@
  */
 namespace Magento\Sales\Api\Data;
 
+use Magento\Framework\Api\ExtensibleDataInterface;
+
 /**
  * Invoice item interface.
  *
  * An invoice is a record of the receipt of payment for an order. An invoice item is a purchased item in an invoice.
  * @api
  */
-interface InvoiceItemInterface extends \Magento\Sales\Api\Data\InvoiceItemCreationInterface,
-\Magento\Framework\Api\ExtensibleDataInterface
+interface InvoiceItemInterface extends ExtensibleDataInterface, LineItemInterface
 {
     /**#@+
      * Constants for keys of data array. Identical to the name of the getter in snake case.
diff --git a/app/code/Magento/Sales/Api/Data/ShipmentCommentCreationInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentCommentCreationInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..40beaa32d02f25c57af5fe93cbfd3e3f6d97e93f
--- /dev/null
+++ b/app/code/Magento/Sales/Api/Data/ShipmentCommentCreationInterface.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api\Data;
+
+use Magento\Framework\Api\ExtensibleDataInterface;
+
+/**
+ * Interface ShipmentCommentCreationInterface
+ * @api
+ */
+interface ShipmentCommentCreationInterface extends ExtensibleDataInterface, CommentInterface
+{
+    /**
+     * Retrieve existing extension attributes object or create a new one.
+     *
+     * @return \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes();
+
+    /**
+     * Set an extension attributes object.
+     *
+     * @param \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface $extensionAttributes
+    );
+}
diff --git a/app/code/Magento/Sales/Api/Data/ShipmentCommentInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentCommentInterface.php
index a67b0577a7761ee72bc1fad3c9fda679f31aa27e..0c00bf80d78f1d4f0311f7331a3639eec3e30bba 100644
--- a/app/code/Magento/Sales/Api/Data/ShipmentCommentInterface.php
+++ b/app/code/Magento/Sales/Api/Data/ShipmentCommentInterface.php
@@ -5,6 +5,8 @@
  */
 namespace Magento\Sales\Api\Data;
 
+use Magento\Framework\Api\ExtensibleDataInterface;
+
 /**
  * Shipment comment interface.
  *
@@ -12,15 +14,11 @@ namespace Magento\Sales\Api\Data;
  * document lists the products and their quantities in the delivery package. A shipment document can contain comments.
  * @api
  */
-interface ShipmentCommentInterface extends \Magento\Framework\Api\ExtensibleDataInterface
+interface ShipmentCommentInterface extends ExtensibleDataInterface, CommentInterface, EntityInterface
 {
     /**#@+
      * Constants for keys of data array. Identical to the name of the getter in snake case.
      */
-    /*
-     * Entity ID.
-     */
-    const ENTITY_ID = 'entity_id';
     /*
      * Parent ID.
      */
@@ -29,55 +27,6 @@ interface ShipmentCommentInterface extends \Magento\Framework\Api\ExtensibleData
      * Is-customer-notified flag.
      */
     const IS_CUSTOMER_NOTIFIED = 'is_customer_notified';
-    /*
-     * Is-visible-on-storefront flag.
-     */
-    const IS_VISIBLE_ON_FRONT = 'is_visible_on_front';
-    /*
-     * Comment.
-     */
-    const COMMENT = 'comment';
-    /*
-     * Created-at timestamp.
-     */
-    const CREATED_AT = 'created_at';
-
-    /**
-     * Gets the comment for the shipment.
-     *
-     * @return string Comment.
-     */
-    public function getComment();
-
-    /**
-     * Gets the created-at timestamp for the shipment comment.
-     *
-     * @return string|null Created-at timestamp.
-     */
-    public function getCreatedAt();
-
-    /**
-     * Sets the created-at timestamp for the shipment comment.
-     *
-     * @param string $createdAt timestamp
-     * @return $this
-     */
-    public function setCreatedAt($createdAt);
-
-    /**
-     * Gets the ID for the shipment comment.
-     *
-     * @return int|null Shipment comment ID.
-     */
-    public function getEntityId();
-
-    /**
-     * Sets entity ID.
-     *
-     * @param int $entityId
-     * @return $this
-     */
-    public function setEntityId($entityId);
 
     /**
      * Gets the is-customer-notified flag value for the shipment comment.
@@ -86,13 +35,6 @@ interface ShipmentCommentInterface extends \Magento\Framework\Api\ExtensibleData
      */
     public function getIsCustomerNotified();
 
-    /**
-     * Gets the is-visible-on-storefront flag value for the shipment comment.
-     *
-     * @return int Is-visible-on-storefront flag value.
-     */
-    public function getIsVisibleOnFront();
-
     /**
      * Gets the parent ID for the shipment comment.
      *
@@ -116,22 +58,6 @@ interface ShipmentCommentInterface extends \Magento\Framework\Api\ExtensibleData
      */
     public function setIsCustomerNotified($isCustomerNotified);
 
-    /**
-     * Sets the is-visible-on-storefront flag value for the shipment comment.
-     *
-     * @param int $isVisibleOnFront
-     * @return $this
-     */
-    public function setIsVisibleOnFront($isVisibleOnFront);
-
-    /**
-     * Sets the comment for the shipment.
-     *
-     * @param string $comment
-     * @return $this
-     */
-    public function setComment($comment);
-
     /**
      * Retrieve existing extension attributes object or create a new one.
      *
diff --git a/app/code/Magento/Sales/Api/Data/ShipmentCreationArgumentsInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentCreationArgumentsInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..f03d05be3c7426bf28d16a7976957b087c432b0d
--- /dev/null
+++ b/app/code/Magento/Sales/Api/Data/ShipmentCreationArgumentsInterface.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api\Data;
+
+/**
+ * Interface for creation arguments for Shipment.
+ *
+ * @api
+ */
+interface ShipmentCreationArgumentsInterface extends \Magento\Framework\Api\ExtensibleDataInterface
+{
+    /**
+     * Gets existing extension attributes.
+     *
+     * @return \Magento\Sales\Api\Data\ShipmentCreationArgumentsExtensionInterface|null
+     */
+    public function getExtensionAttributes();
+
+    /**
+     * Sets extension attributes.
+     *
+     * @param \Magento\Sales\Api\Data\ShipmentCreationArgumentsExtensionInterface $extensionAttributes
+     *
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentCreationArgumentsExtensionInterface $extensionAttributes
+    );
+}
diff --git a/app/code/Magento/Sales/Api/Data/ShipmentItemCreationInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentItemCreationInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..57c908fb88c5e9aa5e1dd7dbc6e8c39449d2217d
--- /dev/null
+++ b/app/code/Magento/Sales/Api/Data/ShipmentItemCreationInterface.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Sales\Api\Data;
+
+/**
+ * Input argument for shipment item creation
+ *
+ * Interface ShipmentItemCreationInterface
+ *
+ * @api
+ */
+interface ShipmentItemCreationInterface extends LineItemInterface,
+\Magento\Framework\Api\ExtensibleDataInterface
+{
+    /**
+     * Retrieve existing extension attributes object or create a new one.
+     *
+     * @return \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes();
+
+    /**
+     * Set an extension attributes object.
+     *
+     * @param \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface $extensionAttributes
+    );
+}
diff --git a/app/code/Magento/Sales/Api/Data/ShipmentItemInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentItemInterface.php
index 03f8fba0b431cbb39be5642aede49993bb8d202c..6d891371d04a14be86c4740b70a4838ccbc5a8cb 100644
--- a/app/code/Magento/Sales/Api/Data/ShipmentItemInterface.php
+++ b/app/code/Magento/Sales/Api/Data/ShipmentItemInterface.php
@@ -12,7 +12,8 @@ namespace Magento\Sales\Api\Data;
  * document lists the products and their quantities in the delivery package. A product is an item in a shipment.
  * @api
  */
-interface ShipmentItemInterface extends \Magento\Framework\Api\ExtensibleDataInterface
+interface ShipmentItemInterface extends \Magento\Sales\Api\Data\LineItemInterface,
+\Magento\Framework\Api\ExtensibleDataInterface
 {
     /**#@+
      * Constants for keys of data array. Identical to the name of the getter in snake case
@@ -102,13 +103,6 @@ interface ShipmentItemInterface extends \Magento\Framework\Api\ExtensibleDataInt
      */
     public function getName();
 
-    /**
-     * Gets the order item ID for the shipment item.
-     *
-     * @return int Order item ID.
-     */
-    public function getOrderItemId();
-
     /**
      * Gets the parent ID for the shipment item.
      *
@@ -130,13 +124,6 @@ interface ShipmentItemInterface extends \Magento\Framework\Api\ExtensibleDataInt
      */
     public function getProductId();
 
-    /**
-     * Gets the quantity for the shipment item.
-     *
-     * @return float Quantity.
-     */
-    public function getQty();
-
     /**
      * Gets the row total for the shipment item.
      *
@@ -190,14 +177,6 @@ interface ShipmentItemInterface extends \Magento\Framework\Api\ExtensibleDataInt
      */
     public function setWeight($weight);
 
-    /**
-     * Sets the quantity for the shipment item.
-     *
-     * @param float $qty
-     * @return $this
-     */
-    public function setQty($qty);
-
     /**
      * Sets the product ID for the shipment item.
      *
@@ -206,14 +185,6 @@ interface ShipmentItemInterface extends \Magento\Framework\Api\ExtensibleDataInt
      */
     public function setProductId($id);
 
-    /**
-     * Sets the order item ID for the shipment item.
-     *
-     * @param int $id
-     * @return $this
-     */
-    public function setOrderItemId($id);
-
     /**
      * Sets the additional data for the shipment item.
      *
diff --git a/app/code/Magento/Sales/Api/Data/ShipmentPackageCreationInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentPackageCreationInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..c83c54b3019bec5dfe507c97fe82bab02dc8f96b
--- /dev/null
+++ b/app/code/Magento/Sales/Api/Data/ShipmentPackageCreationInterface.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api\Data;
+
+/**
+ * Shipment package interface.
+ *
+ * A shipment is a delivery package that contains products. A shipment document accompanies the shipment. This
+ * document lists the products and their quantities in the delivery package.
+ * @api
+ */
+interface ShipmentPackageCreationInterface extends \Magento\Framework\Api\ExtensibleDataInterface
+{
+    /**
+     * Retrieve existing extension attributes object or create a new one.
+     *
+     * @return \Magento\Sales\Api\Data\ShipmentPackageCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes();
+
+    /**
+     * Set an extension attributes object.
+     *
+     * @param \Magento\Sales\Api\Data\ShipmentPackageCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentPackageCreationExtensionInterface $extensionAttributes
+    );
+}
diff --git a/app/code/Magento/Sales/Api/Data/ShipmentTrackCreationInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentTrackCreationInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..6a45242fcd1568275db8727b64e83a22fdbdd73f
--- /dev/null
+++ b/app/code/Magento/Sales/Api/Data/ShipmentTrackCreationInterface.php
@@ -0,0 +1,34 @@
+<?php
+
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api\Data;
+
+use Magento\Framework\Api\ExtensibleDataInterface;
+
+/**
+ * Shipment Track Creation interface.
+ *
+ * @api
+ */
+interface ShipmentTrackCreationInterface extends TrackInterface, ExtensibleDataInterface
+{
+    /**
+     * Retrieve existing extension attributes object or create a new one.
+     *
+     * @return \Magento\Sales\Api\Data\ShipmentTrackCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes();
+
+    /**
+     * Set an extension attributes object.
+     *
+     * @param \Magento\Sales\Api\Data\ShipmentTrackCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentTrackCreationExtensionInterface $extensionAttributes
+    );
+}
diff --git a/app/code/Magento/Sales/Api/Data/ShipmentTrackInterface.php b/app/code/Magento/Sales/Api/Data/ShipmentTrackInterface.php
index f28a0b0e7a1970a05dfeef5739238966b1503182..beafa1370f107e1ba725568b893b4d390d9469b5 100644
--- a/app/code/Magento/Sales/Api/Data/ShipmentTrackInterface.php
+++ b/app/code/Magento/Sales/Api/Data/ShipmentTrackInterface.php
@@ -5,6 +5,8 @@
  */
 namespace Magento\Sales\Api\Data;
 
+use Magento\Framework\Api\ExtensibleDataInterface;
+
 /**
  * Shipment track interface.
  *
@@ -13,7 +15,7 @@ namespace Magento\Sales\Api\Data;
  * shipments.
  * @api
  */
-interface ShipmentTrackInterface extends \Magento\Framework\Api\ExtensibleDataInterface
+interface ShipmentTrackInterface extends TrackInterface, ExtensibleDataInterface
 {
     /**#@+
      * Constants for keys of data array. Identical to the name of the getter in snake case.
@@ -64,11 +66,19 @@ interface ShipmentTrackInterface extends \Magento\Framework\Api\ExtensibleDataIn
     const UPDATED_AT = 'updated_at';
 
     /**
-     * Gets the carrier code for the shipment package.
+     * Sets the order_id for the shipment package.
      *
-     * @return string Carrier code.
+     * @param int $id
+     * @return $this
      */
-    public function getCarrierCode();
+    public function setOrderId($id);
+
+    /**
+     * Gets the order_id for the shipment package.
+     *
+     * @return int
+     */
+    public function getOrderId();
 
     /**
      * Gets the created-at timestamp for the shipment package.
@@ -85,13 +95,6 @@ interface ShipmentTrackInterface extends \Magento\Framework\Api\ExtensibleDataIn
      */
     public function setCreatedAt($createdAt);
 
-    /**
-     * Gets the description for the shipment package.
-     *
-     * @return string Description.
-     */
-    public function getDescription();
-
     /**
      * Gets the ID for the shipment package.
      *
@@ -107,13 +110,6 @@ interface ShipmentTrackInterface extends \Magento\Framework\Api\ExtensibleDataIn
      */
     public function setEntityId($entityId);
 
-    /**
-     * Gets the order_id for the shipment package.
-     *
-     * @return int
-     */
-    public function getOrderId();
-
     /**
      * Gets the parent ID for the shipment package.
      *
@@ -121,27 +117,6 @@ interface ShipmentTrackInterface extends \Magento\Framework\Api\ExtensibleDataIn
      */
     public function getParentId();
 
-    /**
-     * Gets the quantity for the shipment package.
-     *
-     * @return float Quantity.
-     */
-    public function getQty();
-
-    /**
-     * Gets the title for the shipment package.
-     *
-     * @return string Title.
-     */
-    public function getTitle();
-
-    /**
-     * Gets the track number for the shipment package.
-     *
-     * @return string Track number.
-     */
-    public function getTrackNumber();
-
     /**
      * Gets the updated-at timestamp for the shipment package.
      *
@@ -149,13 +124,6 @@ interface ShipmentTrackInterface extends \Magento\Framework\Api\ExtensibleDataIn
      */
     public function getUpdatedAt();
 
-    /**
-     * Gets the weight for the shipment package.
-     *
-     * @return float Weight.
-     */
-    public function getWeight();
-
     /**
      * Sets the updated-at timestamp for the shipment package.
      *
@@ -181,28 +149,26 @@ interface ShipmentTrackInterface extends \Magento\Framework\Api\ExtensibleDataIn
     public function setWeight($weight);
 
     /**
-     * Sets the quantity for the shipment package.
+     * Gets the weight for the shipment package.
      *
-     * @param float $qty
-     * @return $this
+     * @return float Weight.
      */
-    public function setQty($qty);
+    public function getWeight();
 
     /**
-     * Sets the order_id for the shipment package.
+     * Sets the quantity for the shipment package.
      *
-     * @param int $id
+     * @param float $qty
      * @return $this
      */
-    public function setOrderId($id);
+    public function setQty($qty);
 
     /**
-     * Sets the track number for the shipment package.
+     * Gets the quantity for the shipment package.
      *
-     * @param string $trackNumber
-     * @return $this
+     * @return float Quantity.
      */
-    public function setTrackNumber($trackNumber);
+    public function getQty();
 
     /**
      * Sets the description for the shipment package.
@@ -213,20 +179,11 @@ interface ShipmentTrackInterface extends \Magento\Framework\Api\ExtensibleDataIn
     public function setDescription($description);
 
     /**
-     * Sets the title for the shipment package.
-     *
-     * @param string $title
-     * @return $this
-     */
-    public function setTitle($title);
-
-    /**
-     * Sets the carrier code for the shipment package.
+     * Gets the description for the shipment package.
      *
-     * @param string $code
-     * @return $this
+     * @return string Description.
      */
-    public function setCarrierCode($code);
+    public function getDescription();
 
     /**
      * Retrieve existing extension attributes object or create a new one.
diff --git a/app/code/Magento/Sales/Api/Data/TrackInterface.php b/app/code/Magento/Sales/Api/Data/TrackInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..17c08ff9b983031efa1268fc0a4c0fc359f60bd5
--- /dev/null
+++ b/app/code/Magento/Sales/Api/Data/TrackInterface.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api\Data;
+
+/**
+ * Shipment Track Creation interface.
+ *
+ * @api
+ */
+interface TrackInterface
+{
+    /**
+     * Sets the track number for the shipment package.
+     *
+     * @param string $trackNumber
+     * @return $this
+     */
+    public function setTrackNumber($trackNumber);
+
+    /**
+     * Gets the track number for the shipment package.
+     *
+     * @return string Track number.
+     */
+    public function getTrackNumber();
+
+    /**
+     * Sets the title for the shipment package.
+     *
+     * @param string $title
+     * @return $this
+     */
+    public function setTitle($title);
+
+    /**
+     * Gets the title for the shipment package.
+     *
+     * @return string Title.
+     */
+    public function getTitle();
+
+    /**
+     * Sets the carrier code for the shipment package.
+     *
+     * @param string $code
+     * @return $this
+     */
+    public function setCarrierCode($code);
+
+    /**
+     * Gets the carrier code for the shipment package.
+     *
+     * @return string Carrier code.
+     */
+    public function getCarrierCode();
+}
diff --git a/app/code/Magento/Sales/Api/Exception/CouldNotShipExceptionInterface.php b/app/code/Magento/Sales/Api/Exception/CouldNotShipExceptionInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..b52e627791249eb6b347d495e32639e20536370e
--- /dev/null
+++ b/app/code/Magento/Sales/Api/Exception/CouldNotShipExceptionInterface.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api\Exception;
+
+/**
+ * @api
+ */
+interface CouldNotShipExceptionInterface
+{
+}
diff --git a/app/code/Magento/Sales/Api/OrderInvoiceInterface.php b/app/code/Magento/Sales/Api/InvoiceOrderInterface.php
similarity index 93%
rename from app/code/Magento/Sales/Api/OrderInvoiceInterface.php
rename to app/code/Magento/Sales/Api/InvoiceOrderInterface.php
index 80fa6159afc3e449115a6b373560628a5aa7157f..0f0ce4596991664671cc6ea4d1f231ad05066ed3 100644
--- a/app/code/Magento/Sales/Api/OrderInvoiceInterface.php
+++ b/app/code/Magento/Sales/Api/InvoiceOrderInterface.php
@@ -7,11 +7,11 @@
 namespace Magento\Sales\Api;
 
 /**
- * Class OrderInvoiceInterface
+ * Class InvoiceOrderInterface
  *
  * @api
  */
-interface OrderInvoiceInterface
+interface InvoiceOrderInterface
 {
     /**
      * @param int $orderId
diff --git a/app/code/Magento/Sales/Api/ShipOrderInterface.php b/app/code/Magento/Sales/Api/ShipOrderInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..d28fedf4e507fc9c73f64ef60d42032e5d0c2114
--- /dev/null
+++ b/app/code/Magento/Sales/Api/ShipOrderInterface.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api;
+
+/**
+ * Class ShipOrderInterface
+ *
+ * @api
+ */
+interface ShipOrderInterface
+{
+    /**
+     * Creates new Shipment for given Order.
+     *
+     * @param int $orderId
+     * @param \Magento\Sales\Api\Data\ShipmentItemCreationInterface[] $items
+     * @param bool $notify
+     * @param bool $appendComment
+     * @param \Magento\Sales\Api\Data\ShipmentCommentCreationInterface|null $comment
+     * @param \Magento\Sales\Api\Data\ShipmentTrackCreationInterface[] $tracks
+     * @param \Magento\Sales\Api\Data\ShipmentPackageCreationInterface[] $packages
+     * @param \Magento\Sales\Api\Data\ShipmentCreationArgumentsInterface|null $arguments
+     * @return int Id of created Shipment.
+     */
+    public function execute(
+        $orderId,
+        array $items = [],
+        $notify = false,
+        $appendComment = false,
+        \Magento\Sales\Api\Data\ShipmentCommentCreationInterface $comment = null,
+        array $tracks = [],
+        array $packages = [],
+        \Magento\Sales\Api\Data\ShipmentCreationArgumentsInterface $arguments = null
+    );
+}
diff --git a/app/code/Magento/Sales/Exception/CouldNotShipException.php b/app/code/Magento/Sales/Exception/CouldNotShipException.php
new file mode 100644
index 0000000000000000000000000000000000000000..4881bbd79a3a3eec84c74f66ffaf8a4c5553bd16
--- /dev/null
+++ b/app/code/Magento/Sales/Exception/CouldNotShipException.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Exception;
+
+use Magento\Framework\Exception\LocalizedException;
+use Magento\Sales\Api\Exception\CouldNotShipExceptionInterface;
+
+/**
+ * Class CouldNotShipException
+ */
+class CouldNotShipException extends LocalizedException implements CouldNotShipExceptionInterface
+{
+}
diff --git a/app/code/Magento/Sales/Model/OrderInvoice.php b/app/code/Magento/Sales/Model/InvoiceOrder.php
similarity index 86%
rename from app/code/Magento/Sales/Model/OrderInvoice.php
rename to app/code/Magento/Sales/Model/InvoiceOrder.php
index b499b7028bce1336f29688b4ebb04aaa9db32048..e51b46082d943d8ff609bacb80fae19c861afba4 100644
--- a/app/code/Magento/Sales/Model/OrderInvoice.php
+++ b/app/code/Magento/Sales/Model/InvoiceOrder.php
@@ -9,22 +9,25 @@ namespace Magento\Sales\Model;
 use Magento\Framework\App\ResourceConnection;
 use Magento\Sales\Api\Data\InvoiceCommentCreationInterface;
 use Magento\Sales\Api\Data\InvoiceCreationArgumentsInterface;
-use Magento\Sales\Api\OrderInvoiceInterface;
+use Magento\Sales\Api\InvoiceOrderInterface;
 use Magento\Sales\Api\OrderRepositoryInterface;
 use Magento\Sales\Model\Order\Config as OrderConfig;
+use Magento\Sales\Model\Order\Invoice\InvoiceValidatorInterface;
 use Magento\Sales\Model\Order\Invoice\NotifierInterface;
 use Magento\Sales\Model\Order\InvoiceDocumentFactory;
+use Magento\Sales\Model\Order\InvoiceQuantityValidator;
 use Magento\Sales\Model\Order\InvoiceRepository;
-use Magento\Sales\Model\Order\InvoiceValidatorInterface;
 use Magento\Sales\Model\Order\OrderStateResolverInterface;
+use Magento\Sales\Model\Order\OrderValidatorInterface;
 use Magento\Sales\Model\Order\PaymentAdapterInterface;
+use Magento\Sales\Model\Order\Validation\CanInvoice;
 use Psr\Log\LoggerInterface;
 
 /**
- * Class InvoiceService
+ * Class InvoiceOrder
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class OrderInvoice implements OrderInvoiceInterface
+class InvoiceOrder implements InvoiceOrderInterface
 {
     /**
      * @var ResourceConnection
@@ -76,12 +79,18 @@ class OrderInvoice implements OrderInvoiceInterface
      */
     private $logger;
 
+    /**
+     * @var OrderValidatorInterface
+     */
+    private $orderValidator;
+
     /**
      * OrderInvoice constructor.
      * @param ResourceConnection $resourceConnection
      * @param OrderRepositoryInterface $orderRepository
      * @param InvoiceDocumentFactory $invoiceDocumentFactory
      * @param InvoiceValidatorInterface $invoiceValidator
+     * @param OrderValidatorInterface $orderValidator
      * @param PaymentAdapterInterface $paymentAdapter
      * @param OrderStateResolverInterface $orderStateResolver
      * @param OrderConfig $config
@@ -95,6 +104,7 @@ class OrderInvoice implements OrderInvoiceInterface
         OrderRepositoryInterface $orderRepository,
         InvoiceDocumentFactory $invoiceDocumentFactory,
         InvoiceValidatorInterface $invoiceValidator,
+        OrderValidatorInterface $orderValidator,
         PaymentAdapterInterface $paymentAdapter,
         OrderStateResolverInterface $orderStateResolver,
         OrderConfig $config,
@@ -106,6 +116,7 @@ class OrderInvoice implements OrderInvoiceInterface
         $this->orderRepository = $orderRepository;
         $this->invoiceDocumentFactory = $invoiceDocumentFactory;
         $this->invoiceValidator = $invoiceValidator;
+        $this->orderValidator = $orderValidator;
         $this->paymentAdapter = $paymentAdapter;
         $this->orderStateResolver = $orderStateResolver;
         $this->config = $config;
@@ -147,7 +158,16 @@ class OrderInvoice implements OrderInvoiceInterface
             ($appendComment && $notify),
             $arguments
         );
-        $errorMessages = $this->invoiceValidator->validate($invoice, $order);
+        $errorMessages = array_merge(
+            $this->invoiceValidator->validate(
+                $invoice,
+                [InvoiceQuantityValidator::class]
+            ),
+            $this->orderValidator->validate(
+                $order,
+                [CanInvoice::class]
+            )
+        );
         if (!empty($errorMessages)) {
             throw new \Magento\Sales\Exception\DocumentValidationException(
                 __("Invoice Document Validation Error(s):\n" . implode("\n", $errorMessages))
diff --git a/app/code/Magento/Sales/Model/Order/AddressRepository.php b/app/code/Magento/Sales/Model/Order/AddressRepository.php
index e075d4afdcd34945983b55047213cc825b9eb55b..c38d7bed1e7e10b721bbd9fab412bff563fe1c7a 100644
--- a/app/code/Magento/Sales/Model/Order/AddressRepository.php
+++ b/app/code/Magento/Sales/Model/Order/AddressRepository.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Sales\Model\Order;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Sales\Model\ResourceModel\Metadata;
 use Magento\Sales\Api\Data\OrderAddressSearchResultInterfaceFactory as SearchResultFactory;
 use Magento\Framework\Exception\CouldNotDeleteException;
@@ -34,16 +35,23 @@ class AddressRepository implements \Magento\Sales\Api\OrderAddressRepositoryInte
      */
     protected $registry = [];
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
+     * AddressRepository constructor.
      * @param Metadata $metadata
      * @param SearchResultFactory $searchResultFactory
+     * @param CollectionProcessorInterface|null $collectionProcessor
      */
     public function __construct(
         Metadata $metadata,
-        SearchResultFactory $searchResultFactory
+        SearchResultFactory $searchResultFactory,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->metadata = $metadata;
         $this->searchResultFactory = $searchResultFactory;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -81,19 +89,11 @@ class AddressRepository implements \Magento\Sales\Api\OrderAddressRepositoryInte
      */
     public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria)
     {
-        //@TODO: fix search logic
-        /** @var \Magento\Sales\Api\Data\OrderAddressSearchResultInterface $searchResult */
+        /** @var \Magento\Sales\Model\ResourceModel\Order\Address\Collection $searchResult */
         $searchResult = $this->searchResultFactory->create();
-
-        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
-            foreach ($filterGroup->getFilters() as $filter) {
-                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-                $searchResult->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
-            }
-        }
-        $searchResult->setCurPage($searchCriteria->getCurrentPage());
-        $searchResult->setPageSize($searchCriteria->getPageSize());
-
+        $this->collectionProcessor->process($searchCriteria, $searchResult);
+        $searchResult->setSearchCriteria($searchCriteria);
+        
         return $searchResult;
     }
 
@@ -158,4 +158,20 @@ class AddressRepository implements \Magento\Sales\Api\OrderAddressRepositoryInte
     {
         return $this->metadata->getNewInstance();
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php b/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php
index fb13153330312bcac6dac5c426861ee01733d34c..3fc0a2a4da4d7d6af9cc455828414ee532fd7395 100644
--- a/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php
+++ b/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php
@@ -6,6 +6,7 @@
 
 namespace Magento\Sales\Model\Order;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Sales\Model\ResourceModel\Order\Creditmemo as Resource;
 use Magento\Sales\Model\ResourceModel\Metadata;
 use Magento\Sales\Api\Data\CreditmemoSearchResultInterfaceFactory as SearchResultFactory;
@@ -37,16 +38,23 @@ class CreditmemoRepository implements \Magento\Sales\Api\CreditmemoRepositoryInt
      */
     protected $registry = [];
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
+     * CreditmemoRepository constructor.
      * @param Metadata $metadata
      * @param SearchResultFactory $searchResultFactory
+     * @param CollectionProcessorInterface|null $collectionProcessor
      */
     public function __construct(
         Metadata $metadata,
-        SearchResultFactory $searchResultFactory
+        SearchResultFactory $searchResultFactory,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->metadata = $metadata;
         $this->searchResultFactory = $searchResultFactory;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -91,17 +99,10 @@ class CreditmemoRepository implements \Magento\Sales\Api\CreditmemoRepositoryInt
      */
     public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria)
     {
-        /** @var \Magento\Sales\Api\Data\CreditmemoSearchResultInterface $searchResult */
+        /** @var \Magento\Sales\Model\ResourceModel\Order\Creditmemo\Collection $searchResult */
         $searchResult = $this->searchResultFactory->create();
-        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
-            foreach ($filterGroup->getFilters() as $filter) {
-                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-                $searchResult->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
-            }
-        }
+        $this->collectionProcessor->process($searchCriteria, $searchResult);
         $searchResult->setSearchCriteria($searchCriteria);
-        $searchResult->setCurPage($searchCriteria->getCurrentPage());
-        $searchResult->setPageSize($searchCriteria->getPageSize());
         return $searchResult;
     }
 
@@ -140,4 +141,20 @@ class CreditmemoRepository implements \Magento\Sales\Api\CreditmemoRepositoryInt
         }
         return $this->registry[$entity->getEntityId()];
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/Order/Invoice/CommentCreation.php b/app/code/Magento/Sales/Model/Order/Invoice/CommentCreation.php
new file mode 100644
index 0000000000000000000000000000000000000000..fa53f72ebcafcccc24a5e0cbf35b9cf208ec49ad
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Invoice/CommentCreation.php
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Sales\Model\Order\Invoice;
+
+use Magento\Sales\Api\Data\InvoiceCommentCreationInterface;
+
+/**
+ * Class InvoiceCommentCreation
+ */
+class CommentCreation implements InvoiceCommentCreationInterface
+{
+
+    /**
+     * @var string
+     */
+    private $comment;
+
+    /**
+     * @var int
+     */
+    private $isVisibleOnFront;
+
+    /**
+     * @var \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface
+     */
+    private $extensionAttributes;
+
+    /**
+     * Gets the comment for the invoice.
+     *
+     * @return string Comment.
+     */
+    public function getComment()
+    {
+        return $this->comment;
+    }
+
+    /**
+     * Sets the comment for the invoice.
+     *
+     * @param string $comment
+     * @return $this
+     */
+    public function setComment($comment)
+    {
+        $this->comment = $comment;
+        return $this;
+    }
+
+    /**
+     * Gets the is-visible-on-storefront flag value for the invoice.
+     *
+     * @return int Is-visible-on-storefront flag value.
+     */
+    public function getIsVisibleOnFront()
+    {
+        return $this->isVisibleOnFront;
+    }
+
+    /**
+     * Sets the is-visible-on-storefront flag value for the invoice.
+     *
+     * @param int $isVisibleOnFront
+     * @return $this
+     */
+    public function setIsVisibleOnFront($isVisibleOnFront)
+    {
+        $this->isVisibleOnFront = $isVisibleOnFront;
+        return $this;
+    }
+
+    /**
+     * Retrieve existing extension attributes object or create a new one.
+     *
+     * @return \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes()
+    {
+        return $this->extensionAttributes;
+    }
+
+    /**
+     * Set an extension attributes object.
+     *
+     * @param \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\InvoiceCommentCreationExtensionInterface $extensionAttributes
+    ) {
+        $this->extensionAttributes = $extensionAttributes;
+        return $this;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Invoice/InvoiceValidator.php b/app/code/Magento/Sales/Model/Order/Invoice/InvoiceValidator.php
new file mode 100644
index 0000000000000000000000000000000000000000..cbb68edaa8a5508968ce4453973b5631a35768e5
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Invoice/InvoiceValidator.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Invoice;
+
+use Magento\Sales\Api\Data\InvoiceInterface;
+
+/**
+ * Class InvoiceValidatorRunner
+ */
+class InvoiceValidator implements InvoiceValidatorInterface
+{
+    /**
+     * @var \Magento\Sales\Model\Validator
+     */
+    private $validator;
+
+    /**
+     * InvoiceValidatorRunner constructor.
+     * @param \Magento\Sales\Model\Validator $validator
+     */
+    public function __construct(\Magento\Sales\Model\Validator $validator)
+    {
+        $this->validator = $validator;
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function validate(InvoiceInterface $entity, array $validators)
+    {
+        return $this->validator->validate($entity, $validators);
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Invoice/InvoiceValidatorInterface.php b/app/code/Magento/Sales/Model/Order/Invoice/InvoiceValidatorInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..568019a40fce5bc69ccab49ca8b3f4fee048505e
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Invoice/InvoiceValidatorInterface.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Invoice;
+
+use Magento\Sales\Api\Data\InvoiceInterface;
+use Magento\Sales\Exception\DocumentValidationException;
+use Magento\Sales\Model\ValidatorInterface;
+
+/**
+ * Interface InvoiceValidatorInterface
+ */
+interface InvoiceValidatorInterface
+{
+    /**
+     * @param InvoiceInterface $entity
+     * @param ValidatorInterface[] $validators
+     * @return string[]
+     * @throws DocumentValidationException
+     */
+    public function validate(InvoiceInterface $entity, array $validators);
+}
diff --git a/app/code/Magento/Sales/Model/Order/Invoice/ItemCreation.php b/app/code/Magento/Sales/Model/Order/Invoice/ItemCreation.php
index abc19c3aaa73d99550f9157634d315b1053baf1d..26d8d7ae6ca99fd7191fdfaae957d4a067cd1455 100644
--- a/app/code/Magento/Sales/Model/Order/Invoice/ItemCreation.php
+++ b/app/code/Magento/Sales/Model/Order/Invoice/ItemCreation.php
@@ -23,6 +23,11 @@ class ItemCreation implements InvoiceItemCreationInterface
      */
     private $qty;
 
+    /**
+     * @var \Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface
+     */
+    private $extensionAttributes;
+
     /**
      * {@inheritdoc}
      */
@@ -54,4 +59,27 @@ class ItemCreation implements InvoiceItemCreationInterface
     {
         $this->qty = $qty;
     }
+
+    /**
+     * Retrieve existing extension attributes object or create a new one.
+     *
+     * @return \Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes()
+    {
+        return $this->extensionAttributes;
+    }
+
+    /**
+     * Set an extension attributes object.
+     *
+     * @param \Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\InvoiceItemCreationExtensionInterface $extensionAttributes
+    ) {
+        $this->extensionAttributes = $extensionAttributes;
+        return $this;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/Order/InvoiceValidator.php b/app/code/Magento/Sales/Model/Order/InvoiceQuantityValidator.php
similarity index 73%
rename from app/code/Magento/Sales/Model/Order/InvoiceValidator.php
rename to app/code/Magento/Sales/Model/Order/InvoiceQuantityValidator.php
index 35222599fc69ec67f636a6db69949d8d33006655..9ae81dacb0a17408337bec32961da40056ab4a8a 100644
--- a/app/code/Magento/Sales/Model/Order/InvoiceValidator.php
+++ b/app/code/Magento/Sales/Model/Order/InvoiceQuantityValidator.php
@@ -9,42 +9,38 @@ namespace Magento\Sales\Model\Order;
 use Magento\Sales\Api\Data\InvoiceInterface;
 use Magento\Sales\Api\Data\InvoiceItemInterface;
 use Magento\Sales\Api\Data\OrderInterface;
+use Magento\Sales\Api\OrderRepositoryInterface;
+use Magento\Sales\Model\ValidatorInterface;
 
 /**
  * Interface InvoiceValidatorInterface
  */
-class InvoiceValidator implements InvoiceValidatorInterface
+class InvoiceQuantityValidator implements ValidatorInterface
 {
     /**
-     * @var OrderValidatorInterface
+     * @var OrderRepositoryInterface
      */
-    private $orderValidator;
+    private $orderRepository;
 
     /**
      * InvoiceValidator constructor.
-     * @param OrderValidatorInterface $orderValidator
+     * @param OrderRepositoryInterface $orderRepository
      */
-    public function __construct(OrderValidatorInterface $orderValidator)
+    public function __construct(OrderRepositoryInterface $orderRepository)
     {
-        $this->orderValidator = $orderValidator;
+        $this->orderRepository = $orderRepository;
     }
 
     /**
-     * @param InvoiceInterface $invoice
-     * @param OrderInterface $order
-     * @return array
+     * @inheritdoc
      */
-    public function validate(InvoiceInterface $invoice, OrderInterface $order)
+    public function validate($invoice)
     {
-        $messages = $this->checkQtyAvailability($invoice, $order);
-
-        if (!$this->orderValidator->canInvoice($order)) {
-            $messages[] = __(
-                'An invoice cannot be created when an order has a status of %1.',
-                $order->getStatus()
-            );
+        if ($invoice->getOrderId() === null) {
+            return [__('Order Id is required for invoice document')];
         }
-        return $messages;
+        $order = $this->orderRepository->get($invoice->getOrderId());
+        return $this->checkQtyAvailability($invoice, $order);
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Order/InvoiceRepository.php b/app/code/Magento/Sales/Model/Order/InvoiceRepository.php
index 38cd7bdc97f0f740fddb3dbff4df3802fcb61d34..0a22f7d6a0574b7c8eef1cfbf15987bf50297025 100644
--- a/app/code/Magento/Sales/Model/Order/InvoiceRepository.php
+++ b/app/code/Magento/Sales/Model/Order/InvoiceRepository.php
@@ -6,6 +6,7 @@
 
 namespace Magento\Sales\Model\Order;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Sales\Api\InvoiceRepositoryInterface;
 use Magento\Sales\Model\ResourceModel\Metadata;
 use Magento\Framework\Exception\NoSuchEntityException;
@@ -33,18 +34,23 @@ class InvoiceRepository implements InvoiceRepositoryInterface
      */
     protected $searchResultFactory;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
-     * Repository constructor
-     *
+     * InvoiceRepository constructor.
      * @param Metadata $invoiceMetadata
      * @param SearchResultFactory $searchResultFactory
+     * @param CollectionProcessorInterface|null $collectionProcessor
      */
     public function __construct(
         Metadata $invoiceMetadata,
-        SearchResultFactory $searchResultFactory
+        SearchResultFactory $searchResultFactory,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->metadata = $invoiceMetadata;
         $this->searchResultFactory = $searchResultFactory;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -89,15 +95,8 @@ class InvoiceRepository implements InvoiceRepositoryInterface
     {
         /** @var \Magento\Sales\Model\ResourceModel\Order\Invoice\Collection $collection */
         $collection = $this->searchResultFactory->create();
-        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
-            foreach ($filterGroup->getFilters() as $filter) {
-                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-                $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
-            }
-        }
+        $this->collectionProcessor->process($searchCriteria, $collection);
         $collection->setSearchCriteria($searchCriteria);
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
         return $collection;
     }
 
@@ -138,4 +137,20 @@ class InvoiceRepository implements InvoiceRepositoryInterface
         $this->registry[$entity->getEntityId()] = $entity;
         return $this->registry[$entity->getEntityId()];
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/Order/InvoiceValidatorInterface.php b/app/code/Magento/Sales/Model/Order/InvoiceValidatorInterface.php
deleted file mode 100644
index 64b2f98dfe37eb15463d77509a14a9b5a579e043..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/Model/Order/InvoiceValidatorInterface.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-/**
- * Copyright © 2016 Magento. All rights reserved.
- * See COPYING.txt for license details.
- */
-
-namespace Magento\Sales\Model\Order;
-
-use Magento\Sales\Api\Data\InvoiceInterface;
-use Magento\Sales\Api\Data\OrderInterface;
-
-/**
- * Interface InvoiceValidatorInterface
- *
- * @api
- */
-interface InvoiceValidatorInterface
-{
-    /**
-     * @param InvoiceInterface $invoice
-     * @param OrderInterface $order
-     * @return array
-     */
-    public function validate(InvoiceInterface $invoice, OrderInterface $order);
-}
diff --git a/app/code/Magento/Sales/Model/Order/ItemRepository.php b/app/code/Magento/Sales/Model/Order/ItemRepository.php
index 65c53c8d69a644fcfcc5627cd6facdc95bcb2012..8fdeca7eb7d032bd226bcc11f592fb64efbbd4a6 100644
--- a/app/code/Magento/Sales/Model/Order/ItemRepository.php
+++ b/app/code/Magento/Sales/Model/Order/ItemRepository.php
@@ -6,6 +6,7 @@
 namespace Magento\Sales\Model\Order;
 
 use Magento\Catalog\Api\Data\ProductOptionExtensionFactory;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Catalog\Model\ProductOptionFactory;
 use Magento\Catalog\Model\ProductOptionProcessorInterface;
 use Magento\Framework\Api\SearchCriteria;
@@ -60,13 +61,18 @@ class ItemRepository implements OrderItemRepositoryInterface
      */
     protected $registry = [];
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
+     * ItemRepository constructor.
      * @param DataObjectFactory $objectFactory
      * @param Metadata $metadata
      * @param OrderItemSearchResultInterfaceFactory $searchResultFactory
      * @param ProductOptionFactory $productOptionFactory
      * @param ProductOptionExtensionFactory $extensionFactory
      * @param array $processorPool
+     * @param CollectionProcessorInterface|null $collectionProcessor
      */
     public function __construct(
         DataObjectFactory $objectFactory,
@@ -74,7 +80,8 @@ class ItemRepository implements OrderItemRepositoryInterface
         OrderItemSearchResultInterfaceFactory $searchResultFactory,
         ProductOptionFactory $productOptionFactory,
         ProductOptionExtensionFactory $extensionFactory,
-        array $processorPool = []
+        array $processorPool = [],
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->objectFactory = $objectFactory;
         $this->metadata = $metadata;
@@ -82,6 +89,7 @@ class ItemRepository implements OrderItemRepositoryInterface
         $this->productOptionFactory = $productOptionFactory;
         $this->extensionFactory = $extensionFactory;
         $this->processorPool = $processorPool;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -118,17 +126,10 @@ class ItemRepository implements OrderItemRepositoryInterface
      */
     public function getList(SearchCriteria $searchCriteria)
     {
-        /** @var OrderItemSearchResultInterface $searchResult */
+        /** @var \Magento\Sales\Model\ResourceModel\Order\Item\Collection $searchResult */
         $searchResult = $this->searchResultFactory->create();
         $searchResult->setSearchCriteria($searchCriteria);
-
-        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
-            foreach ($filterGroup->getFilters() as $filter) {
-                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-                $searchResult->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
-            }
-        }
-
+        $this->collectionProcessor->process($searchCriteria, $searchResult);
         /** @var OrderItemInterface $orderItem */
         foreach ($searchResult->getItems() as $orderItem) {
             $this->addProductOption($orderItem);
@@ -268,4 +269,20 @@ class ItemRepository implements OrderItemRepositoryInterface
 
         return $request;
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/Order/OrderValidator.php b/app/code/Magento/Sales/Model/Order/OrderValidator.php
index c476671136875658e16185770b223c538e0d4e2f..8208af96c93d34cbae918883047b116713faad98 100644
--- a/app/code/Magento/Sales/Model/Order/OrderValidator.php
+++ b/app/code/Magento/Sales/Model/Order/OrderValidator.php
@@ -3,40 +3,35 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
 namespace Magento\Sales\Model\Order;
 
 use Magento\Sales\Api\Data\OrderInterface;
-use Magento\Sales\Model\Order;
+use Magento\Sales\Exception\DocumentValidationException;
 
 /**
- * Order Validator
- *
+ * Class OrderValidator
  */
 class OrderValidator implements OrderValidatorInterface
 {
     /**
-     * Retrieve order invoice availability
-     *
-     * @param OrderInterface $order
-     * @return bool
+     * @var \Magento\Sales\Model\Validator
+     */
+    private $validator;
+
+    /**
+     * OrderValidator constructor.
+     * @param \Magento\Sales\Model\Validator $validator
+     */
+    public function __construct(\Magento\Sales\Model\Validator $validator)
+    {
+        $this->validator = $validator;
+    }
+
+    /**
+     * @inheritdoc
      */
-    public function canInvoice(OrderInterface $order)
+    public function validate(OrderInterface $entity, array $validators)
     {
-        if ($order->getState() === Order::STATE_PAYMENT_REVIEW ||
-            $order->getState() === Order::STATE_HOLDED ||
-            $order->getState() === Order::STATE_CANCELED ||
-            $order->getState() === Order::STATE_COMPLETE ||
-            $order->getState() === Order::STATE_CLOSED
-        ) {
-            return false;
-        };
-        /** @var \Magento\Sales\Model\Order\Item $item */
-        foreach ($order->getItems() as $item) {
-            if ($item->getQtyToInvoice() > 0 && !$item->getLockedDoInvoice()) {
-                return true;
-            }
-        }
-        return false;
+        return $this->validator->validate($entity, $validators);
     }
 }
diff --git a/app/code/Magento/Sales/Model/Order/OrderValidatorInterface.php b/app/code/Magento/Sales/Model/Order/OrderValidatorInterface.php
index d0dcc38af642a7633af1b3ec4de124bc140c9497..c5a9a6c1d32963fcc223099efe1fcb81bb530464 100644
--- a/app/code/Magento/Sales/Model/Order/OrderValidatorInterface.php
+++ b/app/code/Magento/Sales/Model/Order/OrderValidatorInterface.php
@@ -3,21 +3,22 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
 namespace Magento\Sales\Model\Order;
 
 use Magento\Sales\Api\Data\OrderInterface;
+use Magento\Sales\Exception\DocumentValidationException;
+use Magento\Sales\Model\ValidatorInterface;
 
 /**
  * Interface OrderValidatorInterface
- *
- * @api
  */
 interface OrderValidatorInterface
 {
     /**
-     * @param OrderInterface $order
-     * @return bool
+     * @param OrderInterface $entity
+     * @param ValidatorInterface[] $validators
+     * @return string[]
+     * @throws DocumentValidationException
      */
-    public function canInvoice(OrderInterface $order);
+    public function validate(OrderInterface $entity, array $validators);
 }
diff --git a/app/code/Magento/Sales/Model/Order/Payment/Repository.php b/app/code/Magento/Sales/Model/Order/Payment/Repository.php
index c4a1cea24da6ded8fc6377c1647941a4aa94d314..0412562823746b2c02e0f2c757ef6fedf8a5feae 100644
--- a/app/code/Magento/Sales/Model/Order/Payment/Repository.php
+++ b/app/code/Magento/Sales/Model/Order/Payment/Repository.php
@@ -7,6 +7,7 @@
 namespace Magento\Sales\Model\Order\Payment;
 
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Sales\Api\OrderPaymentRepositoryInterface;
 use Magento\Sales\Model\ResourceModel\Metadata;
@@ -34,14 +35,22 @@ class Repository implements OrderPaymentRepositoryInterface
      */
     protected $searchResultFactory;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
      * @param Metadata $metaData
      * @param SearchResultFactory $searchResultFactory
+     * @param CollectionProcessorInterface $collectionProcessor
      */
-    public function __construct(Metadata $metaData, SearchResultFactory $searchResultFactory)
-    {
+    public function __construct(
+        Metadata $metaData,
+        SearchResultFactory $searchResultFactory,
+        CollectionProcessorInterface $collectionProcessor = null
+    ) {
         $this->metaData = $metaData;
         $this->searchResultFactory = $searchResultFactory;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -54,14 +63,8 @@ class Repository implements OrderPaymentRepositoryInterface
     {
         /** @var \Magento\Sales\Model\ResourceModel\Order\Payment\Collection $collection */
         $collection = $this->searchResultFactory->create();
-        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
-            foreach ($filterGroup->getFilters() as $filter) {
-                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-                $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
-            }
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
+        $collection->setSearchCriteria($searchCriteria);
+        $this->collectionProcessor->process($searchCriteria, $collection);
         return $collection;
     }
 
@@ -121,4 +124,20 @@ class Repository implements OrderPaymentRepositoryInterface
     {
         return $this->metaData->getNewInstance();
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php b/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php
index 687260cb185ccbdc0f04eacfe843e94d0f0c70a4..c6dc2ceb9e81ca9cb8e4ed1240207eb2150bb21a 100644
--- a/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php
+++ b/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php
@@ -7,6 +7,7 @@
 namespace Magento\Sales\Model\Order\Payment\Transaction;
 
 use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Api\SearchCriteriaBuilder;
 use Magento\Framework\Api\SortOrderBuilder;
 use Magento\Framework\Data\Collection;
@@ -60,15 +61,18 @@ class Repository implements TransactionRepositoryInterface
      */
     private $entityStorage;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
-     * Repository constructor
-     *
+     * Repository constructor.
      * @param SearchResultFactory $searchResultFactory
      * @param FilterBuilder $filterBuilder
      * @param SearchCriteriaBuilder $searchCriteriaBuilder
      * @param SortOrderBuilder $sortOrderBuilder
      * @param Metadata $metaData
      * @param EntityStorageFactory $entityStorageFactory
+     * @param CollectionProcessorInterface|null $collectionProcessor
      */
     public function __construct(
         SearchResultFactory $searchResultFactory,
@@ -76,7 +80,8 @@ class Repository implements TransactionRepositoryInterface
         SearchCriteriaBuilder $searchCriteriaBuilder,
         SortOrderBuilder $sortOrderBuilder,
         Metadata $metaData,
-        EntityStorageFactory $entityStorageFactory
+        EntityStorageFactory $entityStorageFactory,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->searchResultFactory = $searchResultFactory;
         $this->filterBuilder = $filterBuilder;
@@ -84,6 +89,7 @@ class Repository implements TransactionRepositoryInterface
         $this->sortOrderBuilder = $sortOrderBuilder;
         $this->metaData = $metaData;
         $this->entityStorage = $entityStorageFactory->create();
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -118,11 +124,11 @@ class Repository implements TransactionRepositoryInterface
         $cacheStorage = 'txn_type';
         $entity = $this->entityStorage->getByIdentifyingFields($identityFieldsForCache, $cacheStorage);
         if (!$entity) {
-            $filters[] = $this->filterBuilder
+            $typeFilter = $this->filterBuilder
                 ->setField(TransactionInterface::TXN_TYPE)
                 ->setValue($transactionType)
                 ->create();
-            $filters[] = $this->filterBuilder
+            $idFilter = $this->filterBuilder
                 ->setField(TransactionInterface::PAYMENT_ID)
                 ->setValue($paymentId)
                 ->create();
@@ -137,7 +143,8 @@ class Repository implements TransactionRepositoryInterface
             $entity = current(
                 $this->getList(
                     $this->searchCriteriaBuilder
-                        ->addFilters($filters)
+                        ->addFilters([$typeFilter])
+                        ->addFilters([$idFilter])
                         ->addSortOrder($transactionIdSort)
                         ->addSortOrder($createdAtSort)
                         ->create()
@@ -187,15 +194,8 @@ class Repository implements TransactionRepositoryInterface
     {
         /** @var TransactionResource\Collection $collection */
         $collection = $this->searchResultFactory->create();
-        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
-            foreach ($filterGroup->getFilters() as $filter) {
-                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-                $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
-            }
-        }
         $collection->setSearchCriteria($searchCriteria);
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
+        $this->collectionProcessor->process($searchCriteria, $collection);
         $collection->addPaymentInformation(['method']);
         $collection->addOrderInformation(['increment_id']);
         return $collection;
@@ -230,4 +230,20 @@ class Repository implements TransactionRepositoryInterface
     {
         return $this->metaData->getNewInstance();
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/Order/Shipment.php b/app/code/Magento/Sales/Model/Order/Shipment.php
index 6647bae750fffebc8a28ca09102b596336badd7f..2277f92d6e0e8be638c919f02dfc13d1054fb819 100644
--- a/app/code/Magento/Sales/Model/Order/Shipment.php
+++ b/app/code/Magento/Sales/Model/Order/Shipment.php
@@ -405,7 +405,7 @@ class Shipment extends AbstractModel implements EntityInterface, ShipmentInterfa
      * Adds comment to shipment with additional possibility to send it to customer via email
      * and show it in customer account
      *
-     * @param \Magento\Sales\Model\Order\Shipment\Comment $comment
+     * @param \Magento\Sales\Model\Order\Shipment\Comment|string $comment
      * @param bool $notify
      * @param bool $visibleOnFront
      * @return $this
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/CommentCreation.php b/app/code/Magento/Sales/Model/Order/Shipment/CommentCreation.php
new file mode 100644
index 0000000000000000000000000000000000000000..19d06fb0eff3275a41ccd2d0c9cc42e77c0436c7
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/CommentCreation.php
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+use Magento\Sales\Api\Data\ShipmentCommentCreationInterface;
+
+/**
+ * Class CommentCreation
+ */
+class CommentCreation implements ShipmentCommentCreationInterface
+{
+    /**
+     * @var \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface
+     */
+    private $extensionAttributes;
+
+    /**
+     * @var string
+     */
+    private $comment;
+
+    /**
+     * @var int
+     */
+    private $isVisibleOnFront;
+
+    /**
+     * Retrieve existing extension attributes object or create a new one.
+     *
+     * @return \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes()
+    {
+        return $this->extensionAttributes;
+    }
+
+    /**
+     * Set an extension attributes object.
+     *
+     * @param \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentCommentCreationExtensionInterface $extensionAttributes
+    ) {
+        $this->extensionAttributes = $extensionAttributes;
+        return $this;
+    }
+
+    /**
+     * Gets the comment for the invoice.
+     *
+     * @return string Comment.
+     */
+    public function getComment()
+    {
+        return $this->comment;
+    }
+
+    /**
+     * Sets the comment for the invoice.
+     *
+     * @param string $comment
+     * @return $this
+     */
+    public function setComment($comment)
+    {
+        $this->comment = $comment;
+        return $this;
+    }
+
+    /**
+     * Gets the is-visible-on-storefront flag value for the invoice.
+     *
+     * @return int Is-visible-on-storefront flag value.
+     */
+    public function getIsVisibleOnFront()
+    {
+        return $this->isVisibleOnFront;
+    }
+
+    /**
+     * Sets the is-visible-on-storefront flag value for the invoice.
+     *
+     * @param int $isVisibleOnFront
+     * @return $this
+     */
+    public function setIsVisibleOnFront($isVisibleOnFront)
+    {
+        $this->isVisibleOnFront = $isVisibleOnFront;
+        return $this;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/CreationArguments.php b/app/code/Magento/Sales/Model/Order/Shipment/CreationArguments.php
new file mode 100644
index 0000000000000000000000000000000000000000..8a43a73553e79ab7887995c3a691263ff86c7cd6
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/CreationArguments.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+/**
+ * Creation arguments for Shipment.
+ *
+ * @api
+ */
+class CreationArguments implements \Magento\Sales\Api\Data\ShipmentCreationArgumentsInterface
+{
+    /**
+     * @var \Magento\Sales\Api\Data\ShipmentCreationArgumentsExtensionInterface
+     */
+    private $extensionAttributes;
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getExtensionAttributes()
+    {
+        return $this->extensionAttributes;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentCreationArgumentsExtensionInterface $extensionAttributes
+    ) {
+        $this->extensionAttributes = $extensionAttributes;
+        return $this;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Item.php b/app/code/Magento/Sales/Model/Order/Shipment/Item.php
index c7fdca853b17e366e9a64201623b5f68697c8381..8627f76031b06657d2d727b5261a89cc261ea6e1 100644
--- a/app/code/Magento/Sales/Model/Order/Shipment/Item.php
+++ b/app/code/Magento/Sales/Model/Order/Shipment/Item.php
@@ -151,22 +151,7 @@ class Item extends AbstractModel implements ShipmentItemInterface
      */
     public function setQty($qty)
     {
-        if ($this->getOrderItem()->getIsQtyDecimal()) {
-            $qty = (double)$qty;
-        } else {
-            $qty = (int)$qty;
-        }
-        $qty = $qty > 0 ? $qty : 0;
-        /**
-         * Check qty availability
-         */
-        if ($qty <= $this->getOrderItem()->getQtyToShip() || $this->getOrderItem()->isDummy(true)) {
-            $this->setData('qty', $qty);
-        } else {
-            throw new \Magento\Framework\Exception\LocalizedException(
-                __('We found an invalid quantity to ship for item "%1".', $this->getName())
-            );
-        }
+        $this->setData('qty', $qty);
         return $this;
     }
 
@@ -174,6 +159,7 @@ class Item extends AbstractModel implements ShipmentItemInterface
      * Applying qty to order item
      *
      * @return $this
+     * @throws \Magento\Framework\Exception\LocalizedException
      */
     public function register()
     {
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/ItemCreation.php b/app/code/Magento/Sales/Model/Order/Shipment/ItemCreation.php
new file mode 100644
index 0000000000000000000000000000000000000000..e3cb2f23d7cf31e81a737fa06c64b89d1d11d796
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/ItemCreation.php
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+use Magento\Sales\Api\Data\ShipmentItemCreationInterface;
+
+/**
+ * Class ItemCreation
+ */
+class ItemCreation implements ShipmentItemCreationInterface
+{
+    /**
+     * @var int
+     */
+    private $orderItemId;
+
+    /**
+     * @var float
+     */
+    private $qty;
+
+    /**
+     * @var \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface
+     */
+    private $extensionAttributes;
+
+    //@codeCoverageIgnoreStart
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getOrderItemId()
+    {
+        return $this->orderItemId;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setOrderItemId($orderItemId)
+    {
+        $this->orderItemId = $orderItemId;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getQty()
+    {
+        return $this->qty;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setQty($qty)
+    {
+        $this->qty = $qty;
+    }
+
+    /**
+     * {@inheritdoc}
+     *
+     * @return \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface|null
+     */
+    public function getExtensionAttributes()
+    {
+        return $this->extensionAttributes;
+    }
+
+    /**
+     * {@inheritdoc}
+     *
+     * @param \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface $extensionAttributes
+     * @return $this
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentItemCreationExtensionInterface $extensionAttributes
+    ) {
+        $this->extensionAttributes = $extensionAttributes;
+        return $this;
+    }
+    //@codeCoverageIgnoreEnd
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Notifier.php b/app/code/Magento/Sales/Model/Order/Shipment/Notifier.php
new file mode 100644
index 0000000000000000000000000000000000000000..21dd5ad4a58f62ad2b77143e373f9e0f19c3bc66
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/Notifier.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+/**
+ * Shipment notifier.
+ *
+ * @api
+ */
+class Notifier implements \Magento\Sales\Model\Order\Shipment\NotifierInterface
+{
+    /**
+     * @var \Magento\Sales\Model\Order\Shipment\SenderInterface[]
+     */
+    private $senders;
+
+    /**
+     * @param \Magento\Sales\Model\Order\Shipment\SenderInterface[] $senders
+     */
+    public function __construct(array $senders = [])
+    {
+        $this->senders = $senders;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function notify(
+        \Magento\Sales\Api\Data\OrderInterface $order,
+        \Magento\Sales\Api\Data\ShipmentInterface $shipment,
+        \Magento\Sales\Api\Data\ShipmentCommentCreationInterface $comment = null,
+        $forceSyncMode = false
+    ) {
+        foreach ($this->senders as $sender) {
+            $sender->send($order, $shipment, $comment, $forceSyncMode);
+        }
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/NotifierInterface.php b/app/code/Magento/Sales/Model/Order/Shipment/NotifierInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..f34eb6178d09468de16f48fba3a717de3b22091a
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/NotifierInterface.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+/**
+ * Interface for Shipment notifier.
+ *
+ * @api
+ */
+interface NotifierInterface
+{
+    /**
+     * Notifies customer.
+     *
+     * @param \Magento\Sales\Api\Data\OrderInterface $order
+     * @param \Magento\Sales\Api\Data\ShipmentInterface $shipment
+     * @param \Magento\Sales\Api\Data\ShipmentCommentCreationInterface|null $comment
+     * @param bool $forceSyncMode
+     *
+     * @return void
+     */
+    public function notify(
+        \Magento\Sales\Api\Data\OrderInterface $order,
+        \Magento\Sales\Api\Data\ShipmentInterface $shipment,
+        \Magento\Sales\Api\Data\ShipmentCommentCreationInterface $comment = null,
+        $forceSyncMode = false
+    );
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/OrderRegistrar.php b/app/code/Magento/Sales/Model/Order/Shipment/OrderRegistrar.php
new file mode 100644
index 0000000000000000000000000000000000000000..040ab12949be1748638cd7e83ff8c971b7e34161
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/OrderRegistrar.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+use Magento\Sales\Api\Data\OrderInterface;
+use Magento\Sales\Api\Data\ShipmentInterface;
+
+class OrderRegistrar implements \Magento\Sales\Model\Order\Shipment\OrderRegistrarInterface
+{
+    /**
+     * @param OrderInterface $order
+     * @param ShipmentInterface $shipment
+     * @return OrderInterface
+     */
+    public function register(OrderInterface $order, ShipmentInterface $shipment)
+    {
+        /** @var  \Magento\Sales\Api\Data\ShipmentItemInterface|\Magento\Sales\Model\Order\Shipment\Item $item */
+        foreach ($shipment->getItems() as $item) {
+            if ($item->getQty() > 0) {
+                $item->register();
+            }
+        }
+        return $order;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/OrderRegistrarInterface.php b/app/code/Magento/Sales/Model/Order/Shipment/OrderRegistrarInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..7d54acece35997efcb2db7c62a9fb92c42cd4788
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/OrderRegistrarInterface.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+use Magento\Sales\Api\Data\OrderInterface;
+use Magento\Sales\Api\Data\ShipmentInterface;
+
+/**
+ * Interface OrderRegistrarInterface
+ *
+ * Calculate order shipped data based on created shipment
+ *
+ * @api
+ */
+interface OrderRegistrarInterface
+{
+    /**
+     * @param OrderInterface $order
+     * @param ShipmentInterface $shipment
+     * @return OrderInterface
+     */
+    public function register(OrderInterface $order, ShipmentInterface $shipment);
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Package.php b/app/code/Magento/Sales/Model/Order/Shipment/Package.php
new file mode 100644
index 0000000000000000000000000000000000000000..6f8f54336a2c5b989ef7728866d8b18039c492f4
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/Package.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+/**
+ * Class Package
+ * @api
+ */
+class Package implements \Magento\Sales\Api\Data\ShipmentPackageInterface
+{
+    /**
+     * @var \Magento\Sales\Api\Data\ShipmentPackageExtensionInterface
+     */
+    private $extensionAttributes;
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getExtensionAttributes()
+    {
+        return $this->extensionAttributes;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentPackageExtensionInterface $extensionAttributes
+    ) {
+        $this->extensionAttributes = $extensionAttributes;
+        return $this;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/PackageCreation.php b/app/code/Magento/Sales/Model/Order/Shipment/PackageCreation.php
new file mode 100644
index 0000000000000000000000000000000000000000..50ad944b8251c62a6df8af329839d58a49d8827d
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/PackageCreation.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+/**
+ * Class PackageCreation
+ * @api
+ */
+class PackageCreation implements \Magento\Sales\Api\Data\ShipmentPackageCreationInterface
+{
+    /**
+     * @var \Magento\Sales\Api\Data\ShipmentPackageCreationExtensionInterface
+     */
+    private $extensionAttributes;
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getExtensionAttributes()
+    {
+        return $this->extensionAttributes;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentPackageCreationExtensionInterface $extensionAttributes
+    ) {
+        $this->extensionAttributes = $extensionAttributes;
+        return $this;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Sender/EmailSender.php b/app/code/Magento/Sales/Model/Order/Shipment/Sender/EmailSender.php
new file mode 100644
index 0000000000000000000000000000000000000000..228a45ff16aaef74de124cbd24041d1e27227112
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/Sender/EmailSender.php
@@ -0,0 +1,149 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment\Sender;
+
+use Magento\Sales\Model\Order\Email\Sender;
+use Magento\Sales\Model\Order\Shipment\SenderInterface;
+
+/**
+ * Email notification sender for Shipment.
+ */
+class EmailSender extends Sender implements SenderInterface
+{
+    /**
+     * @var \Magento\Payment\Helper\Data
+     */
+    private $paymentHelper;
+
+    /**
+     * @var \Magento\Sales\Model\ResourceModel\Order\Shipment
+     */
+    private $shipmentResource;
+
+    /**
+     * @var \Magento\Framework\App\Config\ScopeConfigInterface
+     */
+    private $globalConfig;
+
+    /**
+     * @var \Magento\Framework\Event\ManagerInterface
+     */
+    private $eventManager;
+
+    /**
+     * @param \Magento\Sales\Model\Order\Email\Container\Template $templateContainer
+     * @param \Magento\Sales\Model\Order\Email\Container\ShipmentIdentity $identityContainer
+     * @param \Magento\Sales\Model\Order\Email\SenderBuilderFactory $senderBuilderFactory
+     * @param \Psr\Log\LoggerInterface $logger
+     * @param \Magento\Sales\Model\Order\Address\Renderer $addressRenderer
+     * @param \Magento\Payment\Helper\Data $paymentHelper
+     * @param \Magento\Sales\Model\ResourceModel\Order\Shipment $shipmentResource
+     * @param \Magento\Framework\App\Config\ScopeConfigInterface $globalConfig
+     * @param \Magento\Framework\Event\ManagerInterface $eventManager
+     */
+    public function __construct(
+        \Magento\Sales\Model\Order\Email\Container\Template $templateContainer,
+        \Magento\Sales\Model\Order\Email\Container\ShipmentIdentity $identityContainer,
+        \Magento\Sales\Model\Order\Email\SenderBuilderFactory $senderBuilderFactory,
+        \Psr\Log\LoggerInterface $logger,
+        \Magento\Sales\Model\Order\Address\Renderer $addressRenderer,
+        \Magento\Payment\Helper\Data $paymentHelper,
+        \Magento\Sales\Model\ResourceModel\Order\Shipment $shipmentResource,
+        \Magento\Framework\App\Config\ScopeConfigInterface $globalConfig,
+        \Magento\Framework\Event\ManagerInterface $eventManager
+    ) {
+        parent::__construct(
+            $templateContainer,
+            $identityContainer,
+            $senderBuilderFactory,
+            $logger,
+            $addressRenderer
+        );
+
+        $this->paymentHelper = $paymentHelper;
+        $this->shipmentResource = $shipmentResource;
+        $this->globalConfig = $globalConfig;
+        $this->eventManager = $eventManager;
+    }
+
+    /**
+     * Sends order shipment email to the customer.
+     *
+     * Email will be sent immediately in two cases:
+     *
+     * - if asynchronous email sending is disabled in global settings
+     * - if $forceSyncMode parameter is set to TRUE
+     *
+     * Otherwise, email will be sent later during running of
+     * corresponding cron job.
+     *
+     * @param \Magento\Sales\Api\Data\OrderInterface $order
+     * @param \Magento\Sales\Api\Data\ShipmentInterface $shipment
+     * @param \Magento\Sales\Api\Data\ShipmentCommentCreationInterface|null $comment
+     * @param bool $forceSyncMode
+     *
+     * @return bool
+     */
+    public function send(
+        \Magento\Sales\Api\Data\OrderInterface $order,
+        \Magento\Sales\Api\Data\ShipmentInterface $shipment,
+        \Magento\Sales\Api\Data\ShipmentCommentCreationInterface $comment = null,
+        $forceSyncMode = false
+    ) {
+        $shipment->setSendEmail(true);
+
+        if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
+            $transport = [
+                'order' => $order,
+                'shipment' => $shipment,
+                'comment' => $comment ? $comment->getComment() : '',
+                'billing' => $order->getBillingAddress(),
+                'payment_html' => $this->getPaymentHtml($order),
+                'store' => $order->getStore(),
+                'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
+                'formattedBillingAddress' => $this->getFormattedBillingAddress($order)
+            ];
+
+            $this->eventManager->dispatch(
+                'email_shipment_set_template_vars_before',
+                ['sender' => $this, 'transport' => $transport]
+            );
+
+            $this->templateContainer->setTemplateVars($transport);
+
+            if ($this->checkAndSend($order)) {
+                $shipment->setEmailSent(true);
+
+                $this->shipmentResource->saveAttribute($shipment, ['send_email', 'email_sent']);
+
+                return true;
+            }
+        } else {
+            $shipment->setEmailSent(null);
+
+            $this->shipmentResource->saveAttribute($shipment, 'email_sent');
+        }
+
+        $this->shipmentResource->saveAttribute($shipment, 'send_email');
+
+        return false;
+    }
+
+    /**
+     * Returns payment info block as HTML.
+     *
+     * @param \Magento\Sales\Api\Data\OrderInterface $order
+     *
+     * @return string
+     */
+    private function getPaymentHtml(\Magento\Sales\Api\Data\OrderInterface $order)
+    {
+        return $this->paymentHelper->getInfoBlockHtml(
+            $order->getPayment(),
+            $this->identityContainer->getStore()->getStoreId()
+        );
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/SenderInterface.php b/app/code/Magento/Sales/Model/Order/Shipment/SenderInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..a030038b7b139a65ebc38fd5f9fb2c1a76f8a188
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/SenderInterface.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+/**
+ * Interface for notification sender for Shipment.
+ */
+interface SenderInterface
+{
+    /**
+     * Sends notification to a customer.
+     *
+     * @param \Magento\Sales\Api\Data\OrderInterface $order
+     * @param \Magento\Sales\Api\Data\ShipmentInterface $shipment
+     * @param \Magento\Sales\Api\Data\ShipmentCommentCreationInterface|null $comment
+     * @param bool $forceSyncMode
+     *
+     * @return bool
+     */
+    public function send(
+        \Magento\Sales\Api\Data\OrderInterface $order,
+        \Magento\Sales\Api\Data\ShipmentInterface $shipment,
+        \Magento\Sales\Api\Data\ShipmentCommentCreationInterface $comment = null,
+        $forceSyncMode = false
+    );
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/ShipmentValidator.php b/app/code/Magento/Sales/Model/Order/Shipment/ShipmentValidator.php
new file mode 100644
index 0000000000000000000000000000000000000000..816551b8b322c126d82795349a4ba081598a955c
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/ShipmentValidator.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+use Magento\Sales\Api\Data\ShipmentInterface;
+
+/**
+ * Class ShipmentValidator
+ */
+class ShipmentValidator implements ShipmentValidatorInterface
+{
+    /**
+     * @var \Magento\Sales\Model\Validator
+     */
+    private $validator;
+
+    /**
+     * ShipmentValidator constructor.
+     * @param \Magento\Sales\Model\Validator $validator
+     */
+    public function __construct(\Magento\Sales\Model\Validator $validator)
+    {
+        $this->validator = $validator;
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function validate(ShipmentInterface $entity, array $validators)
+    {
+        return $this->validator->validate($entity, $validators);
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/ShipmentValidatorInterface.php b/app/code/Magento/Sales/Model/Order/Shipment/ShipmentValidatorInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..198a4019bf6b898e0c85fd2e2ff7c7ff77c2a9f6
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/ShipmentValidatorInterface.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+use Magento\Sales\Api\Data\ShipmentInterface;
+use Magento\Sales\Exception\DocumentValidationException;
+use Magento\Sales\Model\ValidatorInterface;
+
+/**
+ * Interface ShipmentValidatorInterface
+ */
+interface ShipmentValidatorInterface
+{
+    /**
+     * @param ShipmentInterface $shipment
+     * @param ValidatorInterface[] $validators
+     * @return string[]
+     * @throws DocumentValidationException
+     */
+    public function validate(ShipmentInterface $shipment, array $validators);
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/TrackCreation.php b/app/code/Magento/Sales/Model/Order/Shipment/TrackCreation.php
new file mode 100644
index 0000000000000000000000000000000000000000..6e8ce097f411d91794ea07ce904851bce725f169
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/TrackCreation.php
@@ -0,0 +1,107 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment;
+
+use Magento\Sales\Api\Data\ShipmentTrackCreationInterface;
+
+/**
+ * Class TrackCreation
+ */
+class TrackCreation implements ShipmentTrackCreationInterface
+{
+    /**
+     * @var string
+     */
+    private $trackNumber;
+
+    /**
+     * @var string
+     */
+    private $title;
+
+    /**
+     * @var string
+     */
+    private $carrierCode;
+
+    /**
+     * @var \Magento\Sales\Api\Data\ShipmentTrackCreationExtensionInterface
+     */
+    private $extensionAttributes;
+
+    //@codeCoverageIgnoreStart
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getTrackNumber()
+    {
+        return $this->trackNumber;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setTrackNumber($trackNumber)
+    {
+        $this->trackNumber = $trackNumber;
+        return $this;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getTitle()
+    {
+        return $this->title;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setTitle($title)
+    {
+        $this->title = $title;
+        return $this;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getCarrierCode()
+    {
+        return $this->carrierCode;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setCarrierCode($carrierCode)
+    {
+        $this->carrierCode = $carrierCode;
+        return $this;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getExtensionAttributes()
+    {
+        return $this->extensionAttributes;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setExtensionAttributes(
+        \Magento\Sales\Api\Data\ShipmentTrackCreationExtensionInterface $extensionAttributes
+    ) {
+        $this->extensionAttributes = $extensionAttributes;
+        return $this;
+    }
+
+    //@codeCoverageIgnoreEnd
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Validation/QuantityValidator.php b/app/code/Magento/Sales/Model/Order/Shipment/Validation/QuantityValidator.php
new file mode 100644
index 0000000000000000000000000000000000000000..20e3712d889ed249ebca9fbbab0945d37a8cb8cf
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/Validation/QuantityValidator.php
@@ -0,0 +1,108 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment\Validation;
+
+use Magento\Framework\Exception\NoSuchEntityException;
+use Magento\Sales\Api\Data\OrderInterface;
+use Magento\Sales\Api\Data\OrderItemInterface;
+use Magento\Sales\Api\Data\ShipmentInterface;
+use Magento\Sales\Api\OrderRepositoryInterface;
+use Magento\Sales\Exception\DocumentValidationException;
+use Magento\Sales\Model\Order\Item;
+use Magento\Sales\Model\ValidatorInterface;
+
+/**
+ * Class QuantityValidator
+ */
+class QuantityValidator implements ValidatorInterface
+{
+    /**
+     * @var OrderRepositoryInterface
+     */
+    private $orderRepository;
+
+    /**
+     * InvoiceValidator constructor.
+     * @param OrderRepositoryInterface $orderRepository
+     */
+    public function __construct(
+        OrderRepositoryInterface $orderRepository
+    ) {
+        $this->orderRepository = $orderRepository;
+    }
+
+    /**
+     * @param ShipmentInterface $entity
+     * @return array
+     * @throws DocumentValidationException
+     * @throws NoSuchEntityException
+     */
+    public function validate($entity)
+    {
+        if ($entity->getOrderId() === null) {
+            return [__('Order Id is required for shipment document')];
+        }
+
+        if (empty($entity->getItems())) {
+            return [__('You can\'t create a shipment without products.')];
+        }
+        $messages = [];
+
+        $order = $this->orderRepository->get($entity->getOrderId());
+        $orderItemsById = $this->getOrderItems($order);
+
+        $totalQuantity = 0;
+        foreach ($entity->getItems() as $item) {
+            if (!isset($orderItemsById[$item->getOrderItemId()])) {
+                $messages[] = __(
+                    'The shipment contains product SKU "%1" that is not part of the original order.',
+                    $item->getSku()
+                );
+                continue;
+            }
+            $orderItem = $orderItemsById[$item->getOrderItemId()];
+
+            if (!$this->isQtyAvailable($orderItem, $item->getQty())) {
+                $messages[] =__(
+                    'The quantity to ship must not be greater than the unshipped quantity'
+                    . ' for product SKU "%1".',
+                    $orderItem->getSku()
+                );
+            } else {
+                $totalQuantity += $item->getQty();
+            }
+        }
+        if ($totalQuantity <= 0) {
+            $messages[] = __('You can\'t create a shipment without products.');
+        }
+
+        return $messages;
+    }
+
+    /**
+     * @param OrderInterface $order
+     * @return OrderItemInterface[]
+     */
+    private function getOrderItems(OrderInterface $order)
+    {
+        $orderItemsById = [];
+        foreach ($order->getItems() as $item) {
+            $orderItemsById[$item->getItemId()] = $item;
+        }
+
+        return $orderItemsById;
+    }
+
+    /**
+     * @param Item $orderItem
+     * @param int $qty
+     * @return bool
+     */
+    private function isQtyAvailable(Item $orderItem, $qty)
+    {
+        return $qty <= $orderItem->getQtyToShip() || $orderItem->isDummy(true);
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Validation/TrackValidator.php b/app/code/Magento/Sales/Model/Order/Shipment/Validation/TrackValidator.php
new file mode 100644
index 0000000000000000000000000000000000000000..55970d37c597d7af6d0369e26b2085ab431108ed
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Shipment/Validation/TrackValidator.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Shipment\Validation;
+
+use Magento\Sales\Api\Data\ShipmentInterface;
+use Magento\Sales\Model\ValidatorInterface;
+
+/**
+ * Class TrackRequiredField
+ */
+class TrackValidator implements ValidatorInterface
+{
+    /**
+     * @param object|ShipmentInterface $entity
+     * @return array
+     */
+    public function validate($entity)
+    {
+        $messages = [];
+        if (!$entity->getTracks()) {
+            return $messages;
+        }
+        foreach ($entity->getTracks() as $track) {
+            if (!$track->getTrackNumber()) {
+                $messages[] = __('Please enter a tracking number.');
+            }
+        }
+        return $messages;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/ShipmentDocumentFactory.php b/app/code/Magento/Sales/Model/Order/ShipmentDocumentFactory.php
new file mode 100644
index 0000000000000000000000000000000000000000..d10f84d8155432954ec95c75f9b49108767f2dd3
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/ShipmentDocumentFactory.php
@@ -0,0 +1,128 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order;
+
+use Magento\Sales\Api\Data\ShipmentInterface;
+use Magento\Sales\Api\Data\ShipmentItemCreationInterface;
+use Magento\Sales\Api\Data\ShipmentPackageCreationInterface;
+use Magento\Sales\Api\Data\ShipmentTrackCreationInterface;
+use Magento\Framework\EntityManager\HydratorPool;
+use Magento\Sales\Model\Order\Shipment\TrackFactory;
+use Magento\Sales\Api\Data\OrderInterface;
+use Magento\Sales\Api\Data\ShipmentCommentCreationInterface;
+use Magento\Sales\Api\Data\ShipmentCreationArgumentsInterface;
+
+/**
+ * Class ShipmentDocumentFactory
+ *
+ * @api
+ */
+class ShipmentDocumentFactory
+{
+    /**
+     * @var ShipmentFactory
+     */
+    private $shipmentFactory;
+
+    /**
+     * @var TrackFactory
+     */
+    private $trackFactory;
+
+    /**
+     * @var HydratorPool
+     */
+    private $hydratorPool;
+
+    /**
+     * ShipmentDocumentFactory constructor.
+     *
+     * @param ShipmentFactory $shipmentFactory
+     * @param HydratorPool $hydratorPool
+     * @param TrackFactory $trackFactory
+     */
+    public function __construct(
+        ShipmentFactory $shipmentFactory,
+        HydratorPool $hydratorPool,
+        TrackFactory $trackFactory
+    ) {
+        $this->shipmentFactory = $shipmentFactory;
+        $this->trackFactory = $trackFactory;
+        $this->hydratorPool = $hydratorPool;
+    }
+
+    /**
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     *
+     * @param OrderInterface $order
+     * @param ShipmentItemCreationInterface[] $items
+     * @param ShipmentTrackCreationInterface[] $tracks
+     * @param ShipmentCommentCreationInterface|null $comment
+     * @param bool $appendComment
+     * @param ShipmentPackageCreationInterface[] $packages
+     * @param ShipmentCreationArgumentsInterface|null $arguments
+     * @return ShipmentInterface
+     */
+    public function create(
+        OrderInterface $order,
+        array $items = [],
+        array $tracks = [],
+        ShipmentCommentCreationInterface $comment = null,
+        $appendComment = false,
+        array $packages = [],
+        ShipmentCreationArgumentsInterface $arguments = null
+    ) {
+        $shipmentItems = $this->itemsToArray($items);
+        /** @var Shipment $shipment */
+        $shipment = $this->shipmentFactory->create(
+            $order,
+            $shipmentItems
+        );
+        $this->prepareTracks($shipment, $tracks);
+        if ($comment) {
+            $shipment->addComment(
+                $comment->getComment(),
+                $appendComment,
+                $comment->getIsVisibleOnFront()
+            );
+        }
+
+        return $shipment;
+    }
+
+    /**
+     * Adds tracks to the shipment.
+     *
+     * @param ShipmentInterface $shipment
+     * @param ShipmentTrackCreationInterface[] $tracks
+     * @return ShipmentInterface
+     */
+    private function prepareTracks(\Magento\Sales\Api\Data\ShipmentInterface $shipment, array $tracks)
+    {
+        foreach ($tracks as $track) {
+            $hydrator = $this->hydratorPool->getHydrator(
+                \Magento\Sales\Api\Data\ShipmentTrackCreationInterface::class
+            );
+            $shipment->addTrack($this->trackFactory->create(['data' => $hydrator->extract($track)]));
+        }
+        return $shipment;
+    }
+
+    /**
+     * Convert items to array
+     *
+     * @param ShipmentItemCreationInterface[] $items
+     * @return array
+     */
+    private function itemsToArray(array $items = [])
+    {
+        $shipmentItems = [];
+        foreach ($items as $item) {
+            $shipmentItems[$item->getOrderItemId()] = $item->getQty();
+        }
+        return $shipmentItems;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/ShipmentFactory.php b/app/code/Magento/Sales/Model/Order/ShipmentFactory.php
index 2ac012760ee4704be9defe05cfe7c2d01529359e..a8839c75375870ce03294ca3d585635fdff84f14 100644
--- a/app/code/Magento/Sales/Model/Order/ShipmentFactory.php
+++ b/app/code/Magento/Sales/Model/Order/ShipmentFactory.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\Sales\Model\Order;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Exception\LocalizedException;
+use Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface;
+
 /**
  * Factory class for @see \Magento\Sales\Api\Data\ShipmentInterface
  */
@@ -72,6 +76,8 @@ class ShipmentFactory
      * @param \Magento\Sales\Model\Order $order
      * @param array $items
      * @return \Magento\Sales\Api\Data\ShipmentInterface
+     * @throws LocalizedException
+     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      */
     protected function prepareItems(
         \Magento\Sales\Api\Data\ShipmentInterface $shipment,
@@ -79,7 +85,6 @@ class ShipmentFactory
         array $items = []
     ) {
         $totalQty = 0;
-
         foreach ($order->getAllItems() as $orderItem) {
             if (!$this->canShipItem($orderItem, $items)) {
                 continue;
@@ -103,7 +108,7 @@ class ShipmentFactory
                             $qty = $bundleSelectionAttributes['qty'] * $items[$orderItem->getParentItemId()];
                             $qty = min($qty, $orderItem->getSimpleQtyToShip());
 
-                            $item->setQty($qty);
+                            $item->setQty($this->castQty($orderItem, $qty));
                             $shipment->addItem($item);
 
                             continue;
@@ -126,10 +131,9 @@ class ShipmentFactory
 
             $totalQty += $qty;
 
-            $item->setQty($qty);
+            $item->setQty($this->castQty($orderItem, $qty));
             $shipment->addItem($item);
         }
-
         return $shipment->setTotalQty($totalQty);
     }
 
@@ -211,4 +215,20 @@ class ShipmentFactory
             return $item->getQtyToShip() > 0;
         }
     }
+
+    /**
+     * @param Item $item
+     * @param string|int|float $qty
+     * @return float|int
+     */
+    private function castQty(\Magento\Sales\Model\Order\Item $item, $qty)
+    {
+        if ($item->getIsQtyDecimal()) {
+            $qty = (double)$qty;
+        } else {
+            $qty = (int)$qty;
+        }
+
+        return $qty > 0 ? $qty : 0;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/Order/ShipmentRepository.php b/app/code/Magento/Sales/Model/Order/ShipmentRepository.php
index d32a5f83f2d41878a47b0ead61622cece2ef53aa..2ddff08d90060d0c02195c4e4026f10dc69ee836 100644
--- a/app/code/Magento/Sales/Model/Order/ShipmentRepository.php
+++ b/app/code/Magento/Sales/Model/Order/ShipmentRepository.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Sales\Model\Order;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Sales\Model\ResourceModel\Metadata;
 use Magento\Sales\Api\Data\ShipmentSearchResultInterfaceFactory as SearchResultFactory;
 use Magento\Framework\Exception\CouldNotDeleteException;
@@ -34,16 +35,22 @@ class ShipmentRepository implements \Magento\Sales\Api\ShipmentRepositoryInterfa
      */
     protected $registry = [];
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
      * @param Metadata $metadata
      * @param SearchResultFactory $searchResultFactory
+     * @param CollectionProcessorInterface $collectionProcessor
      */
     public function __construct(
         Metadata $metadata,
-        SearchResultFactory $searchResultFactory
+        SearchResultFactory $searchResultFactory,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->metadata = $metadata;
         $this->searchResultFactory = $searchResultFactory;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -81,19 +88,10 @@ class ShipmentRepository implements \Magento\Sales\Api\ShipmentRepositoryInterfa
      */
     public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria)
     {
-        //@TODO: fix search logic
-        /** @var \Magento\Sales\Api\Data\ShipmentSearchResultInterface $searchResult */
+        /** @var \Magento\Sales\Model\ResourceModel\Order\Shipment\Collection $searchResult */
         $searchResult = $this->searchResultFactory->create();
-
-        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
-            foreach ($filterGroup->getFilters() as $filter) {
-                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-                $searchResult->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
-            }
-        }
+        $this->collectionProcessor->process($searchCriteria, $searchResult);
         $searchResult->setSearchCriteria($searchCriteria);
-        $searchResult->setCurPage($searchCriteria->getCurrentPage());
-        $searchResult->setPageSize($searchCriteria->getPageSize());
 
         return $searchResult;
     }
@@ -159,4 +157,20 @@ class ShipmentRepository implements \Magento\Sales\Api\ShipmentRepositoryInterfa
     {
         return $this->metadata->getNewInstance();
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/Order/Validation/CanInvoice.php b/app/code/Magento/Sales/Model/Order/Validation/CanInvoice.php
new file mode 100644
index 0000000000000000000000000000000000000000..bb14dc1bb5180758825966d47d7f92bb06ddacda
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Validation/CanInvoice.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Validation;
+
+use Magento\Sales\Api\Data\OrderInterface;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\ValidatorInterface;
+
+/**
+ * Class CanInvoice
+ */
+class CanInvoice implements ValidatorInterface
+{
+    /**
+     * @param OrderInterface $entity
+     * @return array
+     */
+    public function validate($entity)
+    {
+        $messages = [];
+
+        if (!$this->isStateReadyForInvoice($entity)) {
+            $messages[] = __('An invoice cannot be created when an order has a status of %1', $entity->getStatus());
+        } elseif (!$this->canInvoice($entity)) {
+            $messages[] = __('The order does not allow an invoice to be created.');
+        }
+
+        return $messages;
+    }
+
+    /**
+     * @param OrderInterface $order
+     * @return bool
+     */
+    private function isStateReadyForInvoice(OrderInterface $order)
+    {
+        if ($order->getState() === Order::STATE_PAYMENT_REVIEW ||
+            $order->getState() === Order::STATE_HOLDED ||
+            $order->getState() === Order::STATE_CANCELED ||
+            $order->getState() === Order::STATE_COMPLETE ||
+            $order->getState() === Order::STATE_CLOSED
+        ) {
+            return false;
+        };
+
+        return true;
+    }
+
+    /**
+     * @param OrderInterface $order
+     * @return bool
+     */
+    private function canInvoice(OrderInterface $order)
+    {
+        /** @var \Magento\Sales\Model\Order\Item $item */
+        foreach ($order->getItems() as $item) {
+            if ($item->getQtyToInvoice() > 0 && !$item->getLockedDoInvoice()) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Validation/CanShip.php b/app/code/Magento/Sales/Model/Order/Validation/CanShip.php
new file mode 100644
index 0000000000000000000000000000000000000000..46638a62483e6ce0f45a1c79d2774fe2c34d7970
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Order/Validation/CanShip.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Validation;
+
+use Magento\Sales\Api\Data\OrderInterface;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\ValidatorInterface;
+
+/**
+ * Class CanShip
+ */
+class CanShip implements ValidatorInterface
+{
+    /**
+     * @param OrderInterface $entity
+     * @return array
+     */
+    public function validate($entity)
+    {
+        $messages = [];
+        if (!$this->isStateReadyForShipment($entity)) {
+            $messages[] = __('A shipment cannot be created when an order has a status of %1', $entity->getStatus());
+        } elseif (!$this->canShip($entity)) {
+            $messages[] = __('The order does not allow a shipment to be created.');
+        }
+
+        return $messages;
+    }
+
+    /**
+     * @param OrderInterface $order
+     * @return bool
+     */
+    private function isStateReadyForShipment(OrderInterface $order)
+    {
+        if ($order->getState() === Order::STATE_PAYMENT_REVIEW ||
+            $order->getState() === Order::STATE_HOLDED ||
+            $order->getIsVirtual() ||
+            $order->getState() === Order::STATE_CANCELED
+        ) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * @param OrderInterface $order
+     * @return bool
+     */
+    private function canShip(OrderInterface $order)
+    {
+        /** @var \Magento\Sales\Model\Order\Item $item */
+        foreach ($order->getItems() as $item) {
+            if ($item->getQtyToShip() > 0 && !$item->getIsVirtual() && !$item->getLockedDoShip()) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/OrderRepository.php b/app/code/Magento/Sales/Model/OrderRepository.php
index b83ab5ff469fcd713f326fc62008e12bbe49259b..5c14b3fd4433e4404db3921a1fffe5b13935643f 100644
--- a/app/code/Magento/Sales/Model/OrderRepository.php
+++ b/app/code/Magento/Sales/Model/OrderRepository.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Sales\Model;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Sales\Model\ResourceModel\Order as Resource;
 use Magento\Sales\Model\ResourceModel\Metadata;
 use Magento\Sales\Model\Order\ShippingAssignmentBuilder;
@@ -43,6 +44,9 @@ class OrderRepository implements \Magento\Sales\Api\OrderRepositoryInterface
      */
     private $shippingAssignmentBuilder;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
      * OrderInterface[]
      *
@@ -52,16 +56,18 @@ class OrderRepository implements \Magento\Sales\Api\OrderRepositoryInterface
 
     /**
      * OrderRepository constructor.
-     *
      * @param Metadata $metadata
      * @param SearchResultFactory $searchResultFactory
+     * @param CollectionProcessorInterface|null $collectionProcessor
      */
     public function __construct(
         Metadata $metadata,
-        SearchResultFactory $searchResultFactory
+        SearchResultFactory $searchResultFactory,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->metadata = $metadata;
         $this->searchResultFactory = $searchResultFactory;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -99,26 +105,8 @@ class OrderRepository implements \Magento\Sales\Api\OrderRepositoryInterface
     {
         /** @var \Magento\Sales\Api\Data\OrderSearchResultInterface $searchResult */
         $searchResult = $this->searchResultFactory->create();
-        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
-            $this->addFilterGroupToCollection($filterGroup, $searchResult);
-        }
-
-        $sortOrders = $searchCriteria->getSortOrders();
-        if ($sortOrders === null) {
-            $sortOrders = [];
-        }
-        /** @var \Magento\Framework\Api\SortOrder $sortOrder */
-        foreach ($sortOrders as $sortOrder) {
-            $field = $sortOrder->getField();
-            $searchResult->addOrder(
-                $field,
-                ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-            );
-        }
-
+        $this->collectionProcessor->process($searchCriteria, $searchResult);
         $searchResult->setSearchCriteria($searchCriteria);
-        $searchResult->setCurPage($searchCriteria->getCurrentPage());
-        $searchResult->setPageSize($searchCriteria->getPageSize());
         foreach ($searchResult->getItems() as $order) {
             $this->setShippingAssignments($order);
         }
@@ -222,6 +210,7 @@ class OrderRepository implements \Magento\Sales\Api\OrderRepositoryInterface
      * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
      * @param \Magento\Sales\Api\Data\OrderSearchResultInterface $searchResult
      * @return void
+     * @deprecated
      * @throws \Magento\Framework\Exception\InputException
      */
     protected function addFilterGroupToCollection(
@@ -239,4 +228,20 @@ class OrderRepository implements \Magento\Sales\Api\OrderRepositoryInterface
             $searchResult->addFieldToFilter($fields, $conditions);
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Sales/Model/ResourceModel/Order/Address/Collection.php b/app/code/Magento/Sales/Model/ResourceModel/Order/Address/Collection.php
index de54cfaff9a6554eed5edc348aa29b8a71e8262a..59f17925a0bdea0af5155dd44bcfbbe063eb2fd5 100644
--- a/app/code/Magento/Sales/Model/ResourceModel/Order/Address/Collection.php
+++ b/app/code/Magento/Sales/Model/ResourceModel/Order/Address/Collection.php
@@ -5,12 +5,15 @@
  */
 namespace Magento\Sales\Model\ResourceModel\Order\Address;
 
+use Magento\Sales\Api\Data\OrderAddressSearchResultInterface;
+use \Magento\Sales\Model\ResourceModel\Order\Collection\AbstractCollection;
+
 /**
  * Flat sales order payment collection
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-class Collection extends \Magento\Sales\Model\ResourceModel\Order\Collection\AbstractCollection
+class Collection extends AbstractCollection implements OrderAddressSearchResultInterface
 {
     /**
      * Event prefix
diff --git a/app/code/Magento/Sales/Model/ResourceModel/Order/Invoice/Item.php b/app/code/Magento/Sales/Model/ResourceModel/Order/Invoice/Item.php
index 821819b9974ea884880f8a717db8160ea344c027..08002c2b19a39aa3c421812c5b56e57d1c6d7514 100644
--- a/app/code/Magento/Sales/Model/ResourceModel/Order/Invoice/Item.php
+++ b/app/code/Magento/Sales/Model/ResourceModel/Order/Invoice/Item.php
@@ -5,12 +5,15 @@
  */
 namespace Magento\Sales\Model\ResourceModel\Order\Invoice;
 
+use Magento\Sales\Model\ResourceModel\EntityAbstract as SalesResource;
+use Magento\Sales\Model\Spi\InvoiceItemResourceInterface;
+
 /**
  * Flat sales order invoice item resource
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-class Item extends \Magento\Sales\Model\ResourceModel\EntityAbstract
+class Item extends SalesResource implements InvoiceItemResourceInterface
 {
     /**
      * Event prefix
diff --git a/app/code/Magento/Sales/Model/ResourceModel/Order/Item/Collection.php b/app/code/Magento/Sales/Model/ResourceModel/Order/Item/Collection.php
index 7559bae68ffa8e3524f4d1f3750603be8e2acfc3..d38c0dbc58b6b78b02d0126cf9e49e1f25977643 100644
--- a/app/code/Magento/Sales/Model/ResourceModel/Order/Item/Collection.php
+++ b/app/code/Magento/Sales/Model/ResourceModel/Order/Item/Collection.php
@@ -5,12 +5,14 @@
  */
 namespace Magento\Sales\Model\ResourceModel\Order\Item;
 
+use \Magento\Sales\Model\ResourceModel\Order\Collection\AbstractCollection;
+
 /**
  * Flat sales order payment collection
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-class Collection extends \Magento\Sales\Model\ResourceModel\Order\Collection\AbstractCollection
+class Collection extends AbstractCollection implements \Magento\Sales\Api\Data\OrderItemSearchResultInterface
 {
     /**
      * Event prefix
diff --git a/app/code/Magento/Sales/Model/ResourceModel/Order/Plugin/Authorization.php b/app/code/Magento/Sales/Model/ResourceModel/Order/Plugin/Authorization.php
index a44a7b78717975a0945ab23a7976c1fc009e371e..f6b459ba4638d0d5db59fe8fb06d3054f5299ec3 100644
--- a/app/code/Magento/Sales/Model/ResourceModel/Order/Plugin/Authorization.php
+++ b/app/code/Magento/Sales/Model/ResourceModel/Order/Plugin/Authorization.php
@@ -8,6 +8,8 @@ namespace Magento\Sales\Model\ResourceModel\Order\Plugin;
 
 use Magento\Authorization\Model\UserContextInterface;
 use Magento\Framework\Exception\NoSuchEntityException;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\ResourceModel\Order as ResourceOrder;
 
 class Authorization
 {
@@ -20,33 +22,28 @@ class Authorization
      * @param UserContextInterface $userContext
      */
     public function __construct(
-        \Magento\Authorization\Model\UserContextInterface $userContext
+        UserContextInterface $userContext
     ) {
         $this->userContext = $userContext;
     }
 
     /**
-     * Checks if order is allowed
-     *
-     * @param \Magento\Sales\Model\ResourceModel\Order $subject
-     * @param callable $proceed
+     * @param ResourceOrder $subject
+     * @param ResourceOrder $result
      * @param \Magento\Framework\Model\AbstractModel $order
-     * @param mixed $value
-     * @param null|string $field
-     * @return \Magento\Sales\Model\Order
+     * @return ResourceOrder
      * @throws NoSuchEntityException
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundLoad(
-        \Magento\Sales\Model\ResourceModel\Order $subject,
-        \Closure $proceed,
-        \Magento\Framework\Model\AbstractModel $order,
-        $value,
-        $field = null
+    public function afterLoad(
+        ResourceOrder $subject,
+        ResourceOrder $result,
+        \Magento\Framework\Model\AbstractModel $order
     ) {
-        $result = $proceed($order, $value, $field);
-        if (!$this->isAllowed($order)) {
-            throw NoSuchEntityException::singleField('orderId', $order->getId());
+        if ($order instanceof Order) {
+            if (!$this->isAllowed($order)) {
+                throw NoSuchEntityException::singleField('orderId', $order->getId());
+            }
         }
         return $result;
     }
@@ -57,7 +54,7 @@ class Authorization
      * @param \Magento\Sales\Model\Order $order
      * @return bool
      */
-    protected function isAllowed(\Magento\Sales\Model\Order $order)
+    protected function isAllowed(Order $order)
     {
         return $this->userContext->getUserType() == UserContextInterface::USER_TYPE_CUSTOMER
             ? $order->getCustomerId() == $this->userContext->getUserId()
diff --git a/app/code/Magento/Sales/Model/ShipOrder.php b/app/code/Magento/Sales/Model/ShipOrder.php
new file mode 100644
index 0000000000000000000000000000000000000000..d051144cf73ca166c30ebd6eb9f626306b1720a6
--- /dev/null
+++ b/app/code/Magento/Sales/Model/ShipOrder.php
@@ -0,0 +1,206 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model;
+
+use Magento\Framework\App\ResourceConnection;
+use Magento\Sales\Api\OrderRepositoryInterface;
+use Magento\Sales\Api\ShipmentRepositoryInterface;
+use Magento\Sales\Api\ShipOrderInterface;
+use Magento\Sales\Model\Order\Config as OrderConfig;
+use Magento\Sales\Model\Order\OrderStateResolverInterface;
+use Magento\Sales\Model\Order\OrderValidatorInterface;
+use Magento\Sales\Model\Order\ShipmentDocumentFactory;
+use Magento\Sales\Model\Order\Shipment\NotifierInterface;
+use Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface;
+use Magento\Sales\Model\Order\Shipment\Validation\QuantityValidator;
+use Magento\Sales\Model\Order\Shipment\Validation\TrackValidator;
+use Magento\Sales\Model\Order\Validation\CanShip;
+use Magento\Sales\Model\Order\Shipment\OrderRegistrarInterface;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Class ShipOrder
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class ShipOrder implements ShipOrderInterface
+{
+    /**
+     * @var ResourceConnection
+     */
+    private $resourceConnection;
+
+    /**
+     * @var OrderRepositoryInterface
+     */
+    private $orderRepository;
+
+    /**
+     * @var ShipmentDocumentFactory
+     */
+    private $shipmentDocumentFactory;
+
+    /**
+     * @var ShipmentValidatorInterface
+     */
+    private $shipmentValidator;
+
+    /**
+     * @var OrderStateResolverInterface
+     */
+    private $orderStateResolver;
+
+    /**
+     * @var OrderConfig
+     */
+    private $config;
+
+    /**
+     * @var ShipmentRepositoryInterface
+     */
+    private $shipmentRepository;
+
+    /**
+     * @var NotifierInterface
+     */
+    private $notifierInterface;
+
+    /**
+     * @var LoggerInterface
+     */
+    private $logger;
+
+    /**
+     * @var OrderValidatorInterface
+     */
+    private $orderValidator;
+
+    /**
+     * @var OrderRegistrarInterface
+     */
+    private $orderRegistrar;
+
+    /**
+     * @param ResourceConnection $resourceConnection
+     * @param OrderRepositoryInterface $orderRepository
+     * @param ShipmentDocumentFactory $shipmentDocumentFactory
+     * @param ShipmentValidatorInterface $shipmentValidator
+     * @param OrderValidatorInterface $orderValidator
+     * @param OrderStateResolverInterface $orderStateResolver
+     * @param OrderConfig $config
+     * @param ShipmentRepositoryInterface $shipmentRepository
+     * @param NotifierInterface $notifierInterface
+     * @param OrderRegistrarInterface $orderRegistrar
+     * @param LoggerInterface $logger
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     */
+    public function __construct(
+        ResourceConnection $resourceConnection,
+        OrderRepositoryInterface $orderRepository,
+        ShipmentDocumentFactory $shipmentDocumentFactory,
+        ShipmentValidatorInterface $shipmentValidator,
+        OrderValidatorInterface $orderValidator,
+        OrderStateResolverInterface $orderStateResolver,
+        OrderConfig $config,
+        ShipmentRepositoryInterface $shipmentRepository,
+        NotifierInterface $notifierInterface,
+        OrderRegistrarInterface $orderRegistrar,
+        LoggerInterface $logger
+    ) {
+        $this->resourceConnection = $resourceConnection;
+        $this->orderRepository = $orderRepository;
+        $this->shipmentDocumentFactory = $shipmentDocumentFactory;
+        $this->shipmentValidator = $shipmentValidator;
+        $this->orderValidator = $orderValidator;
+        $this->orderStateResolver = $orderStateResolver;
+        $this->config = $config;
+        $this->shipmentRepository = $shipmentRepository;
+        $this->notifierInterface = $notifierInterface;
+        $this->logger = $logger;
+        $this->orderRegistrar = $orderRegistrar;
+    }
+
+    /**
+     * @param int $orderId
+     * @param \Magento\Sales\Api\Data\ShipmentItemCreationInterface[] $items
+     * @param bool $notify
+     * @param bool $appendComment
+     * @param \Magento\Sales\Api\Data\ShipmentCommentCreationInterface|null $comment
+     * @param \Magento\Sales\Api\Data\ShipmentTrackCreationInterface[] $tracks
+     * @param \Magento\Sales\Api\Data\ShipmentPackageCreationInterface[] $packages
+     * @param \Magento\Sales\Api\Data\ShipmentCreationArgumentsInterface|null $arguments
+     * @return int
+     * @throws \Magento\Sales\Api\Exception\DocumentValidationExceptionInterface
+     * @throws \Magento\Sales\Api\Exception\CouldNotShipExceptionInterface
+     * @throws \Magento\Framework\Exception\InputException
+     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @throws \DomainException
+     */
+    public function execute(
+        $orderId,
+        array $items = [],
+        $notify = false,
+        $appendComment = false,
+        \Magento\Sales\Api\Data\ShipmentCommentCreationInterface $comment = null,
+        array $tracks = [],
+        array $packages = [],
+        \Magento\Sales\Api\Data\ShipmentCreationArgumentsInterface $arguments = null
+    ) {
+        $connection = $this->resourceConnection->getConnection('sales');
+        $order = $this->orderRepository->get($orderId);
+        $shipment = $this->shipmentDocumentFactory->create(
+            $order,
+            $items,
+            $tracks,
+            $comment,
+            ($appendComment && $notify),
+            $packages,
+            $arguments
+        );
+        $orderValidationResult = $this->orderValidator->validate(
+            $order,
+            [
+                CanShip::class
+            ]
+        );
+        $shipmentValidationResult = $this->shipmentValidator->validate(
+            $shipment,
+            [
+                QuantityValidator::class,
+                TrackValidator::class
+            ]
+        );
+        $validationMessages = array_merge($orderValidationResult, $shipmentValidationResult);
+        if (!empty($validationMessages)) {
+            throw new \Magento\Sales\Exception\DocumentValidationException(
+                __("Shipment Document Validation Error(s):\n" . implode("\n", $validationMessages))
+            );
+        }
+        $connection->beginTransaction();
+        try {
+            $this->orderRegistrar->register($order, $shipment);
+            $order->setState(
+                $this->orderStateResolver->getStateForOrder($order, [OrderStateResolverInterface::IN_PROGRESS])
+            );
+            $order->setStatus($this->config->getStateDefaultStatus($order->getState()));
+            $this->shipmentRepository->save($shipment);
+            $this->orderRepository->save($order);
+            $connection->commit();
+        } catch (\Exception $e) {
+            $this->logger->critical($e);
+            $connection->rollBack();
+            throw new \Magento\Sales\Exception\CouldNotShipException(
+                __('Could not save a shipment, see error log for details')
+            );
+        }
+        if ($notify) {
+            if (!$appendComment) {
+                $comment = null;
+            }
+            $this->notifierInterface->notify($order, $shipment, $comment);
+        }
+        return $shipment->getEntityId();
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Validator.php b/app/code/Magento/Sales/Model/Validator.php
new file mode 100644
index 0000000000000000000000000000000000000000..b8d57ded2970209d5d2184945fbb22f13de47dbd
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Validator.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model;
+
+use Magento\Framework\Exception\ConfigurationMismatchException;
+use Magento\Framework\ObjectManagerInterface;
+
+/**
+ * Class Validator
+ *
+ * @internal
+ */
+class Validator
+{
+    /**
+     * @var ObjectManagerInterface
+     */
+    private $objectManager;
+
+    /**
+     * Validator constructor.
+     *
+     * @param ObjectManagerInterface $objectManager
+     */
+    public function __construct(ObjectManagerInterface $objectManager)
+    {
+        $this->objectManager = $objectManager;
+    }
+
+    /**
+     * @param object $entity
+     * @param ValidatorInterface[] $validators
+     * @return string[]
+     * @throws ConfigurationMismatchException
+     */
+    public function validate($entity, array $validators)
+    {
+        $messages = [];
+        foreach ($validators as $validatorName) {
+            $validator = $this->objectManager->get($validatorName);
+            if (!$validator instanceof ValidatorInterface) {
+                throw new ConfigurationMismatchException(
+                    __(
+                        sprintf('Validator %s is not instance of general validator interface', $validatorName)
+                    )
+                );
+            }
+            $messages = array_merge($messages, $validator->validate($entity));
+        }
+
+        return $messages;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/ValidatorInterface.php b/app/code/Magento/Sales/Model/ValidatorInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..1882782e314f7b47b507c042697f223eadbf36b7
--- /dev/null
+++ b/app/code/Magento/Sales/Model/ValidatorInterface.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model;
+
+use Magento\Framework\Exception\NoSuchEntityException;
+use Magento\Sales\Exception\DocumentValidationException;
+
+/**
+ * Interface ValidatorInterface
+ */
+interface ValidatorInterface
+{
+    /**
+     * @param object $entity
+     * @return array
+     * @throws DocumentValidationException
+     * @throws NoSuchEntityException
+     */
+    public function validate($entity);
+}
diff --git a/app/code/Magento/Sales/Setup/SalesSetup.php b/app/code/Magento/Sales/Setup/SalesSetup.php
index 7a349bac35c76084ce36a437e4d073d7a98c05d1..3a2c999678a03e4115c867620092438cf27628b3 100644
--- a/app/code/Magento/Sales/Setup/SalesSetup.php
+++ b/app/code/Magento/Sales/Setup/SalesSetup.php
@@ -15,6 +15,7 @@ use Magento\Framework\Setup\ModuleDataSetupInterface;
 /**
  * Setup Model of Sales Module
  * @codeCoverageIgnore
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class SalesSetup extends \Magento\Eav\Setup\EavSetup
 {
@@ -48,6 +49,11 @@ class SalesSetup extends \Magento\Eav\Setup\EavSetup
      */
     protected $encryptor;
 
+    /**
+     * @var string
+     */
+    private static $connectionName = 'sales';
+
     /**
      * @param ModuleDataSetupInterface $setup
      * @param Context $context
@@ -105,8 +111,11 @@ class SalesSetup extends \Magento\Eav\Setup\EavSetup
      */
     protected function _flatTableExist($table)
     {
-        $tablesList = $this->getSetup()->getConnection()->listTables();
-        return in_array(strtoupper($this->getSetup()->getTable($table)), array_map('strtoupper', $tablesList));
+        $tablesList = $this->getSetup()->getConnection(self::$connectionName)->listTables();
+        return in_array(
+            strtoupper($this->getSetup()->getTable($table, self::$connectionName)),
+            array_map('strtoupper', $tablesList)
+        );
     }
 
     /**
@@ -143,13 +152,15 @@ class SalesSetup extends \Magento\Eav\Setup\EavSetup
      */
     protected function _addFlatAttribute($table, $attribute, $attr)
     {
-        $tableInfo = $this->getSetup()->getConnection()->describeTable($this->getSetup()->getTable($table));
+        $tableInfo = $this->getSetup()
+            ->getConnection(self::$connectionName)
+            ->describeTable($this->getSetup()->getTable($table, self::$connectionName));
         if (isset($tableInfo[$attribute])) {
             return $this;
         }
         $columnDefinition = $this->_getAttributeColumnDefinition($attribute, $attr);
-        $this->getSetup()->getConnection()->addColumn(
-            $this->getSetup()->getTable($table),
+        $this->getSetup()->getConnection(self::$connectionName)->addColumn(
+            $this->getSetup()->getTable($table, self::$connectionName),
             $attribute,
             $columnDefinition
         );
@@ -169,8 +180,8 @@ class SalesSetup extends \Magento\Eav\Setup\EavSetup
     {
         if (in_array($entityTypeId, $this->_flatEntitiesGrid) && !empty($attr['grid'])) {
             $columnDefinition = $this->_getAttributeColumnDefinition($attribute, $attr);
-            $this->getSetup()->getConnection()->addColumn(
-                $this->getSetup()->getTable($table . '_grid'),
+            $this->getSetup()->getConnection(self::$connectionName)->addColumn(
+                $this->getSetup()->getTable($table . '_grid', self::$connectionName),
                 $attribute,
                 $columnDefinition
             );
diff --git a/app/code/Magento/Sales/Setup/UpgradeSchema.php b/app/code/Magento/Sales/Setup/UpgradeSchema.php
index 34e7c29b6c6a09b33d58ac150e8d563103ef82de..b977cb28596eae3ff2e9c5ea0836ba716c54831e 100644
--- a/app/code/Magento/Sales/Setup/UpgradeSchema.php
+++ b/app/code/Magento/Sales/Setup/UpgradeSchema.php
@@ -5,11 +5,9 @@
  */
 namespace Magento\Sales\Setup;
 
-use Magento\Framework\App\ResourceConnection;
 use Magento\Framework\Setup\UpgradeSchemaInterface;
 use Magento\Framework\Setup\ModuleContextInterface;
 use Magento\Framework\Setup\SchemaSetupInterface;
-use Magento\Framework\DB\Adapter\AdapterInterface;
 
 /**
  * @codeCoverageIgnore
@@ -17,9 +15,9 @@ use Magento\Framework\DB\Adapter\AdapterInterface;
 class UpgradeSchema implements UpgradeSchemaInterface
 {
     /**
-     * @var AdapterInterface
+     * @var string
      */
-    private $salesConnection;
+    private static $connectionName = 'sales';
 
     /**
      * {@inheritdoc}
@@ -29,36 +27,39 @@ class UpgradeSchema implements UpgradeSchemaInterface
         $installer = $setup;
         $installer->startSetup();
         if (version_compare($context->getVersion(), '2.0.2', '<')) {
-            $connection = $installer->getConnection();
+            $connection = $installer->getConnection(self::$connectionName);
             //sales_bestsellers_aggregated_daily
             $connection->dropForeignKey(
-                $installer->getTable('sales_bestsellers_aggregated_daily'),
+                $installer->getTable('sales_bestsellers_aggregated_daily', self::$connectionName),
                 $installer->getFkName(
                     'sales_bestsellers_aggregated_daily',
                     'product_id',
                     'catalog_product_entity',
-                    'entity_id'
+                    'entity_id',
+                    self::$connectionName
                 )
             );
             //sales_bestsellers_aggregated_monthly
             $connection->dropForeignKey(
-                $installer->getTable('sales_bestsellers_aggregated_monthly'),
+                $installer->getTable('sales_bestsellers_aggregated_monthly', self::$connectionName),
                 $installer->getFkName(
                     'sales_bestsellers_aggregated_monthly',
                     'product_id',
                     'catalog_product_entity',
-                    'entity_id'
+                    'entity_id',
+                    self::$connectionName
                 )
             );
 
             //sales_bestsellers_aggregated_yearly
             $connection->dropForeignKey(
-                $installer->getTable('sales_bestsellers_aggregated_yearly'),
+                $installer->getTable('sales_bestsellers_aggregated_yearly', self::$connectionName),
                 $installer->getFkName(
                     'sales_bestsellers_aggregated_yearly',
                     'product_id',
                     'catalog_product_entity',
-                    'entity_id'
+                    'entity_id',
+                    self::$connectionName
                 )
             );
 
@@ -76,9 +77,9 @@ class UpgradeSchema implements UpgradeSchemaInterface
      */
     private function addColumnBaseGrandTotal(SchemaSetupInterface $installer)
     {
-        $connection = $this->getSalesConnection();
+        $connection = $installer->getConnection(self::$connectionName);
         $connection->addColumn(
-            $installer->getTable('sales_invoice_grid'),
+            $installer->getTable('sales_invoice_grid', self::$connectionName),
             'base_grand_total',
             [
                 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL,
@@ -96,29 +97,11 @@ class UpgradeSchema implements UpgradeSchemaInterface
      */
     private function addIndexBaseGrandTotal(SchemaSetupInterface $installer)
     {
-        $connection = $this->getSalesConnection();
+        $connection = $installer->getConnection(self::$connectionName);
         $connection->addIndex(
-            $installer->getTable('sales_invoice_grid'),
-            $installer->getIdxName('sales_invoice_grid', ['base_grand_total']),
+            $installer->getTable('sales_invoice_grid', self::$connectionName),
+            $installer->getIdxName('sales_invoice_grid', ['base_grand_total'], '', self::$connectionName),
             ['base_grand_total']
         );
     }
-
-    /**
-     * @return AdapterInterface
-     */
-    private function getSalesConnection()
-    {
-        if ($this->salesConnection === null) {
-            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
-            /** @var ResourceConnection $resourceConnection */
-            $resourceConnection = $objectManager->get(ResourceConnection::class);
-            try {
-                $this->salesConnection = $resourceConnection->getConnectionByName('sales');
-            } catch (\DomainException $e) {
-                $this->salesConnection = $resourceConnection->getConnection();
-            }
-        }
-        return $this->salesConnection;
-    }
 }
diff --git a/app/code/Magento/Sales/Test/Unit/Model/OrderInvoiceTest.php b/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php
similarity index 89%
rename from app/code/Magento/Sales/Test/Unit/Model/OrderInvoiceTest.php
rename to app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php
index bc36da112aa291e82e5f06af887334095544f43f..6dfa929acb6290e0e95bf2011b76ec9811691ecc 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/OrderInvoiceTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/InvoiceOrderTest.php
@@ -14,21 +14,23 @@ use Magento\Sales\Api\Data\OrderInterface;
 use Magento\Sales\Api\OrderRepositoryInterface;
 use Magento\Sales\Model\Order;
 use Magento\Sales\Model\Order\Config as OrderConfig;
+use Magento\Sales\Model\Order\Invoice\InvoiceValidatorInterface;
 use Magento\Sales\Model\Order\Invoice\NotifierInterface;
 use Magento\Sales\Model\Order\InvoiceDocumentFactory;
 use Magento\Sales\Model\Order\InvoiceRepository;
-use Magento\Sales\Model\Order\InvoiceValidatorInterface;
 use Magento\Sales\Model\Order\OrderStateResolverInterface;
+use Magento\Sales\Model\Order\OrderValidatorInterface;
 use Magento\Sales\Model\Order\PaymentAdapterInterface;
-use Magento\Sales\Model\OrderInvoice;
+use Magento\Sales\Model\InvoiceOrder;
 use Psr\Log\LoggerInterface;
 
 /**
- * Class OrderInvoiceTest
+ * Class InvoiceOrderTest
+ * 
  * @SuppressWarnings(PHPMD.TooManyFields)
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
+class InvoiceOrderTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * @var ResourceConnection|\PHPUnit_Framework_MockObject_MockObject
@@ -50,6 +52,11 @@ class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
      */
     private $invoiceValidatorMock;
 
+    /**
+     * @var OrderValidatorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderValidatorMock;
+
     /**
      * @var PaymentAdapterInterface|\PHPUnit_Framework_MockObject_MockObject
      */
@@ -76,9 +83,9 @@ class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
     private $notifierInterfaceMock;
 
     /**
-     * @var OrderInvoice|\PHPUnit_Framework_MockObject_MockObject
+     * @var InvoiceOrder|\PHPUnit_Framework_MockObject_MockObject
      */
-    private $orderInvoice;
+    private $invoiceOrder;
 
     /**
      * @var InvoiceCreationArgumentsInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -128,6 +135,10 @@ class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
+        $this->orderValidatorMock = $this->getMockBuilder(OrderValidatorInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
         $this->paymentAdapterMock = $this->getMockBuilder(PaymentAdapterInterface::class)
             ->disableOriginalConstructor()
             ->getMock();
@@ -172,11 +183,12 @@ class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $this->orderInvoice = new OrderInvoice(
+        $this->invoiceOrder = new InvoiceOrder(
             $this->resourceConnectionMock,
             $this->orderRepositoryMock,
             $this->invoiceDocumentFactoryMock,
             $this->invoiceValidatorMock,
+            $this->orderValidatorMock,
             $this->paymentAdapterMock,
             $this->orderStateResolverMock,
             $this->configMock,
@@ -212,7 +224,11 @@ class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
 
         $this->invoiceValidatorMock->expects($this->once())
             ->method('validate')
-            ->with($this->invoiceMock, $this->orderMock)
+            ->with($this->invoiceMock)
+            ->willReturn([]);
+        $this->orderValidatorMock->expects($this->once())
+            ->method('validate')
+            ->with($this->orderMock)
             ->willReturn([]);
 
         $this->paymentAdapterMock->expects($this->once())
@@ -271,7 +287,7 @@ class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals(
             2,
-            $this->orderInvoice->execute(
+            $this->invoiceOrder->execute(
                 $orderId,
                 $capture,
                 $items,
@@ -311,10 +327,14 @@ class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
 
         $this->invoiceValidatorMock->expects($this->once())
             ->method('validate')
-            ->with($this->invoiceMock, $this->orderMock)
+            ->with($this->invoiceMock)
             ->willReturn($errorMessages);
+        $this->orderValidatorMock->expects($this->once())
+            ->method('validate')
+            ->with($this->orderMock)
+            ->willReturn([]);
 
-        $this->orderInvoice->execute(
+        $this->invoiceOrder->execute(
             $orderId,
             $capture,
             $items,
@@ -356,7 +376,11 @@ class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
 
         $this->invoiceValidatorMock->expects($this->once())
             ->method('validate')
-            ->with($this->invoiceMock, $this->orderMock)
+            ->with($this->invoiceMock)
+            ->willReturn([]);
+        $this->orderValidatorMock->expects($this->once())
+            ->method('validate')
+            ->with($this->orderMock)
             ->willReturn([]);
         $e = new \Exception();
 
@@ -372,7 +396,7 @@ class OrderInvoiceTest extends \PHPUnit_Framework_TestCase
         $this->adapterInterface->expects($this->once())
             ->method('rollBack');
 
-        $this->orderInvoice->execute(
+        $this->invoiceOrder->execute(
             $orderId,
             $capture,
             $items,
diff --git a/app/code/Magento/Sales/Test/Unit/Model/InvoiceRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/InvoiceRepositoryTest.php
index 964974507d1905df1945e92b4bda2785ee415f4c..5c3d970d42f813908403dc6d5cabd05e7523ba4d 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/InvoiceRepositoryTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/InvoiceRepositoryTest.php
@@ -6,6 +6,8 @@
 
 namespace Magento\Sales\Test\Unit\Model;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+
 /**
  * Class InvoiceRepositoryTest
  */
@@ -26,6 +28,11 @@ class InvoiceRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $searchResultFactory;
 
+    /**
+     * @var CollectionProcessorInterface |\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessorMock;
+    
     protected function setUp()
     {
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
@@ -36,11 +43,14 @@ class InvoiceRepositoryTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->setMethods(['create'])
             ->getMock();
+        $this->collectionProcessorMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
         $this->invoice = $objectManager->getObject(
             \Magento\Sales\Model\Order\InvoiceRepository::class,
             [
                 'invoiceMetadata' => $this->invoiceMetadata,
-                'searchResultFactory' => $this->searchResultFactory
+                'searchResultFactory' => $this->searchResultFactory,
+                'collectionProcessor' => $this->collectionProcessorMock,
             ]
         );
         $this->type = $this->getMock(\Magento\Eav\Model\Entity\Type::class, ['fetchNewIncrementId'], [], '', false);
@@ -116,44 +126,15 @@ class InvoiceRepositoryTest extends \PHPUnit_Framework_TestCase
 
     public function testGetList()
     {
-        $filterGroup = $this->getMockBuilder(\Magento\Framework\Api\Search\FilterGroup::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $filterGroups = [$filterGroup];
-        $field = 'test_field';
-        $fieldValue = 'test_value';
-
-        $filter = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $filter->expects($this->any())
-            ->method('getConditionType')
-            ->willReturn(false);
-        $filter->expects($this->any())
-            ->method('getField')
-            ->willReturn($field);
-        $filter->expects($this->any())
-            ->method('getValue')
-            ->willReturn($fieldValue);
-
-        $filterGroup->expects($this->once())
-            ->method('getFilters')
-            ->willReturn([$filter]);
-
         $searchCriteria = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteria::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $searchCriteria->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn($filterGroups);
-
         $collection = $this->getMockBuilder(\Magento\Sales\Model\ResourceModel\Order\Invoice\Collection::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->withAnyParameters();
-
+        $this->collectionProcessorMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteria, $collection);
         $this->searchResultFactory->expects($this->once())
             ->method('create')
             ->willReturn($collection);
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/AddressRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/AddressRepositoryTest.php
index d99100f3c8048d3f623efeee3237df44bdfb51df..d1aa65afd501e126cf85ad98e1a1ab1512e1829b 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/AddressRepositoryTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/AddressRepositoryTest.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Sales\Test\Unit\Model\Order;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
 
 /**
@@ -33,6 +34,11 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $searchResultFactory;
 
+    /**
+     * @var CollectionProcessorInterface |\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessorMock;
+
     protected function setUp()
     {
         $objectManager = new ObjectManager($this);
@@ -53,11 +59,15 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
             false
         );
 
+        $this->collectionProcessorMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
+
         $this->subject = $objectManager->getObject(
             \Magento\Sales\Model\Order\AddressRepository::class,
             [
                 'metadata' => $this->metadata,
-                'searchResultFactory' => $this->searchResultFactory
+                'searchResultFactory' => $this->searchResultFactory,
+                'collectionProcessor' => $this->collectionProcessorMock,
             ]
         );
     }
@@ -136,56 +146,24 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
 
     public function testGetList()
     {
-        $filter = $this->getMock(
-            \Magento\Framework\Api\Filter::class,
-            ['getConditionType', 'getField', 'getValue'],
-            [],
-            '',
-            false
-        );
-        $filter->expects($this->any())
-            ->method('getConditionType')
-            ->willReturn(false);
-        $filter->expects($this->any())
-            ->method('getField')
-            ->willReturn('test_field');
-        $filter->expects($this->any())
-            ->method('getValue')
-            ->willReturn('test_value');
-
-        $filterGroup = $this->getMock(
-            \Magento\Framework\Api\Search\FilterGroup::class,
-            ['getFilters'],
-            [],
-            '',
-            false
-        );
-        $filterGroup->expects($this->once())
-            ->method('getFilters')
-            ->willReturn([$filter]);
-
         $searchCriteria = $this->getMock(
             \Magento\Framework\Api\SearchCriteria::class,
-            ['getFilterGroups'],
+            [],
             [],
             '',
             false
         );
-        $searchCriteria->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn([$filterGroup]);
-
         $collection = $this->getMock(
             \Magento\Sales\Model\ResourceModel\Order\Address\Collection::class,
-            ['addFieldToFilter'],
+            [],
             [],
             '',
             false
         );
-        $collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->withAnyParameters();
 
+        $this->collectionProcessorMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteria, $collection);
         $this->searchResultFactory->expects($this->once())
             ->method('create')
             ->willReturn($collection);
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoRepositoryTest.php
index 3bbf663bd2d2649752c98cec75dc8495b00fe797..52dc60dc70d0bf666c14f775c3a36cf1d8684f68 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoRepositoryTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoRepositoryTest.php
@@ -6,6 +6,7 @@
 
 namespace Magento\Sales\Test\Unit\Model\Order;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use \Magento\Sales\Model\Order\CreditmemoRepository;
 
 /**
@@ -29,6 +30,11 @@ class CreditmemoRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $searchResultFactoryMock;
 
+    /**
+     * @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessorMock;
+    
     protected function setUp()
     {
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
@@ -40,11 +46,14 @@ class CreditmemoRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
+        $this->collectionProcessorMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
         $this->creditmemo = $objectManager->getObject(
             \Magento\Sales\Model\Order\CreditmemoRepository::class,
             [
                 'metadata' => $this->metadataMock,
-                'searchResultFactory' => $this->searchResultFactoryMock
+                'searchResultFactory' => $this->searchResultFactoryMock,
+                'collectionProcessor' => $this->collectionProcessorMock,
             ]
         );
         $this->type = $this->getMock(\Magento\Eav\Model\Entity\Type::class, ['fetchNewIncrementId'], [], '', false);
@@ -120,44 +129,15 @@ class CreditmemoRepositoryTest extends \PHPUnit_Framework_TestCase
 
     public function testGetList()
     {
-        $filterGroup = $this->getMockBuilder(\Magento\Framework\Api\Search\FilterGroup::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $filterGroups = [$filterGroup];
-        $field = 'test_field';
-        $fieldValue = 'test_value';
-
-        $filter = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $filter->expects($this->any())
-            ->method('getConditionType')
-            ->willReturn(false);
-        $filter->expects($this->any())
-            ->method('getField')
-            ->willReturn($field);
-        $filter->expects($this->any())
-            ->method('getValue')
-            ->willReturn($fieldValue);
-
-        $filterGroup->expects($this->once())
-            ->method('getFilters')
-            ->willReturn([$filter]);
-
         $searchCriteria = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteria::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $searchCriteria->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn($filterGroups);
-
         $collection = $this->getMockBuilder(\Magento\Sales\Model\ResourceModel\Order\Creditmemo\Collection::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->withAnyParameters();
-
+        $this->collectionProcessorMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteria, $collection);
         $this->searchResultFactoryMock->expects($this->once())
             ->method('create')
             ->willReturn($collection);
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceValidatorTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php
similarity index 66%
rename from app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceValidatorTest.php
rename to app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php
index 6fdfdb61b36359d367200e8506ef9484200c723e..8d800e12a6ff0a562330aee3ea09f25f44fae23d 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceValidatorTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceQuantityValidatorTest.php
@@ -6,15 +6,16 @@
 
 namespace Magento\Sales\Test\Unit\Model\Order;
 
+use Magento\Sales\Api\OrderRepositoryInterface;
 use Magento\Sales\Model\Order;
 
 /**
  * Test for \Magento\Sales\Model\Order\InvoiceValidator class
  */
-class InvoiceValidatorTest extends \PHPUnit_Framework_TestCase
+class InvoiceQuantityValidatorTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Sales\Model\Order\InvoiceValidatorInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Sales\Model\Order\InvoiceQuantityValidator|\PHPUnit_Framework_MockObject_MockObject
      */
     private $model;
 
@@ -24,14 +25,14 @@ class InvoiceValidatorTest extends \PHPUnit_Framework_TestCase
     private $objectManager;
 
     /**
-     * @var \Magento\Sales\Model\Order\OrderValidatorInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Sales\Api\Data\OrderInterface|\PHPUnit_Framework_MockObject_MockObject
      */
-    private $orderValidatorMock;
+    private $orderMock;
 
     /**
-     * @var \Magento\Sales\Api\Data\OrderInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Sales\Api\OrderRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject
      */
-    private $orderMock;
+    private $orderRepositoryMock;
 
     /**
      * @var \Magento\Sales\Api\Data\InvoiceInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -42,24 +43,21 @@ class InvoiceValidatorTest extends \PHPUnit_Framework_TestCase
     {
         $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
 
-        $this->orderValidatorMock = $this->getMockBuilder(\Magento\Sales\Model\Order\OrderValidatorInterface::class)
-            ->disableOriginalConstructor()
-            ->setMethods(['canInvoice'])
-            ->getMockForAbstractClass();
-
         $this->orderMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderInterface::class)
             ->disableOriginalConstructor()
-            ->setMethods(['getStatus'])
             ->getMockForAbstractClass();
 
         $this->invoiceMock = $this->getMockBuilder(\Magento\Sales\Api\Data\InvoiceInterface::class)
             ->disableOriginalConstructor()
             ->setMethods(['getTotalQty', 'getItems'])
             ->getMockForAbstractClass();
-
+        $this->orderRepositoryMock = $this->getMockBuilder(
+            OrderRepositoryInterface::class
+        )->disableOriginalConstructor()->getMockForAbstractClass();
+        $this->orderRepositoryMock->expects($this->any())->method('get')->willReturn($this->orderMock);
         $this->model = $this->objectManager->getObject(
-            \Magento\Sales\Model\Order\InvoiceValidator::class,
-            ['orderValidator' => $this->orderValidatorMock]
+            \Magento\Sales\Model\Order\InvoiceQuantityValidator::class,
+            ['orderRepository' => $this->orderRepositoryMock]
         );
     }
 
@@ -75,39 +73,12 @@ class InvoiceValidatorTest extends \PHPUnit_Framework_TestCase
         $this->orderMock->expects($this->once())
             ->method('getItems')
             ->willReturn([$orderItemMock]);
-        $this->orderValidatorMock->expects($this->once())
-            ->method('canInvoice')
-            ->with($this->orderMock)
-            ->willReturn(true);
-        $this->assertEquals(
-            $expectedResult,
-            $this->model->validate($this->invoiceMock, $this->orderMock)
-        );
-    }
-
-    public function testValidateCanNotInvoiceOrder()
-    {
-        $orderStatus = 'Test Status';
-        $expectedResult = [__('An invoice cannot be created when an order has a status of %1.', $orderStatus)];
-        $invoiceItemMock = $this->getInvoiceItemMock(1, 1);
-        $this->invoiceMock->expects($this->once())
-            ->method('getItems')
-            ->willReturn([$invoiceItemMock]);
-
-        $orderItemMock = $this->getOrderItemMock(1, 1, true);
-        $this->orderMock->expects($this->once())
-            ->method('getItems')
-            ->willReturn([$orderItemMock]);
-        $this->orderMock->expects($this->once())
-            ->method('getStatus')
-            ->willReturn($orderStatus);
-        $this->orderValidatorMock->expects($this->once())
-            ->method('canInvoice')
-            ->with($this->orderMock)
-            ->willReturn(false);
+        $this->invoiceMock->expects($this->exactly(2))
+            ->method('getOrderId')
+            ->willReturn(1);
         $this->assertEquals(
             $expectedResult,
-            $this->model->validate($this->invoiceMock, $this->orderMock)
+            $this->model->validate($this->invoiceMock)
         );
     }
 
@@ -125,13 +96,12 @@ class InvoiceValidatorTest extends \PHPUnit_Framework_TestCase
         $this->orderMock->expects($this->once())
             ->method('getItems')
             ->willReturn([$orderItemMock]);
-        $this->orderValidatorMock->expects($this->once())
-            ->method('canInvoice')
-            ->with($this->orderMock)
-            ->willReturn(true);
+        $this->invoiceMock->expects($this->exactly(2))
+            ->method('getOrderId')
+            ->willReturn(1);
         $this->assertEquals(
             $expectedResult,
-            $this->model->validate($this->invoiceMock, $this->orderMock)
+            $this->model->validate($this->invoiceMock)
         );
     }
 
@@ -146,13 +116,21 @@ class InvoiceValidatorTest extends \PHPUnit_Framework_TestCase
         $this->orderMock->expects($this->once())
             ->method('getItems')
             ->willReturn([]);
-        $this->orderValidatorMock->expects($this->once())
-            ->method('canInvoice')
-            ->with($this->orderMock)
-            ->willReturn(true);
+        $this->invoiceMock->expects($this->exactly(2))
+            ->method('getOrderId')
+            ->willReturn(1);
+        $this->assertEquals(
+            $expectedResult,
+            $this->model->validate($this->invoiceMock)
+        );
+    }
+
+    public function testValidateNoOrder()
+    {
+        $expectedResult = [__('Order Id is required for invoice document')];
         $this->assertEquals(
             $expectedResult,
-            $this->model->validate($this->invoiceMock, $this->orderMock)
+            $this->model->validate($this->invoiceMock)
         );
     }
 
@@ -169,13 +147,12 @@ class InvoiceValidatorTest extends \PHPUnit_Framework_TestCase
         $this->orderMock->expects($this->once())
             ->method('getItems')
             ->willReturn([$orderItemMock]);
-        $this->orderValidatorMock->expects($this->once())
-            ->method('canInvoice')
-            ->with($this->orderMock)
-            ->willReturn(true);
+        $this->invoiceMock->expects($this->exactly(2))
+            ->method('getOrderId')
+            ->willReturn(1);
         $this->assertEquals(
             $expectedResult,
-            $this->model->validate($this->invoiceMock, $this->orderMock)
+            $this->model->validate($this->invoiceMock)
         );
     }
 
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/ItemRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/ItemRepositoryTest.php
index 76509010d70d38e94b8bed8c21e32fef26965430..48b99d5c55d634d23fa8c3eb4e4be7d8e3b4476b 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/ItemRepositoryTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/ItemRepositoryTest.php
@@ -42,6 +42,11 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $extensionFactory;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * @var array
      */
@@ -72,6 +77,14 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
+
         $this->extensionFactory = $this->getMockBuilder(\Magento\Catalog\Api\Data\ProductOptionExtensionFactory::class)
             ->setMethods([
                 'create',
@@ -91,7 +104,9 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase
             $this->metadata,
             $this->searchResultFactory,
             $this->productOptionFactory,
-            $this->extensionFactory
+            $this->extensionFactory,
+            [],
+            $this->collectionProcessor
         );
 
         $model->get(null);
@@ -125,7 +140,9 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase
             $this->metadata,
             $this->searchResultFactory,
             $this->productOptionFactory,
-            $this->extensionFactory
+            $this->extensionFactory,
+            [],
+            $this->collectionProcessor
         );
 
         $model->get($orderItemId);
@@ -164,52 +181,17 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase
     public function testGetList()
     {
         $productType = 'configurable';
-        $field = 'field';
-        $value = 'value';
-
         $this->productOptionData = ['option1' => 'value1'];
-
-        $filterMock = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $filterMock->expects($this->once())
-            ->method('getConditionType')
-            ->willReturn(null);
-        $filterMock->expects($this->once())
-            ->method('getField')
-            ->willReturn($field);
-        $filterMock->expects($this->once())
-            ->method('getValue')
-            ->willReturn($value);
-
-        $filterGroupMock = $this->getMockBuilder(\Magento\Framework\Api\Search\FilterGroup::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $filterGroupMock->expects($this->once())
-            ->method('getFilters')
-            ->willReturn([$filterMock]);
-
         $searchCriteriaMock = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteria::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $searchCriteriaMock->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn([$filterGroupMock]);
-
         $this->getProductOptionExtensionMock();
         $productOption = $this->getProductOptionMock();
         $orderItemMock = $this->getOrderMock($productType, $productOption);
 
-        $searchResultMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderItemSearchResultInterface::class)
-            ->setMethods([
-                'addFieldToFilter',
-                'getItems',
-            ])
-            ->getMockForAbstractClass();
-        $searchResultMock->expects($this->once())
-            ->method('addFieldToFilter')
-            ->with($field, ['eq' => $value])
-            ->willReturnSelf();
+        $searchResultMock = $this->getMockBuilder(\Magento\Sales\Model\ResourceModel\Order\Item\Collection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
         $searchResultMock->expects($this->once())
             ->method('getItems')
             ->willReturn([$orderItemMock]);
@@ -310,8 +292,9 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase
             $this->extensionFactory,
             [
                 $productType => $this->productOptionProcessorMock,
-                'custom_options' => $this->productOptionProcessorMock,
-            ]
+                'custom_options' => $this->productOptionProcessorMock
+            ],
+            $this->collectionProcessor
         );
         return $model;
     }
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php
index ab2f42acfd51e99c6ac962bf262391f5c9c764ab..d5c893cbde9be40dd9f08d7ff4a39e89d26a1917 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/RepositoryTest.php
@@ -47,6 +47,11 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $paymentResource;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * @var \Magento\Sales\Model\Order\Payment\Repository
      */
@@ -104,11 +109,19 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->repository = $objectManager->getObject(
             \Magento\Sales\Model\Order\Payment\Repository::class,
             [
                 'searchResultFactory' => $this->searchResultFactory,
                 'metaData' => $this->metaData,
+                'collectionProcessor' => $this->collectionProcessor,
             ]
         );
     }
@@ -173,9 +186,10 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
 
     public function testGetList()
     {
-        $field = 'order_id';
-        $value = 45;
-        $this->getListMock($field, $value);
+        $this->searchResultFactory->expects($this->atLeastOnce())->method('create')->willReturn($this->collection);
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($this->searchCriteria, $this->collection);
         $this->assertSame($this->collection, $this->repository->getList($this->searchCriteria));
     }
 
@@ -195,25 +209,4 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
 
         return $payment;
     }
-
-    /**
-     * @param $field
-     * @param $value
-     */
-    protected function getListMock($field, $value)
-    {
-        $currentPage = 1;
-        $pageSize = 10;
-        $this->searchResultFactory->expects($this->atLeastOnce())->method('create')->willReturn($this->collection);
-        $this->searchCriteria->expects($this->once())->method('getFilterGroups')->willReturn([$this->filterGroup]);
-        $this->filterGroup->expects($this->once())->method('getFilters')->willReturn([$this->filter]);
-        $this->filter->expects($this->once())->method('getConditionType')->willReturn(null);
-        $this->filter->expects($this->once())->method('getField')->willReturn($field);
-        $this->filter->expects($this->once())->method('getValue')->willReturn($value);
-        $this->collection->expects($this->once())->method('addFieldToFilter')->with($field, ['eq' => $value]);
-        $this->searchCriteria->expects($this->once())->method('getCurrentPage')->willReturn($currentPage);
-        $this->searchCriteria->expects($this->once())->method('getPageSize')->willReturn($pageSize);
-        $this->collection->expects($this->once())->method('setCurPage')->with();
-        $this->collection->expects($this->once())->method('setPageSize')->with();
-    }
 }
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/RepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/RepositoryTest.php
index 6526b4e729b5f9a8e4c10cab09d4df1cd58f0f90..4445317f31d463a242e7a6c7ed517bb26ef39014 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/RepositoryTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Payment/Transaction/RepositoryTest.php
@@ -74,6 +74,11 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $repository;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * @return void
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
@@ -166,6 +171,13 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
             false
         );
         $entityStorageFactory->expects($this->once())->method('create')->willReturn($this->entityStorage);
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->repository = $objectManager->getObject(
             \Magento\Sales\Model\Order\Payment\Transaction\Repository::class,
             [
@@ -175,6 +187,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
                 'sortOrderBuilder' => $this->sortOrderBuilder,
                 'metaData' => $this->metaData,
                 'entityStorageFactory' => $entityStorageFactory,
+                'collectionProcessor' => $this->collectionProcessor
             ]
         );
     }
@@ -265,9 +278,10 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
 
     public function testGetList()
     {
-        $field = 'txn_id';
-        $value = '33-refund';
-        $this->getListMock($field, $value);
+        $this->initListMock();
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($this->searchCriteria, $this->collection);
         $this->assertSame($this->collection, $this->repository->getList($this->searchCriteria));
     }
 
@@ -376,9 +390,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
             $transactionIdSort,
             $createdAtSort
         );
-        $this->searchCriteriaBuilder->expects($this->once())
+        $this->searchCriteriaBuilder->expects($this->exactly(2))
             ->method('addFilters')
-            ->with([$this->filter, $this->filter])
+            ->with([$this->filter])
             ->willReturnSelf();
         $this->searchCriteriaBuilder->expects($this->exactly(2))
             ->method('addSortOrder')
@@ -389,7 +403,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
         $this->searchCriteriaBuilder->expects($this->once())
             ->method('create')
             ->willReturn($this->searchCriteria);
-        $this->getListMock(\Magento\Sales\Api\Data\TransactionInterface::TXN_TYPE, $transactionType);
+        $this->initListMock();
         $transaction = $this->mockTransaction(1, true);
         $this->collection->expects($this->once())->method('getItems')->willReturn([$transaction]);
         $this->entityStorage->expects($this->once())
@@ -439,24 +453,11 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @param $field
-     * @param $value
+     * @return void
      */
-    protected function getListMock($field, $value)
+    protected function initListMock()
     {
-        $currentPage = 1;
-        $pageSize = 10;
         $this->searchResultFactory->method('create')->willReturn($this->collection);
-        $this->searchCriteria->expects($this->once())->method('getFilterGroups')->willReturn([$this->filterGroup]);
-        $this->filterGroup->expects($this->once())->method('getFilters')->willReturn([$this->filter]);
-        $this->filter->expects($this->once())->method('getConditionType')->willReturn(null);
-        $this->filter->expects($this->once())->method('getField')->willReturn($field);
-        $this->filter->expects($this->once())->method('getValue')->willReturn($value);
-        $this->collection->expects($this->once())->method('addFieldToFilter')->with($field, ['eq' => $value]);
-        $this->searchCriteria->expects($this->once())->method('getCurrentPage')->willReturn($currentPage);
-        $this->searchCriteria->expects($this->once())->method('getPageSize')->willReturn($pageSize);
-        $this->collection->expects($this->once())->method('setCurPage')->with();
-        $this->collection->expects($this->once())->method('setPageSize')->with();
         $this->collection->expects($this->once())->method('addPaymentInformation')->with(['method']);
         $this->collection->expects($this->once())->method('addOrderInformation')->with(['increment_id']);
     }
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/OrderRegistrarTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/OrderRegistrarTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..e5bff791edcca99d72918eaacb915a4257b60e37
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/OrderRegistrarTest.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Test\Unit\Model\Order\Shipment;
+
+class OrderRegistrarTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Sales\Model\Order\Shipment\OrderRegistrar
+     */
+    private $model;
+
+    /**
+     * @var \Magento\Sales\Api\Data\OrderInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderMock;
+
+    /**
+     * @var \Magento\Sales\Api\Data\ShipmentInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentMock;
+
+    protected function setUp()
+    {
+        $this->orderMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+        $this->shipmentMock = $this->getMockBuilder(\Magento\Sales\Api\Data\ShipmentInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->model = new \Magento\Sales\Model\Order\Shipment\OrderRegistrar();
+    }
+
+    public function testRegister()
+    {
+        $item1 = $this->getShipmentItemMock();
+        $item1->expects($this->once())
+            ->method('getQty')
+            ->willReturn(0);
+        $item1->expects($this->never())
+            ->method('register');
+
+        $item2 = $this->getShipmentItemMock();
+        $item2->expects($this->once())
+            ->method('getQty')
+            ->willReturn(0.5);
+        $item2->expects($this->once())
+            ->method('register');
+
+        $items = [$item1, $item2];
+        $this->shipmentMock->expects($this->once())
+            ->method('getItems')
+            ->willReturn($items);
+        $this->assertEquals(
+            $this->orderMock,
+            $this->model->register($this->orderMock, $this->shipmentMock)
+        );
+    }
+
+    /**
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     */
+    private function getShipmentItemMock()
+    {
+        return $this->getMockBuilder(\Magento\Sales\Api\Data\ShipmentItemInterface::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['register'])
+            ->getMockForAbstractClass();
+    }
+}
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Sender/EmailSenderTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Sender/EmailSenderTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..8373c7e57d0fe32a400a02f0f77362b9676bf3f6
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Sender/EmailSenderTest.php
@@ -0,0 +1,361 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Test\Unit\Model\Order\Shipment\Sender;
+
+/**
+ * Unit test for email notification sender for Shipment.
+ *
+ * @SuppressWarnings(PHPMD.TooManyFields)
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class EmailSenderTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Sales\Model\Order\Shipment\Sender\EmailSender
+     */
+    private $subject;
+
+    /**
+     * @var \Magento\Sales\Model\Order|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderMock;
+
+    /**
+     * @var \Magento\Store\Model\Store|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $storeMock;
+
+    /**
+     * @var \Magento\Sales\Model\Order\Email\Sender|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $senderMock;
+
+    /**
+     * @var \Psr\Log\LoggerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $loggerMock;
+
+    /**
+     * @var \Magento\Sales\Api\Data\ShipmentInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentMock;
+
+    /**
+     * @var \Magento\Sales\Api\Data\ShipmentCommentCreationInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $commentMock;
+
+    /**
+     * @var \Magento\Sales\Model\Order\Address|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $addressMock;
+
+    /**
+     * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $globalConfigMock;
+
+    /**
+     * @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $eventManagerMock;
+
+    /**
+     * @var \Magento\Payment\Model\Info|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $paymentInfoMock;
+
+    /**
+     * @var \Magento\Payment\Helper\Data|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $paymentHelperMock;
+
+    /**
+     * @var \Magento\Sales\Model\ResourceModel\Order\Shipment|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentResourceMock;
+
+    /**
+     * @var \Magento\Sales\Model\Order\Address\Renderer|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $addressRendererMock;
+
+    /**
+     * @var \Magento\Sales\Model\Order\Email\Container\Template|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $templateContainerMock;
+
+    /**
+     * @var \Magento\Sales\Model\Order\Email\Container\ShipmentIdentity|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $identityContainerMock;
+
+    /**
+     * @var \Magento\Sales\Model\Order\Email\SenderBuilderFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $senderBuilderFactoryMock;
+
+    /**
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
+     */
+    protected function setUp()
+    {
+        $this->orderMock = $this->getMockBuilder(\Magento\Sales\Model\Order::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class)
+            ->setMethods(['getStoreId'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->storeMock->expects($this->any())
+            ->method('getStoreId')
+            ->willReturn(1);
+        $this->orderMock->expects($this->any())
+            ->method('getStore')
+            ->willReturn($this->storeMock);
+
+        $this->senderMock = $this->getMockBuilder(\Magento\Sales\Model\Order\Email\Sender::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['send', 'sendCopyTo'])
+            ->getMock();
+
+        $this->loggerMock = $this->getMockBuilder(\Psr\Log\LoggerInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->shipmentMock = $this->getMockBuilder(\Magento\Sales\Model\Order\Shipment::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['setSendEmail', 'setEmailSent'])
+            ->getMock();
+
+        $this->commentMock = $this->getMockBuilder(\Magento\Sales\Api\Data\ShipmentCommentCreationInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->commentMock->expects($this->any())
+            ->method('getComment')
+            ->willReturn('Comment text');
+
+        $this->addressMock = $this->getMockBuilder(\Magento\Sales\Model\Order\Address::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->orderMock->expects($this->any())
+            ->method('getBillingAddress')
+            ->willReturn($this->addressMock);
+        $this->orderMock->expects($this->any())
+            ->method('getShippingAddress')
+            ->willReturn($this->addressMock);
+
+        $this->globalConfigMock = $this->getMockBuilder(\Magento\Framework\App\Config\ScopeConfigInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->eventManagerMock = $this->getMockBuilder(\Magento\Framework\Event\ManagerInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->paymentInfoMock = $this->getMockBuilder(\Magento\Payment\Model\Info::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->orderMock->expects($this->any())
+            ->method('getPayment')
+            ->willReturn($this->paymentInfoMock);
+
+        $this->paymentHelperMock = $this->getMockBuilder(\Magento\Payment\Helper\Data::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->paymentHelperMock->expects($this->any())
+            ->method('getInfoBlockHtml')
+            ->with($this->paymentInfoMock, 1)
+            ->willReturn('Payment Info Block');
+
+        $this->shipmentResourceMock = $this->getMockBuilder(\Magento\Sales\Model\ResourceModel\Order\Shipment::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->addressRendererMock = $this->getMockBuilder(\Magento\Sales\Model\Order\Address\Renderer::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->addressRendererMock->expects($this->any())
+            ->method('format')
+            ->with($this->addressMock, 'html')
+            ->willReturn('Formatted address');
+
+        $this->templateContainerMock = $this->getMockBuilder(\Magento\Sales\Model\Order\Email\Container\Template::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->identityContainerMock = $this->getMockBuilder(
+            \Magento\Sales\Model\Order\Email\Container\ShipmentIdentity::class
+        )
+        ->disableOriginalConstructor()
+        ->getMock();
+
+        $this->identityContainerMock->expects($this->any())
+            ->method('getStore')
+            ->willReturn($this->storeMock);
+
+        $this->senderBuilderFactoryMock = $this->getMockBuilder(
+            \Magento\Sales\Model\Order\Email\SenderBuilderFactory::class
+        )
+        ->disableOriginalConstructor()
+        ->setMethods(['create'])
+        ->getMock();
+
+        $this->subject = new \Magento\Sales\Model\Order\Shipment\Sender\EmailSender(
+            $this->templateContainerMock,
+            $this->identityContainerMock,
+            $this->senderBuilderFactoryMock,
+            $this->loggerMock,
+            $this->addressRendererMock,
+            $this->paymentHelperMock,
+            $this->shipmentResourceMock,
+            $this->globalConfigMock,
+            $this->eventManagerMock
+        );
+    }
+
+    /**
+     * @param int $configValue
+     * @param bool $forceSyncMode
+     * @param bool $isComment
+     * @param bool $emailSendingResult
+     *
+     * @dataProvider sendDataProvider
+     *
+     * @return void
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
+     */
+    public function testSend($configValue, $forceSyncMode, $isComment, $emailSendingResult)
+    {
+        $this->globalConfigMock->expects($this->once())
+            ->method('getValue')
+            ->with('sales_email/general/async_sending')
+            ->willReturn($configValue);
+
+        if (!$isComment) {
+            $this->commentMock = null;
+        }
+
+        $this->shipmentMock->expects($this->once())
+            ->method('setSendEmail')
+            ->with(true);
+
+        if (!$configValue || $forceSyncMode) {
+            $transport = [
+                'order' => $this->orderMock,
+                'shipment' => $this->shipmentMock,
+                'comment' => $isComment ? 'Comment text' : '',
+                'billing' => $this->addressMock,
+                'payment_html' => 'Payment Info Block',
+                'store' => $this->storeMock,
+                'formattedShippingAddress' => 'Formatted address',
+                'formattedBillingAddress' => 'Formatted address',
+            ];
+
+            $this->eventManagerMock->expects($this->once())
+                ->method('dispatch')
+                ->with(
+                    'email_shipment_set_template_vars_before',
+                    [
+                        'sender' => $this->subject,
+                        'transport' => $transport,
+                    ]
+                );
+
+            $this->templateContainerMock->expects($this->once())
+                ->method('setTemplateVars')
+                ->with($transport);
+
+            $this->identityContainerMock->expects($this->once())
+                ->method('isEnabled')
+                ->willReturn($emailSendingResult);
+
+            if ($emailSendingResult) {
+                $this->senderBuilderFactoryMock->expects($this->once())
+                    ->method('create')
+                    ->willReturn($this->senderMock);
+
+                $this->senderMock->expects($this->once())
+                    ->method('send');
+
+                $this->senderMock->expects($this->once())
+                    ->method('sendCopyTo');
+
+                $this->shipmentMock->expects($this->once())
+                    ->method('setEmailSent')
+                    ->with(true);
+
+                $this->shipmentResourceMock->expects($this->once())
+                    ->method('saveAttribute')
+                    ->with($this->shipmentMock, ['send_email', 'email_sent']);
+
+                $this->assertTrue(
+                    $this->subject->send(
+                        $this->orderMock,
+                        $this->shipmentMock,
+                        $this->commentMock,
+                        $forceSyncMode
+                    )
+                );
+            } else {
+                $this->shipmentResourceMock->expects($this->once())
+                    ->method('saveAttribute')
+                    ->with($this->shipmentMock, 'send_email');
+
+                $this->assertFalse(
+                    $this->subject->send(
+                        $this->orderMock,
+                        $this->shipmentMock,
+                        $this->commentMock,
+                        $forceSyncMode
+                    )
+                );
+            }
+        } else {
+            $this->shipmentMock->expects($this->once())
+                ->method('setEmailSent')
+                ->with(null);
+
+            $this->shipmentResourceMock->expects($this->at(0))
+                ->method('saveAttribute')
+                ->with($this->shipmentMock, 'email_sent');
+            $this->shipmentResourceMock->expects($this->at(1))
+                ->method('saveAttribute')
+                ->with($this->shipmentMock, 'send_email');
+
+            $this->assertFalse(
+                $this->subject->send(
+                    $this->orderMock,
+                    $this->shipmentMock,
+                    $this->commentMock,
+                    $forceSyncMode
+                )
+            );
+        }
+    }
+
+    /**
+     * @return array
+     */
+    public function sendDataProvider()
+    {
+        return [
+            'Successful sync sending with comment' => [0, false, true, true],
+            'Successful sync sending without comment' => [0, false, false, true],
+            'Failed sync sending with comment' => [0, false, true, false],
+            'Successful forced sync sending with comment' => [1, true, true, true],
+            'Async sending' => [1, false, false, false],
+        ];
+    }
+}
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Validation/QuantityValidatorTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Validation/QuantityValidatorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..01cccd2458695247f2c67f8e35fd40a71dc1b757
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Validation/QuantityValidatorTest.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Test\Unit\Model\Order\Shipment\Validation;
+
+use Magento\Sales\Model\Order\Shipment\Validation\QuantityValidator;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Sales\Api\Data\ShipmentInterface;
+use Magento\Sales\Api\Data\ShipmentItemInterface;
+
+/**
+ * Class QuantityValidatorTest
+ */
+class QuantityValidatorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var QuantityValidator
+     */
+    private $validator;
+
+    /**
+     * @var ShipmentInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentMock;
+
+    /**
+     * @var ShipmentItemInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentItemMock;
+
+    protected function setUp()
+    {
+        $objectManagerHelper = new ObjectManager($this);
+        $this->shipmentMock = $this->getMockBuilder(ShipmentInterface::class)
+            ->getMock();
+        $this->shipmentItemMock = $this->getMockBuilder(ShipmentItemInterface::class)
+            ->getMock();
+        $this->validator = $objectManagerHelper->getObject(QuantityValidator::class);
+    }
+
+    public function testValidateTrackWithoutOrderId()
+    {
+        $this->shipmentMock->expects($this->once())
+            ->method('getOrderId')
+            ->willReturn(null);
+        $this->assertEquals(
+            [__('Order Id is required for shipment document')],
+            $this->validator->validate($this->shipmentMock)
+        );
+    }
+
+    public function testValidateTrackWithoutItems()
+    {
+        $this->shipmentMock->expects($this->once())
+            ->method('getOrderId')
+            ->willReturn(1);
+        $this->shipmentMock->expects($this->once())
+            ->method('getItems')
+            ->willReturn(null);
+        $this->assertEquals(
+            [__('You can\'t create a shipment without products.')],
+            $this->validator->validate($this->shipmentMock)
+        );
+    }
+}
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Validation/TrackValidatorTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Validation/TrackValidatorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..0d8d951ccf18acd29649b8de05a5c3f97ce5a8c1
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Shipment/Validation/TrackValidatorTest.php
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Test\Unit\Model\Order\Shipment\Validation;
+
+use Magento\Sales\Model\Order\Shipment\Validation\TrackValidator;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Sales\Api\Data\ShipmentInterface;
+use Magento\Sales\Api\Data\ShipmentTrackInterface;
+
+/**
+ * Class TrackValidatorTest
+ */
+class TrackValidatorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var TrackValidator
+     */
+    private $validator;
+
+    /**
+     * @var ShipmentInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentMock;
+
+    /**
+     * @var ShipmentTrackInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentTrackMock;
+
+    protected function setUp()
+    {
+        $objectManagerHelper = new ObjectManager($this);
+        $this->shipmentMock = $this->getMockBuilder(ShipmentInterface::class)
+            ->getMockForAbstractClass();
+        $this->shipmentTrackMock = $this->getMockBuilder(ShipmentTrackInterface::class)
+            ->getMockForAbstractClass();
+        $this->validator = $objectManagerHelper->getObject(TrackValidator::class);
+    }
+
+    public function testValidateTrackWithNumber()
+    {
+        $this->shipmentTrackMock->expects($this->once())
+            ->method('getTrackNumber')
+            ->willReturn('12345');
+        $this->shipmentMock->expects($this->exactly(2))
+            ->method('getTracks')
+            ->willReturn([$this->shipmentTrackMock]);
+        $this->assertEquals([], $this->validator->validate($this->shipmentMock));
+    }
+
+    public function testValidateTrackWithoutNumber()
+    {
+        $this->shipmentTrackMock->expects($this->once())
+            ->method('getTrackNumber')
+            ->willReturn(null);
+        $this->shipmentMock->expects($this->exactly(2))
+            ->method('getTracks')
+            ->willReturn([$this->shipmentTrackMock]);
+        $this->assertEquals([__('Please enter a tracking number.')], $this->validator->validate($this->shipmentMock));
+    }
+
+    public function testValidateTrackWithEmptyTracks()
+    {
+        $this->shipmentTrackMock->expects($this->never())
+            ->method('getTrackNumber');
+        $this->shipmentMock->expects($this->once())
+            ->method('getTracks')
+            ->willReturn([]);
+        $this->assertEquals([], $this->validator->validate($this->shipmentMock));
+    }
+}
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentDocumentFactoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentDocumentFactoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..b0677b050f6fbe4f7b1894a34481a6aa59fcecd9
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentDocumentFactoryTest.php
@@ -0,0 +1,195 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Test\Unit\Model\Order;
+
+use Magento\Framework\EntityManager\HydratorPool;
+use Magento\Sales\Api\Data\ShipmentCommentCreationInterface;
+use Magento\Sales\Api\Data\ShipmentItemCreationInterface;
+use Magento\Sales\Api\Data\ShipmentTrackCreationInterface;
+use Magento\Sales\Model\Order\ShipmentFactory;
+use Magento\Sales\Model\Order\ShipmentDocumentFactory;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Api\Data\ShipmentInterface;
+use Magento\Sales\Model\Order\Shipment\TrackFactory;
+use Magento\Sales\Model\Order\Shipment\Track;
+use Magento\Framework\EntityManager\HydratorInterface;
+
+/**
+ * Class ShipmentDocumentFactoryTest
+ */
+class ShipmentDocumentFactoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|ShipmentFactory
+     */
+    private $shipmentFactoryMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|Order
+     */
+    private $orderMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|ShipmentItemCreationInterface
+     */
+    private $itemMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|ShipmentCommentCreationInterface
+     */
+    private $commentMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|ShipmentInterface
+     */
+    private $shipmentMock;
+
+    /**
+     * @var ShipmentDocumentFactory
+     */
+    private $shipmentDocumentFactory;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|HydratorPool
+     */
+    private $hydratorPoolMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|TrackFactory
+     */
+    private $trackFactoryMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|HydratorInterface
+     */
+    private $hydratorMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|Track
+     */
+    private $trackMock;
+
+    protected function setUp()
+    {
+        $this->shipmentFactoryMock = $this->getMockBuilder(ShipmentFactory::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->orderMock = $this->getMockBuilder(Order::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->itemMock = $this->getMockBuilder(ShipmentItemCreationInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->commentMock = $this->getMockBuilder(ShipmentCommentCreationInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->shipmentMock = $this->getMockBuilder(ShipmentInterface::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['addComment', 'addTrack'])
+            ->getMockForAbstractClass();
+
+        $this->hydratorPoolMock = $this->getMockBuilder(HydratorPool::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->trackFactoryMock = $this->getMockBuilder(TrackFactory::class)
+            ->setMethods(['create'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->trackMock = $this->getMockBuilder(Track::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->hydratorMock = $this->getMockBuilder(HydratorInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->shipmentDocumentFactory = new ShipmentDocumentFactory(
+            $this->shipmentFactoryMock,
+            $this->hydratorPoolMock,
+            $this->trackFactoryMock
+        );
+    }
+
+    public function testCreate()
+    {
+        $trackNum = "123456789";
+        $trackData = [$trackNum];
+        $tracks = [$this->trackMock];
+        $appendComment = true;
+        $packages = [];
+        $items = [1 => 10];
+
+        $this->itemMock->expects($this->once())
+            ->method('getOrderItemId')
+            ->willReturn(1);
+
+        $this->itemMock->expects($this->once())
+            ->method('getQty')
+            ->willReturn(10);
+
+        $this->shipmentFactoryMock->expects($this->once())
+            ->method('create')
+            ->with(
+                $this->orderMock,
+                $items
+            )
+            ->willReturn($this->shipmentMock);
+
+        $this->shipmentMock->expects($this->once())
+            ->method('addTrack')
+            ->willReturnSelf();
+
+        $this->hydratorPoolMock->expects($this->once())
+            ->method('getHydrator')
+            ->with(ShipmentTrackCreationInterface::class)
+            ->willReturn($this->hydratorMock);
+
+        $this->hydratorMock->expects($this->once())
+            ->method('extract')
+            ->with($this->trackMock)
+            ->willReturn($trackData);
+
+        $this->trackFactoryMock->expects($this->once())
+            ->method('create')
+            ->with(['data' => $trackData])
+            ->willReturn($this->trackMock);
+
+        if ($appendComment) {
+            $comment = "New comment!";
+            $visibleOnFront = true;
+            $this->commentMock->expects($this->once())
+                ->method('getComment')
+                ->willReturn($comment);
+
+            $this->commentMock->expects($this->once())
+                ->method('getIsVisibleOnFront')
+                ->willReturn($visibleOnFront);
+
+            $this->shipmentMock->expects($this->once())
+                ->method('addComment')
+                ->with($comment, $appendComment, $visibleOnFront)
+                ->willReturnSelf();
+        }
+
+        $this->assertEquals(
+            $this->shipmentDocumentFactory->create(
+                $this->orderMock,
+                [$this->itemMock],
+                $tracks,
+                $this->commentMock,
+                $appendComment,
+                $packages
+            ),
+            $this->shipmentMock
+        );
+    }
+}
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentFactoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentFactoryTest.php
index 3760934457a85eae8f3e4f6f4b8070b1ef7d716a..46d6ac62fc256a45b76edb12c787f4627f8f0ed7 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentFactoryTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentFactoryTest.php
@@ -5,10 +5,9 @@
  */
 namespace Magento\Sales\Test\Unit\Model\Order;
 
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
-
 /**
  * Unit test for shipment factory class.
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class ShipmentFactoryTest extends \PHPUnit_Framework_TestCase
 {
@@ -39,7 +38,7 @@ class ShipmentFactoryTest extends \PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        $objectManager = new ObjectManager($this);
+        $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
 
         $this->converter = $this->getMock(
             \Magento\Sales\Model\Convert\Order::class,
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentRepositoryTest.php
index 3f213e899a6c93dbbede4e1a8deb1e84db77a500..4b87dcbd69ab4f96a551bc39057995dc26f27933 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentRepositoryTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentRepositoryTest.php
@@ -32,6 +32,11 @@ class ShipmentRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $searchResultFactory;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     protected function setUp()
     {
         $objectManager = new ObjectManager($this);
@@ -51,12 +56,19 @@ class ShipmentRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->subject = $objectManager->getObject(
             \Magento\Sales\Model\Order\ShipmentRepository::class,
             [
                 'metadata' => $this->metadata,
-                'searchResultFactory' => $this->searchResultFactory
+                'searchResultFactory' => $this->searchResultFactory,
+                'collectionProcessor' => $this->collectionProcessor
             ]
         );
     }
@@ -131,56 +143,24 @@ class ShipmentRepositoryTest extends \PHPUnit_Framework_TestCase
 
     public function testGetList()
     {
-        $filter = $this->getMock(
-            \Magento\Framework\Api\Filter::class,
-            ['getConditionType', 'getField', 'getValue'],
-            [],
-            '',
-            false
-        );
-        $filter->expects($this->any())
-            ->method('getConditionType')
-            ->willReturn(false);
-        $filter->expects($this->any())
-            ->method('getField')
-            ->willReturn('test_field');
-        $filter->expects($this->any())
-            ->method('getValue')
-            ->willReturn('test_value');
-
-        $filterGroup = $this->getMock(
-            \Magento\Framework\Api\Search\FilterGroup::class,
-            ['getFilters'],
-            [],
-            '',
-            false
-        );
-        $filterGroup->expects($this->once())
-            ->method('getFilters')
-            ->willReturn([$filter]);
-
         $searchCriteria = $this->getMock(
             \Magento\Framework\Api\SearchCriteria::class,
-            ['getFilterGroups'],
+            [],
             [],
             '',
             false
         );
-        $searchCriteria->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn([$filterGroup]);
 
         $collection = $this->getMock(
             \Magento\Sales\Model\ResourceModel\Order\Shipment\Collection::class,
-            ['addFieldToFilter'],
+            [],
             [],
             '',
             false
         );
-        $collection->expects($this->once())
-            ->method('addFieldToFilter')
-            ->withAnyParameters();
-
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteria, $collection);
         $this->searchResultFactory->expects($this->once())
             ->method('create')
             ->willReturn($collection);
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/OrderValidatorTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Validation/CanInvoiceTest.php
similarity index 77%
rename from app/code/Magento/Sales/Test/Unit/Model/Order/OrderValidatorTest.php
rename to app/code/Magento/Sales/Test/Unit/Model/Order/Validation/CanInvoiceTest.php
index 905d7c7a5b3f89951afcd261904a99df38f27ce5..dd76bc1e52586fe57a68d1e5c3278441a18eddd6 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/Order/OrderValidatorTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Validation/CanInvoiceTest.php
@@ -4,17 +4,17 @@
  * See COPYING.txt for license details.
  */
 
-namespace Magento\Sales\Test\Unit\Model\Order;
+namespace Magento\Sales\Test\Unit\Model\Order\Validation;
 
 use Magento\Sales\Model\Order;
 
 /**
  * Test for \Magento\Sales\Model\Order\OrderValidator class
  */
-class OrderValidatorTest extends \PHPUnit_Framework_TestCase
+class CanInvoiceTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Sales\Model\Order\OrderValidatorInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Sales\Model\Order\Validation\CanInvoice|\PHPUnit_Framework_MockObject_MockObject
      */
     private $model;
 
@@ -47,7 +47,7 @@ class OrderValidatorTest extends \PHPUnit_Framework_TestCase
             ->setMethods(['getQtyToInvoice', 'getLockedDoInvoice'])
             ->getMockForAbstractClass();
 
-        $this->model = new \Magento\Sales\Model\Order\OrderValidator();
+        $this->model = new \Magento\Sales\Model\Order\Validation\CanInvoice();
     }
 
     /**
@@ -62,9 +62,12 @@ class OrderValidatorTest extends \PHPUnit_Framework_TestCase
             ->willReturn($state);
         $this->orderMock->expects($this->never())
             ->method('getItems');
+        $this->orderMock->expects($this->once())
+            ->method('getStatus')
+            ->willReturn('status');
         $this->assertEquals(
-            false,
-            $this->model->canInvoice($this->orderMock)
+            [__('An invoice cannot be created when an order has a status of %1', 'status')],
+            $this->model->validate($this->orderMock)
         );
     }
 
@@ -93,9 +96,8 @@ class OrderValidatorTest extends \PHPUnit_Framework_TestCase
             ->method('getItems')
             ->willReturn([]);
 
-        $this->assertEquals(
-            false,
-            $this->model->canInvoice($this->orderMock)
+        $this->assertNotEmpty(
+            $this->model->validate($this->orderMock)
         );
     }
 
@@ -125,7 +127,7 @@ class OrderValidatorTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals(
             $expectedResult,
-            $this->model->canInvoice($this->orderMock)
+            $this->model->validate($this->orderMock)
         );
     }
 
@@ -137,10 +139,10 @@ class OrderValidatorTest extends \PHPUnit_Framework_TestCase
     public function canInvoiceDataProvider()
     {
         return [
-            [0, null, false],
-            [-1, null, false],
-            [1, true, false],
-            [0.5, false, true],
+            [0, null, [__('The order does not allow an invoice to be created.')]],
+            [-1, null, [__('The order does not allow an invoice to be created.')]],
+            [1, true, [__('The order does not allow an invoice to be created.')]],
+            [0.5, false, []],
         ];
     }
 }
diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Validation/CanShipTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Validation/CanShipTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..11d99fbb9cced0e9a9d88de161898df42c5a71d7
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Validation/CanShipTest.php
@@ -0,0 +1,146 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Sales\Test\Unit\Model\Order\Validation;
+
+use Magento\Sales\Model\Order;
+
+/**
+ * Test for \Magento\Sales\Model\Order\Validation\CanShip class
+ */
+class CanShipTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Sales\Model\Order\Validation\CanShip|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $model;
+
+    /**
+     * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager
+     */
+    private $objectManager;
+
+    /**
+     * @var \Magento\Sales\Api\Data\OrderInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderMock;
+
+    /**
+     * @var \Magento\Sales\Api\Data\OrderItemInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderItemMock;
+
+    protected function setUp()
+    {
+        $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+
+        $this->orderMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderInterface::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getStatus', 'getItems'])
+            ->getMockForAbstractClass();
+
+        $this->orderItemMock = $this->getMockBuilder(\Magento\Sales\Api\Data\OrderItemInterface::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getQtyToShip', 'getLockedDoShip'])
+            ->getMockForAbstractClass();
+
+        $this->model = new \Magento\Sales\Model\Order\Validation\CanShip();
+    }
+
+    /**
+     * @param string $state
+     *
+     * @dataProvider canShipWrongStateDataProvider
+     */
+    public function testCanShipWrongState($state)
+    {
+        $this->orderMock->expects($this->any())
+            ->method('getState')
+            ->willReturn($state);
+        $this->orderMock->expects($this->once())
+            ->method('getStatus')
+            ->willReturn('status');
+        $this->orderMock->expects($this->never())
+            ->method('getItems');
+        $this->assertEquals(
+            [__('A shipment cannot be created when an order has a status of %1', 'status')],
+            $this->model->validate($this->orderMock)
+        );
+    }
+
+    /**
+     * Data provider for testCanShipWrongState
+     * @return array
+     */
+    public function canShipWrongStateDataProvider()
+    {
+        return [
+            [Order::STATE_PAYMENT_REVIEW],
+            [Order::STATE_HOLDED],
+            [Order::STATE_CANCELED],
+        ];
+    }
+
+    public function testCanShipNoItems()
+    {
+        $this->orderMock->expects($this->any())
+            ->method('getState')
+            ->willReturn(Order::STATE_PROCESSING);
+
+        $this->orderMock->expects($this->once())
+            ->method('getItems')
+            ->willReturn([]);
+
+        $this->assertNotEmpty(
+            $this->model->validate($this->orderMock)
+        );
+    }
+
+    /**
+     * @param float $qtyToShipment
+     * @param bool|null $itemLockedDoShipment
+     * @param bool $expectedResult
+     *
+     * @dataProvider canShipDataProvider
+     */
+    public function testCanShip($qtyToShipment, $itemLockedDoShipment, $expectedResult)
+    {
+        $this->orderMock->expects($this->any())
+            ->method('getState')
+            ->willReturn(Order::STATE_PROCESSING);
+
+        $items = [$this->orderItemMock];
+        $this->orderMock->expects($this->once())
+            ->method('getItems')
+            ->willReturn($items);
+        $this->orderItemMock->expects($this->any())
+            ->method('getQtyToShip')
+            ->willReturn($qtyToShipment);
+        $this->orderItemMock->expects($this->any())
+            ->method('getLockedDoShip')
+            ->willReturn($itemLockedDoShipment);
+
+        $this->assertEquals(
+            $expectedResult,
+            $this->model->validate($this->orderMock)
+        );
+    }
+
+    /**
+     * Data provider for testCanShip
+     *
+     * @return array
+     */
+    public function canShipDataProvider()
+    {
+        return [
+            [0, null, [__('The order does not allow a shipment to be created.')]],
+            [-1, null, [__('The order does not allow a shipment to be created.')]],
+            [1, true, [__('The order does not allow a shipment to be created.')]],
+            [0.5, false, []],
+        ];
+    }
+}
diff --git a/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php
index 67d7fa8852a456bb34be18e38aa6679ebf50e422..5535ac85095c57e40420e47fa427e0205ebc6aff 100644
--- a/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php
@@ -39,6 +39,11 @@ class OrderRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $objectManager;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * Setup the test
      */
@@ -51,12 +56,19 @@ class OrderRepositoryTest extends \PHPUnit_Framework_TestCase
 
         $className = \Magento\Sales\Api\Data\OrderSearchResultInterfaceFactory::class;
         $this->searchResultFactory = $this->getMock($className, ['create'], [], '', false);
-
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->model = $this->objectManager->getObject(
             \Magento\Sales\Model\OrderRepository::class,
             [
                 'metadata' => $this->metadata,
                 'searchResultFactory' => $this->searchResultFactory,
+                'collectionProcessor' => $this->collectionProcessor
             ]
         );
     }
@@ -67,12 +79,8 @@ class OrderRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetList()
     {
-        $fieldName = 'field';
         $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteria::class, [], [], '', false);
         $collectionMock = $this->getMock(\Magento\Sales\Model\ResourceModel\Order\Collection::class, [], [], '', false);
-        $filterGroupMock = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filterGroupFilterMock = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
-        $sortOrderMock = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
         $itemsMock = $this->getMockBuilder(OrderInterface::class)->disableOriginalConstructor()->getMock();
 
         $extensionAttributes = $this->getMock(
@@ -89,29 +97,15 @@ class OrderRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
         $itemsMock->expects($this->once())->method('getExtensionAttributes')->willReturn($extensionAttributes);
         $extensionAttributes->expects($this->any())
             ->method('getShippingAssignments')
             ->willReturn($shippingAssignmentBuilder);
 
         $this->searchResultFactory->expects($this->once())->method('create')->willReturn($collectionMock);
-
-        $searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroupMock]);
-        $filterGroupMock->expects($this->once())->method('getFilters')->willReturn([$filterGroupFilterMock]);
-        $filterGroupFilterMock->expects($this->exactly(2))->method('getConditionType')->willReturn('eq');
-        $filterGroupFilterMock->expects($this->atLeastOnce())->method('getField')->willReturn($fieldName);
-        $filterGroupFilterMock->expects($this->once())->method('getValue')->willReturn('value');
-        $sortOrderMock->expects($this->once())->method('getDirection');
-        $searchCriteriaMock->expects($this->once())->method('getSortOrders')->willReturn([$sortOrderMock]);
-        $sortOrderMock->expects($this->atLeastOnce())->method('getField')->willReturn($fieldName);
-        $collectionMock->expects($this->once())->method('addFieldToFilter')
-            ->willReturn(SortOrder::SORT_ASC);
-        $collectionMock->expects($this->once())->method('addOrder')->with($fieldName, 'DESC');
-        $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->willReturn(4);
-        $collectionMock->expects($this->once())->method('setCurPage')->with(4);
-        $searchCriteriaMock->expects($this->once())->method('getPageSize')->willReturn(42);
-        $collectionMock->expects($this->once())->method('setPageSize')->with(42);
         $collectionMock->expects($this->once())->method('getItems')->willReturn([$itemsMock]);
 
         $this->assertEquals($collectionMock, $this->model->getList($searchCriteriaMock));
diff --git a/app/code/Magento/Sales/Test/Unit/Model/ResourceModel/Order/Plugin/AuthorizationTest.php b/app/code/Magento/Sales/Test/Unit/Model/ResourceModel/Order/Plugin/AuthorizationTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..eeee0b2b910ea3d4d793952471fa1958de618f30
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Unit/Model/ResourceModel/Order/Plugin/AuthorizationTest.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Test\Unit\Model\ResourceModel\Order\Plugin;
+
+use Magento\Authorization\Model\UserContextInterface;
+use Magento\Sales\Model\ResourceModel\Order as ResourceOrder;
+use Magento\Sales\Model\Order;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Sales\Model\ResourceModel\Order\Plugin\Authorization;
+
+class AuthorizationTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ObjectManager
+     */
+    private $objectManager;
+
+    /**
+     * @var UserContextInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $userContextMock;
+
+    /**
+     * @var ResourceOrder|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $subjectMock;
+
+    /**
+     * @var Order|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderMock;
+
+    /**
+     * @var Authorization
+     */
+    private $plugin;
+
+    protected function setUp()
+    {
+        $this->objectManager = new ObjectManager($this);
+        $this->userContextMock = $this->getMockBuilder(UserContextInterface::class)
+            ->setMethods(['getUserType', 'getUserId'])
+            ->getMockForAbstractClass();
+        $this->subjectMock = $this->getMockBuilder(ResourceOrder::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->orderMock = $this->getMockBuilder(Order::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getCustomerId', 'getId'])
+            ->getMock();
+        $this->plugin = $this->objectManager->getObject(
+            Authorization::class,
+            ['userContext' => $this->userContextMock]
+        );
+    }
+
+    public function testAfterLoad()
+    {
+        $this->userContextMock->expects($this->once())
+            ->method('getUserType')
+            ->willReturn('testType');
+        $this->assertEquals(
+            $this->subjectMock,
+            $this->plugin->afterLoad($this->subjectMock, $this->subjectMock, $this->orderMock)
+        );
+    }
+
+    /**
+     * @expectedException \Magento\Framework\Exception\NoSuchEntityException
+     * @expectedExceptionMessage No such entity with orderId = 1
+     */
+    public function testAfterLoadWithException()
+    {
+        $this->userContextMock->expects($this->once())
+            ->method('getUserType')
+            ->willReturn(UserContextInterface::USER_TYPE_CUSTOMER);
+        $this->orderMock->expects($this->once())
+            ->method('getCustomerId')
+            ->willReturn(1);
+        $this->userContextMock->expects($this->once())
+            ->method('getUserId')
+            ->willReturn(2);
+        $this->orderMock->expects($this->once())
+            ->method('getId')
+            ->willReturn(1);
+        $this->plugin->afterLoad($this->subjectMock, $this->subjectMock, $this->orderMock);
+    }
+}
diff --git a/app/code/Magento/Sales/Test/Unit/Model/ShipOrderTest.php b/app/code/Magento/Sales/Test/Unit/Model/ShipOrderTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..b719babf209f0ceb98c4d019f1e5929b23e7e11f
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Unit/Model/ShipOrderTest.php
@@ -0,0 +1,430 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Test\Unit\Model;
+
+use Magento\Framework\App\ResourceConnection;
+use Magento\Framework\DB\Adapter\AdapterInterface;
+use Magento\Sales\Api\Data\OrderInterface;
+use Magento\Sales\Api\Data\ShipmentCommentCreationInterface;
+use Magento\Sales\Api\Data\ShipmentCreationArgumentsInterface;
+use Magento\Sales\Api\Data\ShipmentInterface;
+use Magento\Sales\Api\Data\ShipmentPackageInterface;
+use Magento\Sales\Api\Data\ShipmentTrackCreationInterface;
+use Magento\Sales\Api\OrderRepositoryInterface;
+use Magento\Sales\Api\ShipmentRepositoryInterface;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\Order\Config as OrderConfig;
+use Magento\Sales\Model\Order\OrderStateResolverInterface;
+use Magento\Sales\Model\Order\OrderValidatorInterface;
+use Magento\Sales\Model\Order\ShipmentDocumentFactory;
+use Magento\Sales\Model\Order\Shipment\NotifierInterface;
+use Magento\Sales\Model\Order\Shipment\OrderRegistrarInterface;
+use Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface;
+use Magento\Sales\Model\ShipOrder;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Class ShipOrderTest
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @SuppressWarnings(PHPMD.TooManyFields)
+ */
+class ShipOrderTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ResourceConnection|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $resourceConnectionMock;
+
+    /**
+     * @var OrderRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderRepositoryMock;
+
+    /**
+     * @var ShipmentDocumentFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentDocumentFactoryMock;
+
+    /**
+     * @var ShipmentValidatorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentValidatorMock;
+
+    /**
+     * @var OrderValidatorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderValidatorMock;
+
+    /**
+     * @var OrderRegistrarInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderRegistrarMock;
+
+    /**
+     * @var OrderStateResolverInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderStateResolverMock;
+
+    /**
+     * @var OrderConfig|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $configMock;
+
+    /**
+     * @var ShipmentRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentRepositoryMock;
+
+    /**
+     * @var NotifierInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $notifierInterfaceMock;
+
+    /**
+     * @var ShipOrder|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $model;
+
+    /**
+     * @var ShipmentCreationArgumentsInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentCommentCreationMock;
+
+    /**
+     * @var ShipmentCommentCreationInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentCreationArgumentsMock;
+
+    /**
+     * @var OrderInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $orderMock;
+
+    /**
+     * @var ShipmentInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentMock;
+
+    /**
+     * @var AdapterInterface
+     */
+    private $adapterMock;
+
+    /**
+     * @var ShipmentTrackCreationInterface
+     */
+    private $trackMock;
+
+    /**
+     * @var ShipmentPackageInterface
+     */
+    private $packageMock;
+
+    /**
+     * @var LoggerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $loggerMock;
+
+    protected function setUp()
+    {
+        $this->resourceConnectionMock = $this->getMockBuilder(ResourceConnection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->orderRepositoryMock = $this->getMockBuilder(OrderRepositoryInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->shipmentDocumentFactoryMock = $this->getMockBuilder(ShipmentDocumentFactory::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->shipmentValidatorMock = $this->getMockBuilder(ShipmentValidatorInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->orderValidatorMock = $this->getMockBuilder(OrderValidatorInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->orderRegistrarMock = $this->getMockBuilder(OrderRegistrarInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->orderStateResolverMock = $this->getMockBuilder(OrderStateResolverInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->configMock = $this->getMockBuilder(OrderConfig::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->shipmentRepositoryMock = $this->getMockBuilder(ShipmentRepositoryInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->notifierInterfaceMock = $this->getMockBuilder(NotifierInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->loggerMock = $this->getMockBuilder(LoggerInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->shipmentCommentCreationMock = $this->getMockBuilder(ShipmentCommentCreationInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->shipmentCreationArgumentsMock = $this->getMockBuilder(ShipmentCreationArgumentsInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->orderMock = $this->getMockBuilder(OrderInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->shipmentMock = $this->getMockBuilder(ShipmentInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->packageMock = $this->getMockBuilder(ShipmentPackageInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->trackMock = $this->getMockBuilder(ShipmentTrackCreationInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->adapterMock = $this->getMockBuilder(AdapterInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+
+        $this->model = $helper->getObject(
+            ShipOrder::class,
+            [
+                'resourceConnection' => $this->resourceConnectionMock,
+                'orderRepository' => $this->orderRepositoryMock,
+                'shipmentRepository' => $this->shipmentRepositoryMock,
+                'shipmentDocumentFactory' => $this->shipmentDocumentFactoryMock,
+                'shipmentValidator' => $this->shipmentValidatorMock,
+                'orderValidator' => $this->orderValidatorMock,
+                'orderStateResolver' => $this->orderStateResolverMock,
+                'orderRegistrar' => $this->orderRegistrarMock,
+                'notifierInterface' => $this->notifierInterfaceMock,
+                'config' => $this->configMock,
+                'logger' => $this->loggerMock
+            ]
+        );
+    }
+
+    /**
+     * @dataProvider dataProvider
+     */
+    public function testExecute($orderId, $items, $notify, $appendComment)
+    {
+        $this->resourceConnectionMock->expects($this->once())
+            ->method('getConnection')
+            ->with('sales')
+            ->willReturn($this->adapterMock);
+
+        $this->orderRepositoryMock->expects($this->once())
+            ->method('get')
+            ->willReturn($this->orderMock);
+
+        $this->shipmentDocumentFactoryMock->expects($this->once())
+            ->method('create')
+            ->with(
+                $this->orderMock,
+                $items,
+                [$this->trackMock],
+                $this->shipmentCommentCreationMock,
+                ($appendComment && $notify),
+                [$this->packageMock],
+                $this->shipmentCreationArgumentsMock
+            )->willReturn($this->shipmentMock);
+
+        $this->shipmentValidatorMock->expects($this->once())
+            ->method('validate')
+            ->with($this->shipmentMock)
+            ->willReturn([]);
+        $this->orderValidatorMock->expects($this->once())
+            ->method('validate')
+            ->with($this->orderMock)
+            ->willReturn([]);
+
+        $this->orderRegistrarMock->expects($this->once())
+            ->method('register')
+            ->with($this->orderMock, $this->shipmentMock)
+            ->willReturn($this->orderMock);
+
+        $this->orderStateResolverMock->expects($this->once())
+            ->method('getStateForOrder')
+            ->with($this->orderMock, [OrderStateResolverInterface::IN_PROGRESS])
+            ->willReturn(Order::STATE_PROCESSING);
+
+        $this->orderMock->expects($this->once())
+            ->method('setState')
+            ->with(Order::STATE_PROCESSING)
+            ->willReturnSelf();
+
+        $this->orderMock->expects($this->once())
+            ->method('getState')
+            ->willReturn(Order::STATE_PROCESSING);
+
+        $this->configMock->expects($this->once())
+            ->method('getStateDefaultStatus')
+            ->with(Order::STATE_PROCESSING)
+            ->willReturn('Processing');
+
+        $this->orderMock->expects($this->once())
+            ->method('setStatus')
+            ->with('Processing')
+            ->willReturnSelf();
+
+        $this->shipmentRepositoryMock->expects($this->once())
+            ->method('save')
+            ->with($this->shipmentMock)
+            ->willReturn($this->shipmentMock);
+
+        $this->orderRepositoryMock->expects($this->once())
+            ->method('save')
+            ->with($this->orderMock)
+            ->willReturn($this->orderMock);
+
+        if ($notify) {
+            $this->notifierInterfaceMock->expects($this->once())
+                ->method('notify')
+                ->with($this->orderMock, $this->shipmentMock, $this->shipmentCommentCreationMock);
+        }
+
+        $this->shipmentMock->expects($this->once())
+            ->method('getEntityId')
+            ->willReturn(2);
+
+        $this->assertEquals(
+            2,
+            $this->model->execute(
+                $orderId,
+                $items,
+                $notify,
+                $appendComment,
+                $this->shipmentCommentCreationMock,
+                [$this->trackMock],
+                [$this->packageMock],
+                $this->shipmentCreationArgumentsMock
+            )
+        );
+    }
+
+    /**
+     * @expectedException \Magento\Sales\Api\Exception\DocumentValidationExceptionInterface
+     */
+    public function testDocumentValidationException()
+    {
+        $orderId = 1;
+        $items = [1 => 2];
+        $notify = true;
+        $appendComment = true;
+        $errorMessages = ['error1', 'error2'];
+
+        $this->orderRepositoryMock->expects($this->once())
+            ->method('get')
+            ->willReturn($this->orderMock);
+
+        $this->shipmentDocumentFactoryMock->expects($this->once())
+            ->method('create')
+            ->with(
+                $this->orderMock,
+                $items,
+                [$this->trackMock],
+                $this->shipmentCommentCreationMock,
+                ($appendComment && $notify),
+                [$this->packageMock],
+                $this->shipmentCreationArgumentsMock
+            )->willReturn($this->shipmentMock);
+
+        $this->shipmentValidatorMock->expects($this->once())
+            ->method('validate')
+            ->with($this->shipmentMock)
+            ->willReturn($errorMessages);
+        $this->orderValidatorMock->expects($this->once())
+            ->method('validate')
+            ->with($this->orderMock)
+            ->willReturn([]);
+
+        $this->model->execute(
+            $orderId,
+            $items,
+            $notify,
+            $appendComment,
+            $this->shipmentCommentCreationMock,
+            [$this->trackMock],
+            [$this->packageMock],
+            $this->shipmentCreationArgumentsMock
+        );
+    }
+
+    /**
+     * @expectedException \Magento\Sales\Api\Exception\CouldNotShipExceptionInterface
+     */
+    public function testCouldNotInvoiceException()
+    {
+        $orderId = 1;
+        $this->resourceConnectionMock->expects($this->once())
+            ->method('getConnection')
+            ->with('sales')
+            ->willReturn($this->adapterMock);
+
+        $this->orderRepositoryMock->expects($this->once())
+            ->method('get')
+            ->willReturn($this->orderMock);
+
+        $this->shipmentDocumentFactoryMock->expects($this->once())
+            ->method('create')
+            ->with(
+                $this->orderMock
+            )->willReturn($this->shipmentMock);
+
+        $this->shipmentValidatorMock->expects($this->once())
+            ->method('validate')
+            ->with($this->shipmentMock)
+            ->willReturn([]);
+        $this->orderValidatorMock->expects($this->once())
+            ->method('validate')
+            ->with($this->orderMock)
+            ->willReturn([]);
+        $e = new \Exception();
+
+        $this->orderRegistrarMock->expects($this->once())
+            ->method('register')
+            ->with($this->orderMock, $this->shipmentMock)
+            ->willThrowException($e);
+
+        $this->loggerMock->expects($this->once())
+            ->method('critical')
+            ->with($e);
+
+        $this->adapterMock->expects($this->once())
+            ->method('rollBack');
+
+        $this->model->execute(
+            $orderId
+        );
+    }
+
+    /**
+     * @return array
+     */
+    public function dataProvider()
+    {
+        return [
+            'TestWithNotifyTrue' => [1, [1 => 2], true, true],
+            'TestWithNotifyFalse' => [1, [1 => 2], false, true],
+        ];
+    }
+}
diff --git a/app/code/Magento/Sales/etc/di.xml b/app/code/Magento/Sales/etc/di.xml
index 383650c8688fc847ac030bc6c216293a925956bf..dfdb0f6a261c51490e99955bdd61fd1bae328e60 100644
--- a/app/code/Magento/Sales/etc/di.xml
+++ b/app/code/Magento/Sales/etc/di.xml
@@ -30,7 +30,9 @@
     <preference for="Magento\Sales\Api\Data\OrderStatusHistorySearchResultInterface" type="Magento\Sales\Model\ResourceModel\Order\Status\History\Collection"/>
     <preference for="Magento\Sales\Api\Data\ShipmentCommentInterface" type="Magento\Sales\Model\Order\Shipment\Comment"/>
     <preference for="Magento\Sales\Api\Data\ShipmentCommentSearchResultInterface" type="Magento\Sales\Model\ResourceModel\Order\Shipment\Comment\Collection"/>
+    <preference for="Magento\Sales\Api\Data\ShipmentCreationArgumentsInterface" type="Magento\Sales\Model\Order\Shipment\CreationArguments"/>
     <preference for="Magento\Sales\Api\Data\ShipmentInterface" type="Magento\Sales\Model\Order\Shipment"/>
+    <preference for="Magento\Sales\Api\Data\ShipmentItemCreationInterface" type="Magento\Sales\Model\Order\Shipment\ItemCreation"/>
     <preference for="Magento\Sales\Api\Data\ShipmentItemInterface" type="Magento\Sales\Model\Order\Shipment\Item"/>
     <preference for="Magento\Sales\Api\Data\ShipmentItemSearchResultInterface" type="Magento\Sales\Model\ResourceModel\Order\Shipment\Item\Collection"/>
     <preference for="Magento\Sales\Api\Data\ShipmentSearchResultInterface" type="Magento\Sales\Model\ResourceModel\Order\Shipment\Collection"/>
@@ -49,7 +51,10 @@
     <preference for="Magento\Sales\Api\InvoiceItemRepositoryInterface" type="Magento\Sales\Api\Data\InvoiceItem\Repository"/>
     <preference for="Magento\Sales\Api\InvoiceRepositoryInterface" type="Magento\Sales\Model\Order\InvoiceRepository"/>
     <preference for="Magento\Sales\Api\InvoiceManagementInterface" type="Magento\Sales\Model\Service\InvoiceService"/>
-    <preference for="Magento\Sales\Api\InvoiceCreationArgumentsInterface" type="Magento\Sales\Model\Order\Invoice\CreationArguments"/>
+    <preference for="Magento\Sales\Api\Data\InvoiceCreationArgumentsInterface" type="Magento\Sales\Model\Order\Invoice\CreationArguments"/>
+    <preference for="Magento\Sales\Api\Data\InvoiceItemCreationInterface" type="Magento\Sales\Model\Order\Invoice\ItemCreation"/>
+    <preference for="Magento\Sales\Api\Data\InvoiceCommentCreationInterface" type="Magento\Sales\Model\Order\Invoice\CommentCreation"/>
+    <preference for="Magento\Sales\Api\Data\ShipmentCommentCreationInterface" type="Magento\Sales\Model\Order\Shipment\CommentCreation"/>
     <preference for="Magento\Sales\Api\OrderAddressRepositoryInterface" type="Magento\Sales\Model\Order\AddressRepository"/>
     <preference for="Magento\Sales\Api\OrderCustomerManagementInterface" type="Magento\Sales\Model\Order\CustomerManagement"/>
     <preference for="Magento\Sales\Api\OrderItemRepositoryInterface" type="Magento\Sales\Model\Order\ItemRepository"/>
@@ -62,13 +67,14 @@
     <preference for="Magento\Sales\Api\ShipmentRepositoryInterface" type="Magento\Sales\Model\Order\ShipmentRepository"/>
     <preference for="Magento\Sales\Api\ShipmentManagementInterface" type="Magento\Sales\Model\Service\ShipmentService"/>
     <preference for="Magento\Sales\Api\ShipmentTrackRepositoryInterface" type="Magento\Sales\Api\Data\ShipmentTrack\Repository"/>
+    <preference for="Magento\Sales\Api\ShipOrderInterface" type="Magento\Sales\Model\ShipOrder"/>
     <preference for="Magento\Sales\Api\TransactionRepositoryInterface" type="Magento\Sales\Model\Order\Payment\Transaction\Repository"/>
     <preference for="Magento\Sales\Model\Order\Invoice\NotifierInterface" type="Magento\Sales\Model\Order\Invoice\Notifier"/>
-    <preference for="Magento\Sales\Model\Order\InvoiceValidatorInterface" type="Magento\Sales\Model\Order\InvoiceValidator"/>
+    <preference for="Magento\Sales\Model\Order\Shipment\NotifierInterface" type="Magento\Sales\Model\Order\Shipment\Notifier"/>
     <preference for="Magento\Sales\Model\Order\PaymentAdapterInterface" type="Magento\Sales\Model\Order\PaymentAdapter"/>
-    <preference for="Magento\Sales\Model\Order\OrderValidatorInterface" type="Magento\Sales\Model\Order\OrderValidator"/>
     <preference for="Magento\Sales\Model\Order\Payment\Transaction\ManagerInterface" type="Magento\Sales\Model\Order\Payment\Transaction\Manager"/>
     <preference for="Magento\Sales\Model\Order\Payment\Transaction\BuilderInterface" type="Magento\Sales\Model\Order\Payment\Transaction\Builder"/>
+    <preference for="Magento\Sales\Model\Order\Shipment\OrderRegistrarInterface" type="Magento\Sales\Model\Order\Shipment\OrderRegistrar"/>
     <preference for="Magento\Sales\Model\Spi\CreditmemoCommentResourceInterface" type="Magento\Sales\Model\ResourceModel\Order\Creditmemo\Comment"/>
     <preference for="Magento\Sales\Model\Spi\CreditmemoItemResourceInterface" type="Magento\Sales\Model\ResourceModel\Order\Creditmemo\Item"/>
     <preference for="Magento\Sales\Model\Spi\CreditmemoResourceInterface" type="Magento\Sales\Model\ResourceModel\Order\Creditmemo"/>
@@ -86,10 +92,14 @@
     <preference for="Magento\Sales\Model\Spi\ShipmentTrackResourceInterface" type="Magento\Sales\Model\ResourceModel\Order\Shipment\Track"/>
     <preference for="Magento\Sales\Model\Spi\TransactionResourceInterface" type="Magento\Sales\Model\ResourceModel\Order\Payment\Transaction"/>
     <preference for="Magento\Sales\Model\ResourceModel\Order\CollectionFactoryInterface" type="Magento\Sales\Model\ResourceModel\Order\CollectionFactory"/>
-    <preference for="Magento\Sales\Api\Data\InvoiceCommentCreationInterface" type="Magento\Sales\Model\Order\Invoice\Comment"/>
-    <preference for="Magento\Sales\Api\Data\InvoiceItemCreationInterface" type="Magento\Sales\Model\Order\Invoice\ItemCreation"/>
-    <preference for="Magento\Sales\Api\OrderInvoiceInterface" type="Magento\Sales\Model\OrderInvoice"/>
+    <preference for="Magento\Sales\Api\InvoiceOrderInterface" type="Magento\Sales\Model\InvoiceOrder"/>
     <preference for="Magento\Sales\Model\Order\OrderStateResolverInterface" type="Magento\Sales\Model\Order\StateResolver"/>
+    <preference for="Magento\Sales\Api\Data\ShipmentTrackCreationInterface" type="Magento\Sales\Model\Order\Shipment\TrackCreation"/>
+    <preference for="Magento\Sales\Api\Data\ShipmentPackageInterface" type="Magento\Sales\Model\Order\Shipment\Package"/>
+    <preference for="Magento\Sales\Api\Data\ShipmentPackageCreationInterface" type="Magento\Sales\Model\Order\Shipment\PackageCreation"/>
+    <preference for="Magento\Sales\Model\Order\OrderValidatorInterface" type="Magento\Sales\Model\Order\OrderValidator"/>
+    <preference for="Magento\Sales\Model\Order\Invoice\InvoiceValidatorInterface" type="Magento\Sales\Model\Order\Invoice\InvoiceValidator"/>
+    <preference for="Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface" type="Magento\Sales\Model\Order\Shipment\ShipmentValidator"/>
     <type name="Magento\Sales\Model\ResourceModel\Report" shared="false"/>
     <type name="Magento\Sales\Model\Order\Pdf\Config\Reader">
         <arguments>
@@ -909,4 +919,18 @@
             </argument>
         </arguments>
     </type>
+    <type name="Magento\Sales\Model\Order\Shipment\Notifier">
+        <arguments>
+            <argument name="senders" xsi:type="array">
+                <item name="email" xsi:type="object">Magento\Sales\Model\Order\Shipment\Sender\EmailSender</item>
+            </argument>
+        </arguments>
+    </type>
+    <type name="Magento\Framework\EntityManager\HydratorPool">
+        <arguments>
+            <argument name="hydrators" xsi:type="array">
+                <item name="Magento\Sales\Api\Data\ShipmentTrackCreationInterface" xsi:type="string">Magento\Framework\EntityManager\HydratorInterface</item>
+            </argument>
+        </arguments>
+    </type>
 </config>
diff --git a/app/code/Magento/Sales/etc/webapi.xml b/app/code/Magento/Sales/etc/webapi.xml
index 8d1b1fda5bc314fdbd3dec616f7af8d56f1d8191..4c7fe03a201f8b25c2af83219fd0576da4c2cd3e 100644
--- a/app/code/Magento/Sales/etc/webapi.xml
+++ b/app/code/Magento/Sales/etc/webapi.xml
@@ -235,6 +235,12 @@
             <resource ref="Magento_Sales::sales" />
         </resources>
     </route>
+    <route url="/V1/order/:orderId/ship" method="POST">
+        <service class="Magento\Sales\Api\ShipOrderInterface" method="execute"/>
+        <resources>
+            <resource ref="Magento_Sales::sales" />
+        </resources>
+    </route>
     <route url="/V1/orders/" method="POST">
         <service class="Magento\Sales\Api\OrderRepositoryInterface" method="save"/>
         <resources>
@@ -254,7 +260,7 @@
         </resources>
     </route>
     <route url="/V1/order/:orderId/invoice" method="POST">
-        <service class="Magento\Sales\Api\OrderInvoiceInterface" method="execute"/>
+        <service class="Magento\Sales\Api\InvoiceOrderInterface" method="execute"/>
         <resources>
             <resource ref="Magento_Sales::sales" />
         </resources>
diff --git a/app/code/Magento/SalesRule/Model/CouponRepository.php b/app/code/Magento/SalesRule/Model/CouponRepository.php
index c9b2fdfb868872f11ac16e037b9ce983fa837754..ad9b43f90e1a21227b08f3ae82d8daf157876d74 100644
--- a/app/code/Magento/SalesRule/Model/CouponRepository.php
+++ b/app/code/Magento/SalesRule/Model/CouponRepository.php
@@ -7,6 +7,7 @@
 namespace Magento\SalesRule\Model;
 
 use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Api\SortOrder;
 use Magento\SalesRule\Model\ResourceModel\Coupon\Collection;
 
@@ -47,13 +48,18 @@ class CouponRepository implements \Magento\SalesRule\Api\CouponRepositoryInterfa
      */
     protected $extensionAttributesJoinProcessor;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
+     * CouponRepository constructor.
      * @param CouponFactory $couponFactory
      * @param RuleFactory $ruleFactory
      * @param \Magento\SalesRule\Api\Data\CouponSearchResultInterfaceFactory $searchResultFactory
-     * @param \Magento\SalesRule\Model\ResourceModel\Coupon\CollectionFactory $collectionFactory
+     * @param ResourceModel\Coupon\CollectionFactory $collectionFactory
      * @param Spi\CouponResourceInterface $resourceModel
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+     * @param CollectionProcessorInterface|null $collectionProcessor
      */
     public function __construct(
         \Magento\SalesRule\Model\CouponFactory $couponFactory,
@@ -61,7 +67,8 @@ class CouponRepository implements \Magento\SalesRule\Api\CouponRepositoryInterfa
         \Magento\SalesRule\Api\Data\CouponSearchResultInterfaceFactory $searchResultFactory,
         \Magento\SalesRule\Model\ResourceModel\Coupon\CollectionFactory $collectionFactory,
         \Magento\SalesRule\Model\Spi\CouponResourceInterface $resourceModel,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->couponFactory = $couponFactory;
         $this->ruleFactory = $ruleFactory;
@@ -69,6 +76,7 @@ class CouponRepository implements \Magento\SalesRule\Api\CouponRepositoryInterfa
         $this->collectionFactory = $collectionFactory;
         $this->resourceModel = $resourceModel;
         $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -154,27 +162,7 @@ class CouponRepository implements \Magento\SalesRule\Api\CouponRepositoryInterfa
         $couponInterfaceName = \Magento\SalesRule\Api\Data\CouponInterface::class;
         $this->extensionAttributesJoinProcessor->process($collection, $couponInterfaceName);
 
-        //Add filters from root filter group to the collection
-        /** @var FilterGroup $group */
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
-
-        $sortOrders = $searchCriteria->getSortOrders();
-        if ($sortOrders === null) {
-            $sortOrders = [];
-        }
-        /** @var \Magento\Framework\Api\SortOrder $sortOrder */
-        foreach ($sortOrders as $sortOrder) {
-            $field = $sortOrder->getField();
-            $collection->addOrder(
-                $field,
-                ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-            );
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
-
+        $this->collectionProcessor->process($searchCriteria, $collection);
         $coupons = [];
         /** @var \Magento\SalesRule\Model\Coupon $couponModel */
         foreach ($collection->getItems() as $couponModel) {
@@ -215,6 +203,7 @@ class CouponRepository implements \Magento\SalesRule\Api\CouponRepositoryInterfa
      *
      * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
      * @param Collection $collection
+     * @deprecated
      * @return void
      */
     protected function addFilterGroupToCollection(
@@ -232,4 +221,20 @@ class CouponRepository implements \Magento\SalesRule\Api\CouponRepositoryInterfa
             $collection->addFieldToFilter($fields, $conditions);
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/SalesRule/Model/RuleRepository.php b/app/code/Magento/SalesRule/Model/RuleRepository.php
index e26d7ad144ffd583f64744f3a837957936f5fb8d..2d875e9ede06d165472533c0acabe2ae698849d7 100644
--- a/app/code/Magento/SalesRule/Model/RuleRepository.php
+++ b/app/code/Magento/SalesRule/Model/RuleRepository.php
@@ -6,6 +6,7 @@
 namespace Magento\SalesRule\Model;
 
 use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Api\SearchCriteriaInterface;
 use Magento\Framework\Api\SortOrder;
 use Magento\SalesRule\Model\ResourceModel\Rule\Collection;
@@ -62,16 +63,22 @@ class RuleRepository implements \Magento\SalesRule\Api\RuleRepositoryInterface
      */
     protected $ruleCollectionFactory;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
-     * @param \Magento\SalesRule\Model\RuleFactory $ruleFactory
+     * RuleRepository constructor.
+     * @param RuleFactory $ruleFactory
      * @param \Magento\SalesRule\Api\Data\RuleInterfaceFactory $ruleDataFactory
      * @param \Magento\SalesRule\Api\Data\ConditionInterfaceFactory $conditionDataFactory
-     * @param \Magento\SalesRule\Model\Converter\ToDataModel $toDataModelConverter
-     * @param \Magento\SalesRule\Model\Converter\ToModel $toModelConverter
+     * @param Converter\ToDataModel $toDataModelConverter
+     * @param Converter\ToModel $toModelConverter
      * @param \Magento\SalesRule\Api\Data\RuleSearchResultInterfaceFactory $searchResultFactory
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor
-     * @param \Magento\SalesRule\Model\ResourceModel\Rule\CollectionFactory $ruleCollectionFactory
+     * @param ResourceModel\Rule\CollectionFactory $ruleCollectionFactory
      * @param \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor
+     * @param CollectionProcessorInterface|null $collectionProcessor
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\SalesRule\Model\RuleFactory $ruleFactory,
@@ -82,7 +89,8 @@ class RuleRepository implements \Magento\SalesRule\Api\RuleRepositoryInterface
         \Magento\SalesRule\Api\Data\RuleSearchResultInterfaceFactory $searchResultFactory,
         \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor,
         \Magento\SalesRule\Model\ResourceModel\Rule\CollectionFactory $ruleCollectionFactory,
-        \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor
+        \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->ruleFactory = $ruleFactory;
         $this->ruleDataFactory = $ruleDataFactory;
@@ -93,6 +101,7 @@ class RuleRepository implements \Magento\SalesRule\Api\RuleRepositoryInterface
         $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
         $this->ruleCollectionFactory = $ruleCollectionFactory;
         $this->dataObjectProcessor = $dataObjectProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -134,28 +143,7 @@ class RuleRepository implements \Magento\SalesRule\Api\RuleRepositoryInterface
         $ruleInterfaceName = \Magento\SalesRule\Api\Data\RuleInterface::class;
         $this->extensionAttributesJoinProcessor->process($collection, $ruleInterfaceName);
 
-        //Add filters from root filter group to the collection
-        /** @var FilterGroup $group */
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
-
-        $sortOrders = $searchCriteria->getSortOrders();
-        if ($sortOrders === null) {
-            $sortOrders = [];
-        }
-        /** @var \Magento\Framework\Api\SortOrder $sortOrder */
-        foreach ($sortOrders as $sortOrder) {
-            $field = $sortOrder->getField();
-            $collection->addOrder(
-                $field,
-                ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-            );
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
-        $collection->load();
-
+        $this->collectionProcessor->process($searchCriteria, $collection);
         $rules = [];
         /** @var \Magento\SalesRule\Model\Rule $ruleModel */
         foreach ($collection->getItems() as $ruleModel) {
@@ -195,6 +183,7 @@ class RuleRepository implements \Magento\SalesRule\Api\RuleRepositoryInterface
      *
      * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
      * @param Collection $collection
+     * @deprecated
      * @return void
      */
     protected function addFilterGroupToCollection(
@@ -212,4 +201,20 @@ class RuleRepository implements \Magento\SalesRule\Api\RuleRepositoryInterface
             $collection->addFieldToFilter($fields, $conditions);
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php
index 1257b100b21cce799c8efb0ec2daf1e042029aad..19dfc5e21c86ef1d8eceb6276f84e968becf6f84 100644
--- a/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php
+++ b/app/code/Magento/SalesRule/Test/Unit/Model/CouponRepositoryTest.php
@@ -57,6 +57,11 @@ class CouponRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $objectManager;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     protected function setUp()
     {
         $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
@@ -92,6 +97,14 @@ class CouponRepositoryTest extends \PHPUnit_Framework_TestCase
             false
         );
 
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
+
         $this->model = $this->objectManager->getObject(
             \Magento\SalesRule\Model\CouponRepository::class,
             [
@@ -100,7 +113,8 @@ class CouponRepositoryTest extends \PHPUnit_Framework_TestCase
                 'searchResultFactory' => $this->searchResultFactory,
                 'collectionFactory' => $this->collectionFactory,
                 'resourceModel' => $this->resource,
-                'extensionAttributesJoinProcessor' => $this->extensionAttributesJoinProcessorMock
+                'extensionAttributesJoinProcessor' => $this->extensionAttributesJoinProcessorMock,
+                'collectionProcessor' => $this->collectionProcessor,
             ]
         );
     }
@@ -219,9 +233,6 @@ class CouponRepositoryTest extends \PHPUnit_Framework_TestCase
     public function testGetList()
     {
         $collectionSize = 1;
-        $currentPage = 42;
-        $pageSize = 4;
-
         /**
          * @var \Magento\Framework\Api\SearchCriteriaInterface $searchCriteriaMock
          */
@@ -233,35 +244,16 @@ class CouponRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $filterGroupMock = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filterMock = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
-        $sortOrderMock = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
-
         $this->extensionAttributesJoinProcessorMock->expects($this->once())
             ->method('process')
             ->with($collectionMock, \Magento\SalesRule\Api\Data\CouponInterface::class);
-
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
         $this->searchResultsMock->expects($this->once())->method('setSearchCriteria')->with($searchCriteriaMock);
         $this->collectionFactory->expects($this->once())->method('create')->willReturn($collectionMock);
-        $searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroupMock]);
-        $filterGroupMock->expects($this->once())->method('getFilters')->willReturn([$filterMock]);
-        $filterMock->expects($this->exactly(2))->method('getConditionType')->willReturn('eq');
-        $filterMock->expects($this->once())->method('getField')->willReturn(
-            'coupon_id'
-        );
-        $filterMock->expects($this->once())->method('getValue')->willReturn('value');
-        $collectionMock->expects($this->once())->method('addFieldToFilter')
-            ->with([0 => 'coupon_id'], [0 => ['eq' => 'value']]);
         $collectionMock->expects($this->once())->method('getSize')->willReturn($collectionSize);
         $this->searchResultsMock->expects($this->once())->method('setTotalCount')->with($collectionSize);
-        $searchCriteriaMock->expects($this->once())->method('getSortOrders')->willReturn([$sortOrderMock]);
-        $sortOrderMock->expects($this->once())->method('getField')->willReturn('sort_order');
-        $sortOrderMock->expects($this->once())->method('getDirection')->willReturn(SortOrder::SORT_ASC);
-        $collectionMock->expects($this->once())->method('addOrder')->with('sort_order', 'ASC');
-        $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->willReturn($currentPage);
-        $collectionMock->expects($this->once())->method('setCurPage')->with($currentPage);
-        $searchCriteriaMock->expects($this->once())->method('getPageSize')->willReturn($pageSize);
-        $collectionMock->expects($this->once())->method('setPageSize')->with($pageSize);
         $collectionMock->expects($this->once())->method('getItems')->willReturn([]);
         $this->searchResultsMock->expects($this->once())->method('setItems')->with([]);
         $this->searchResultFactory->expects($this->once())->method('create')->willReturn($this->searchResultsMock);
diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/RuleRepositoryTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/RuleRepositoryTest.php
index 7412f8b05f87dacfdd38414739f4797a4dda2af0..4b309442c5545d018da91aaf79c7819220b17924 100644
--- a/app/code/Magento/SalesRule/Test/Unit/Model/RuleRepositoryTest.php
+++ b/app/code/Magento/SalesRule/Test/Unit/Model/RuleRepositoryTest.php
@@ -54,6 +54,11 @@ class RuleRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $toModelConverter;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     protected function setUp()
     {
         $this->ruleFactory = $this->getMock(\Magento\SalesRule\Model\RuleFactory::class, ['create'], [], '', false);
@@ -77,6 +82,13 @@ class RuleRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->extensionAttributesJoinProcessorMock = $this->getMock($className, ['process'], [], '', false);
 
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->ruleRepository = $objectManager->getObject(
             \Magento\SalesRule\Model\RuleRepository::class,
             [
@@ -85,7 +97,8 @@ class RuleRepositoryTest extends \PHPUnit_Framework_TestCase
                 'toModelConverter' =>  $this->toModelConverter,
                 'searchResultFactory' => $this->searchResultFactory,
                 'extensionAttributesJoinProcessor' => $this->extensionAttributesJoinProcessorMock,
-                'ruleCollectionFactory' => $this->collectionFactory
+                'ruleCollectionFactory' => $this->collectionFactory,
+                'collectionProcessor' => $this->collectionProcessor
             ]
         );
     }
@@ -134,9 +147,6 @@ class RuleRepositoryTest extends \PHPUnit_Framework_TestCase
     public function testGetList()
     {
         $collectionSize = 1;
-        $currentPage = 42;
-        $pageSize = 4;
-
         /**
          * @var \Magento\Framework\Api\SearchCriteriaInterface $searchCriteriaMock
          */
@@ -148,9 +158,6 @@ class RuleRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $filterGroupMock = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filterMock = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
-        $sortOrderMock = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
 
         $this->extensionAttributesJoinProcessorMock->expects($this->once())
             ->method('process')
@@ -158,25 +165,11 @@ class RuleRepositoryTest extends \PHPUnit_Framework_TestCase
 
         $this->searchResultsMock->expects($this->once())->method('setSearchCriteria')->with($searchCriteriaMock);
         $this->collectionFactory->expects($this->once())->method('create')->willReturn($collectionMock);
-        $searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroupMock]);
-        $filterGroupMock->expects($this->once())->method('getFilters')->willReturn([$filterMock]);
-        $filterMock->expects($this->exactly(2))->method('getConditionType')->willReturn('eq');
-        $filterMock->expects($this->once())->method('getField')->willReturn(
-            'rule_id'
-        );
-        $filterMock->expects($this->once())->method('getValue')->willReturn('value');
-        $collectionMock->expects($this->once())->method('addFieldToFilter')
-            ->with([0 => 'rule_id'], [0 => ['eq' => 'value']]);
         $collectionMock->expects($this->once())->method('getSize')->willReturn($collectionSize);
         $this->searchResultsMock->expects($this->once())->method('setTotalCount')->with($collectionSize);
-        $searchCriteriaMock->expects($this->once())->method('getSortOrders')->willReturn([$sortOrderMock]);
-        $sortOrderMock->expects($this->once())->method('getField')->willReturn('sort_order');
-        $sortOrderMock->expects($this->once())->method('getDirection')->willReturn(SortOrder::SORT_ASC);
-        $collectionMock->expects($this->once())->method('addOrder')->with('sort_order', 'ASC');
-        $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->willReturn($currentPage);
-        $collectionMock->expects($this->once())->method('setCurPage')->with($currentPage);
-        $searchCriteriaMock->expects($this->once())->method('getPageSize')->willReturn($pageSize);
-        $collectionMock->expects($this->once())->method('setPageSize')->with($pageSize);
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
         $collectionMock->expects($this->once())->method('getItems')->willReturn([]);
         $this->searchResultsMock->expects($this->once())->method('setItems')->with([]);
         $this->searchResultFactory->expects($this->once())->method('create')->willReturn($this->searchResultsMock);
diff --git a/app/code/Magento/SalesSequence/Setup/InstallSchema.php b/app/code/Magento/SalesSequence/Setup/InstallSchema.php
index 023094527c59d1c603ee02841e31653dfef9e4b6..5da1dc1e6bf4bdf0a71f329cb4b64536a7bf37bd 100644
--- a/app/code/Magento/SalesSequence/Setup/InstallSchema.php
+++ b/app/code/Magento/SalesSequence/Setup/InstallSchema.php
@@ -14,6 +14,11 @@ use Magento\Framework\Setup\SchemaSetupInterface;
  */
 class InstallSchema implements InstallSchemaInterface
 {
+    /**
+     * @var string
+     */
+    private static $connectionName = 'sales';
+
     /**
      * {@inheritdoc}
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
@@ -25,8 +30,8 @@ class InstallSchema implements InstallSchemaInterface
         /**
          * Create table 'sales_sequence_profile'
          */
-        $table = $installer->getConnection()->newTable(
-            $installer->getTable('sales_sequence_profile')
+        $table = $installer->getConnection(self::$connectionName)->newTable(
+            $installer->getTable('sales_sequence_profile', self::$connectionName)
         )->addColumn(
             'profile_id',
             \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
@@ -84,24 +89,32 @@ class InstallSchema implements InstallSchemaInterface
             $installer->getIdxName(
                 'sales_sequence_profile',
                 ['meta_id', 'prefix', 'suffix'],
-                \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
+                \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE,
+                '',
+                self::$connectionName
             ),
             ['meta_id', 'prefix', 'suffix'],
             ['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE]
         )->addForeignKey(
-            $installer->getFkName('sales_sequence_profile', 'meta_id', 'sales_sequence_meta', 'meta_id'),
+            $installer->getFkName(
+                'sales_sequence_profile',
+                'meta_id',
+                'sales_sequence_meta',
+                'meta_id',
+                self::$connectionName
+            ),
             'meta_id',
-            $installer->getTable('sales_sequence_meta'),
+            $installer->getTable('sales_sequence_meta', self::$connectionName),
             'meta_id',
             \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
         );
-        $installer->getConnection()->createTable($table);
+        $installer->getConnection(self::$connectionName)->createTable($table);
 
         /**
          * Create table 'sales_sequence_meta'
          */
-        $table = $installer->getConnection()->newTable(
-            $installer->getTable('sales_sequence_meta')
+        $table = $installer->getConnection(self::$connectionName)->newTable(
+            $installer->getTable('sales_sequence_meta', self::$connectionName)
         )->addColumn(
             'meta_id',
             \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
@@ -130,12 +143,14 @@ class InstallSchema implements InstallSchemaInterface
             $installer->getIdxName(
                 'sales_sequence_meta',
                 ['entity_type', 'store_id'],
-                \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
+                \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE,
+                '',
+                self::$connectionName
             ),
             ['entity_type', 'store_id'],
             ['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE]
         );
-        $installer->getConnection()->createTable($table);
+        $installer->getConnection(self::$connectionName)->createTable($table);
         $installer->endSetup();
     }
 }
diff --git a/app/code/Magento/Search/view/frontend/web/form-mini.js b/app/code/Magento/Search/view/frontend/web/form-mini.js
index 7c9bc4255fb21e13a3fd20e94ea62bfcda5006a8..9bb254a724768d4795ef2cc8579a9c37ee3d1be9 100644
--- a/app/code/Magento/Search/view/frontend/web/form-mini.js
+++ b/app/code/Magento/Search/view/frontend/web/form-mini.js
@@ -79,6 +79,9 @@ define([
             }.bind(this));
 
             this.element.on('blur', $.proxy(function () {
+                if (!this.searchLabel.hasClass('active')) {
+                    return;
+                }
 
                 setTimeout($.proxy(function () {
                     if (this.autoComplete.is(':hidden')) {
diff --git a/app/code/Magento/SendFriend/view/frontend/templates/send.phtml b/app/code/Magento/SendFriend/view/frontend/templates/send.phtml
index a2999fe95d03ea87968a0589b61debfce4948e7f..edae5a01a31ce9d99c1c6b56e896eb4a3b90acff 100644
--- a/app/code/Magento/SendFriend/view/frontend/templates/send.phtml
+++ b/app/code/Magento/SendFriend/view/frontend/templates/send.phtml
@@ -41,7 +41,7 @@
     </fieldset>
 </script>
 
-<form action="<?php /* @escapeNotVerified */ echo $block->getSendUrl() ?>" method="post" id="product-sendtofriend-form"
+<form action="<?php echo $block->escapeUrl($block->getSendUrl()) ?>" method="post" id="product-sendtofriend-form"
       data-mage-init='{
         "rowBuilder":{
             "rowTemplate":"#add-recipient-tmpl",
@@ -49,7 +49,7 @@
             "rowParentElem":"<div></div>",
             "remEventSelector":"button",
             "btnRemoveSelector":".action.remove",
-            "maxRows":"<?php /* @escapeNotVerified */ echo $block->getMaxRecipients() ?>",
+            "maxRows":"<?php /* @noEscape */ echo (int)$block->getMaxRecipients() ?>",
             "maxRowsMsg":"#max-recipient-message",
             "addRowBtn":"#add-recipient-button",
             "additionalRowClass":"additional"},
@@ -62,7 +62,7 @@
         <div class="field sender required">
             <label for="sender-name" class="label"><span><?php /* @escapeNotVerified */ echo __('Name') ?></span></label>
             <div class="control">
-                <input name="sender[name]" value="<?php echo $block->escapeHtml($block->getUserName()) ?>"
+                <input name="sender[name]" value="<?php echo $block->escapeHtmlAttr($block->getUserName()) ?>"
                        title="<?php /* @escapeNotVerified */ echo __('Name') ?>" id="sender-name" type="text" class="input-text"
                        data-validate="{required:true}"/>
             </div>
@@ -71,7 +71,7 @@
         <div class="field email required">
             <label for="sender-email" class="label"><span><?php /* @escapeNotVerified */ echo __('Email') ?></span></label>
             <div class="control">
-                <input name="sender[email]" value="<?php echo $block->escapeHtml($block->getEmail()) ?>"
+                <input name="sender[email]" value="<?php echo $block->escapeHtmlAttr($block->getEmail()) ?>"
                        title="<?php /* @escapeNotVerified */ echo __('Email') ?>" id="sender-email" type="text" class="input-text"
                        data-validate="{required:true, 'validate-email':true}"/>
             </div>
diff --git a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php
index adbd96624649d5c7aff56a95156579ed16cc7f9d..d265159bc630be220bc4a7a64b706e36786510ef 100644
--- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php
+++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php
@@ -7,8 +7,12 @@
 namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment;
 
 use Magento\Backend\App\Action;
-use Magento\Sales\Model\Order\Email\Sender\ShipmentSender;
+use Magento\Sales\Model\Order\Shipment\Validation\QuantityValidator;
 
+/**
+ * Class Save
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class Save extends \Magento\Backend\App\Action
 {
     /**
@@ -29,21 +33,26 @@ class Save extends \Magento\Backend\App\Action
     protected $labelGenerator;
 
     /**
-     * @var ShipmentSender
+     * @var \Magento\Sales\Model\Order\Email\Sender\ShipmentSender
      */
     protected $shipmentSender;
 
     /**
-     * @param Action\Context $context
+     * @var \Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface
+     */
+    private $shipmentValidator;
+
+    /**
+     * @param \Magento\Backend\App\Action\Context $context
      * @param \Magento\Shipping\Controller\Adminhtml\Order\ShipmentLoader $shipmentLoader
      * @param \Magento\Shipping\Model\Shipping\LabelGenerator $labelGenerator
-     * @param ShipmentSender $shipmentSender
+     * @param \Magento\Sales\Model\Order\Email\Sender\ShipmentSender $shipmentSender
      */
     public function __construct(
-        Action\Context $context,
+        \Magento\Backend\App\Action\Context $context,
         \Magento\Shipping\Controller\Adminhtml\Order\ShipmentLoader $shipmentLoader,
         \Magento\Shipping\Model\Shipping\LabelGenerator $labelGenerator,
-        ShipmentSender $shipmentSender
+        \Magento\Sales\Model\Order\Email\Sender\ShipmentSender $shipmentSender
     ) {
         $this->shipmentLoader = $shipmentLoader;
         $this->labelGenerator = $labelGenerator;
@@ -119,7 +128,14 @@ class Save extends \Magento\Backend\App\Action
                 $shipment->setCustomerNote($data['comment_text']);
                 $shipment->setCustomerNoteNotify(isset($data['comment_customer_notify']));
             }
-
+            $errorMessages = $this->getShipmentValidator()->validate($shipment, [QuantityValidator::class]);
+            if (!empty($errorMessages)) {
+                $this->messageManager->addError(
+                    __("Shipment Document Validation Error(s):\n" . implode("\n", $errorMessages))
+                );
+                $this->_redirect('*/*/new', ['order_id' => $this->getRequest()->getParam('order_id')]);
+                return;
+            }
             $shipment->register();
 
             $shipment->getOrder()->setCustomerNoteNotify(!empty($data['send_email']));
@@ -168,4 +184,19 @@ class Save extends \Magento\Backend\App\Action
             $this->_redirect('sales/order/view', ['order_id' => $shipment->getOrderId()]);
         }
     }
+
+    /**
+     * @return \Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface
+     * @deprecated
+     */
+    private function getShipmentValidator()
+    {
+        if ($this->shipmentValidator === null) {
+            $this->shipmentValidator = $this->_objectManager->get(
+                \Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface::class
+            );
+        }
+
+        return $this->shipmentValidator;
+    }
 }
diff --git a/app/code/Magento/Shipping/Controller/Adminhtml/Order/ShipmentLoader.php b/app/code/Magento/Shipping/Controller/Adminhtml/Order/ShipmentLoader.php
index b452c88887c9e59bea3711578dff9e6db886ba84..c4efe6f6507d5641d7ef7d9ed378c73a6038c1de 100644
--- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/ShipmentLoader.php
+++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/ShipmentLoader.php
@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php
index af310da3064f892596cbe695eef6edc94a17e13b..296a3302de786f1c4e7c7c5d8def46e4fd0cf2f3 100644
--- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php
+++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php
@@ -596,11 +596,12 @@ abstract class AbstractCarrierOnline extends AbstractCarrier
      * Check whether girth is allowed for the carrier
      *
      * @param null|string $countyDest
+     * @param null|string $carrierMethodCode
      * @return bool
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      * @api
      */
-    public function isGirthAllowed($countyDest = null)
+    public function isGirthAllowed($countyDest = null, $carrierMethodCode = null)
     {
         return false;
     }
diff --git a/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/SaveTest.php b/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/SaveTest.php
index af89f1a9146be07f49a31f7c5b0ad90c5d3c96b0..f8d9c06dc8ec05c07c699c4b22e7b830c796e4dc 100644
--- a/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/SaveTest.php
+++ b/app/code/Magento/Shipping/Test/Unit/Controller/Adminhtml/Order/Shipment/SaveTest.php
@@ -11,6 +11,9 @@ namespace Magento\Shipping\Test\Unit\Controller\Adminhtml\Order\Shipment;
 use Magento\Backend\App\Action;
 use Magento\Sales\Model\Order\Email\Sender\ShipmentSender;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface;
+use Magento\Sales\Model\Order\Shipment\Validation\QuantityValidator;
+
 /**
  * Class SaveTest
  *
@@ -88,6 +91,11 @@ class SaveTest extends \PHPUnit_Framework_TestCase
      */
     protected $saveAction;
 
+    /**
+     * @var ShipmentValidatorInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $shipmentValidatorMock;
+
     /**
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
@@ -210,6 +218,10 @@ class SaveTest extends \PHPUnit_Framework_TestCase
             ->method('getFormKeyValidator')
             ->will($this->returnValue($this->formKeyValidator));
 
+        $this->shipmentValidatorMock = $this->getMockBuilder(ShipmentValidatorInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
         $this->saveAction = $objectManagerHelper->getObject(
             \Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save::class,
             [
@@ -218,7 +230,8 @@ class SaveTest extends \PHPUnit_Framework_TestCase
                 'context' => $this->context,
                 'shipmentLoader' => $this->shipmentLoader,
                 'request' => $this->request,
-                'response' => $this->response
+                'response' => $this->response,
+                'shipmentValidator' => $this->shipmentValidatorMock
             ]
         );
     }
@@ -346,6 +359,11 @@ class SaveTest extends \PHPUnit_Framework_TestCase
                 ->will($this->returnValue($orderId));
             $this->prepareRedirect($path, $arguments);
 
+            $this->shipmentValidatorMock->expects($this->once())
+                ->method('validate')
+                ->with($shipment, [QuantityValidator::class])
+                ->willReturn([]);
+
             $this->saveAction->execute();
             $this->assertEquals($this->response, $this->saveAction->getResponse());
         }
diff --git a/app/code/Magento/Shipping/view/frontend/templates/tracking/details.phtml b/app/code/Magento/Shipping/view/frontend/templates/tracking/details.phtml
new file mode 100644
index 0000000000000000000000000000000000000000..d655d96e1dd365be8f5c19960876f00413b6ab7a
--- /dev/null
+++ b/app/code/Magento/Shipping/view/frontend/templates/tracking/details.phtml
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+// @codingStandardsIgnoreFile
+
+/** @var $block \Magento\Framework\View\Element\Template */
+
+$track = $block->getData('track');
+$email = $block->getData('storeSupportEmail');
+$fields = [
+    'Status' => 'getStatus',
+    'Signed by' => 'getSignedby',
+    'Delivered to' => 'getDeliveryLocation',
+    'Shipped or billed on' => 'getShippedDate',
+    'Service Type' => 'getService',
+    'Weight' => 'getWeight',
+];
+?>
+<table class="data table order tracking" id="tracking-table-popup-<?php /* @noEscape */ echo $track->getTracking(); ?>">
+    <caption class="table-caption"><?php echo $block->escapeHtml(__('Order tracking')); ?></caption>
+    <tbody>
+    <?php if (is_object($track)): ?>
+        <tr>
+            <th class="col label" scope="row"><?php echo $block->escapeHtml(__('Tracking Number:')); ?></th>
+            <td class="col value"><?php echo $block->escapeHtml($track->getTracking()); ?></td>
+        </tr>
+        <?php if ($track->getCarrierTitle()): ?>
+            <tr>
+                <th class="col label" scope="row"><?php echo $block->escapeHtml(__('Carrier:')); ?></th>
+                <td class="col value"><?php echo $block->escapeHtml($track->getCarrierTitle()); ?></td>
+            </tr>
+        <?php endif; ?>
+        <?php if ($track->getErrorMessage()): ?>
+            <tr>
+                <th class="col label" scope="row"><?php echo $block->escapeHtml(__('Error:')); ?></th>
+                <td class="col error">
+                    <?php echo $block->escapeHtml(__('Tracking information is currently not available. Please ')); ?>
+                    <?php if ($block->getContactUsEnabled()) : ?>
+                        <a href="<?php echo $block->escapeUrl($block->getContactUs()); ?>" target="_blank"
+                           title="<?php echo $block->escapeHtml(__('contact us')); ?>">
+                            <?php echo $block->escapeHtml(__('contact us')); ?>
+                        </a>
+                        <?php echo $block->escapeHtml(__(' for more information or ')); ?>
+                    <?php endif; ?>
+                    <?php echo $block->escapeHtml(__('email us at ')); ?>
+                    <a href="mailto:<?php /* @noEscape */ echo $email; ?>"><?php /* @noEscape */ echo $email; ?></a>
+                </td>
+            </tr>
+        <?php elseif ($track->getTrackSummary()): ?>
+            <tr>
+                <th class="col label" scope="row"><?php echo $block->escapeHtml(__('Info:')); ?></th>
+                <td class="col value"><?php echo $block->escapeHtml($track->getTrackSummary()); ?></td>
+            </tr>
+        <?php elseif ($track->getUrl()): ?>
+            <tr>
+                <th class="col label" scope="row"><?php echo $block->escapeHtml(__('Track:')); ?></th>
+                <td class="col value">
+                    <a href="<?php echo $block->escapeUrl($track->getUrl()); ?>" target="_blank">
+                        <?php echo $block->escapeUrl($track->getUrl()); ?>
+                    </a>
+                </td>
+            </tr>
+        <?php else: ?>
+            <?php foreach ($fields as $title => $property): ?>
+                <?php if (!empty($track->$property())): ?>
+                    <tr>
+                        <th class="col label" scope="row"><?php /* @noEscape */ echo $block->escapeHtml(__($title . ':')); ?></th>
+                        <td class="col value"><?php echo $block->escapeHtml($track->$property()); ?></td>
+                    </tr>
+                <?php endif;?>
+            <?php endforeach; ?>
+
+            <?php if ($track->getDeliverydate()): ?>
+                <tr>
+                    <th class="col label" scope="row"><?php echo $block->escapeHtml(__('Delivered on:')); ?></th>
+                    <td class="col value">
+                        <?php /* @noEscape */ echo $block->formatDeliveryDateTime($track->getDeliverydate(), $track->getDeliverytime()); ?>
+                    </td>
+                </tr>
+            <?php endif; ?>
+        <?php endif; ?>
+    <?php elseif (isset($track['title']) && isset($track['number']) && $track['number']): ?>
+        <?php /* if the tracking is custom value */ ?>
+        <tr>
+            <th class="col label" scope="row">
+                <?php echo($track['title'] ? $block->escapeHtml($track['title']) : $block->escapeHtml(__('N/A'))); ?>:
+            </th>
+            <td class="col value"><?php echo(isset($track['number']) ? $block->escapeHtml($track['number']) : ''); ?></td>
+        </tr>
+    <?php endif; ?>
+    </tbody>
+</table>
diff --git a/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml
index e9bb00df8b852f05ba991bb534692a2c6cd39968..412cb4b411a98b241995c5b9ef736d33e36c2fbc 100644
--- a/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml
+++ b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml
@@ -4,156 +4,60 @@
  * See COPYING.txt for license details.
  */
 
+use Magento\Framework\View\Element\Template;
+
 // @codingStandardsIgnoreFile
 
+/** @var $block \Magento\Shipping\Block\Tracking\Popup */
+
+$results = $block->getTrackingInfo();
 ?>
-<?php /** @var $block \Magento\Shipping\Block\Tracking\Popup */ ?>
-<?php $_results = $block->getTrackingInfo(); ?>
 <div class="page tracking">
-    <?php if (sizeof($_results)>0): ?>
-    <?php foreach ($_results as $shipid => $_result): ?>
-        <?php if ($shipid): ?>
-        <div class="order subtitle caption"><?php /* @escapeNotVerified */ echo __('Shipment #') . $shipid; ?></div>
-        <?php endif; ?>
-        <?php if (sizeof($_result)>0): ?>
-            <?php $rowCount = sizeof($_result); $counter = 1; ?>
-            <?php $_id = 0; foreach ($_result as $track): ?>
-                <div class="table-wrapper">
-                    <table class="data table order tracking" id="tracking-table-popup-<?php /* @escapeNotVerified */ echo $_id ?>">
-                        <caption class="table-caption"><?php /* @escapeNotVerified */ echo __('Order tracking'); ?></caption>
-                        <tbody>
-                        <?php if (is_object($track)): ?>
-                            <tr>
-                                <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Tracking Number:'); ?></th>
-                                <td class="col value"><?php echo $block->escapeHtml($track->getTracking()); ?></td>
-                            </tr>
-                            <?php if ($track->getCarrierTitle()): ?>
-                                <tr>
-                                    <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Carrier:'); ?></th>
-                                    <td class="col value"><?php echo $block->escapeHtml($track->getCarrierTitle()); ?></td>
-                                </tr>
-                            <?php endif; ?>
-                            <?php if ($track->getErrorMessage()): ?>
-                                <tr>
-                                    <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Error:'); ?></th>
-                                    <td class="col error"><?php /* @escapeNotVerified */ echo __('Tracking information is currently not available. Please '); if ($block->getContactUsEnabled()) : ?><a href="<?php /* @escapeNotVerified */ echo $block->getContactUs() ?>" title="<?php /* @escapeNotVerified */ echo __('contact us') ?>" onclick="this.target='_blank'"><?php /* @escapeNotVerified */ echo __('contact us') ?></a><?php /* @escapeNotVerified */ echo __(' for more information or '); endif; /* @escapeNotVerified */ echo __('email us at '); ?><a href="mailto:<?php /* @escapeNotVerified */ echo $block->getStoreSupportEmail() ?>"><?php /* @escapeNotVerified */ echo $block->getStoreSupportEmail() ?></a></td>
-                                </tr>
-                            <?php elseif ($track->getTrackSummary()): ?>
-                                <tr>
-                                    <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Info:'); ?></th>
-                                    <td class="col value"><?php /* @escapeNotVerified */ echo $track->getTrackSummary(); ?></td>
-                                </tr>
-                            <?php elseif ($track->getUrl()): ?>
-                                <tr>
-                                    <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Track:'); ?></th>
-                                    <td class="col value"><a href="<?php echo $block->escapeHtml($track->getUrl()); ?>" onclick="this.target='_blank'"><?php echo $block->escapeHtml($track->getUrl()); ?></a></td>
-                                </tr>
-                            <?php else: ?>
-                                <?php if ($track->getStatus()): ?>
-                                    <tr>
-                                        <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Status:'); ?></th>
-                                        <td class="col value"><?php /* @escapeNotVerified */ echo $track->getStatus(); ?></td>
-                                    </tr>
-                                <?php endif; ?>
-
-                                <?php if ($track->getDeliverydate()): ?>
-                                    <tr>
-                                        <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Delivered on:'); ?></th>
-                                        <td class="col value"><?php /* @escapeNotVerified */ echo $block->formatDeliveryDateTime($track->getDeliverydate(), $track->getDeliverytime()); ?></td>
-                                    </tr>
-                                <?php endif; ?>
-
-                                <?php if ($track->getSignedby()): ?>
-                                    <tr>
-                                        <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Signed by:'); ?></th>
-                                        <td class="col value"><?php /* @escapeNotVerified */ echo $track->getSignedby(); ?></td>
-                                    </tr>
-                                <?php endif; ?>
-
-                                <?php if ($track->getDeliveryLocation()): ?>
-                                    <tr>
-                                        <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Delivered to:'); ?></th>
-                                        <td class="col value"><?php /* @escapeNotVerified */ echo $track->getDeliveryLocation(); ?></td>
-                                    </tr>
-                                <?php endif; ?>
-
-                                <?php if ($track->getShippedDate()): ?>
-                                    <tr>
-                                        <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Shipped or billed on:'); ?></th>
-                                        <td class="col value"><?php /* @escapeNotVerified */ echo $track->getShippedDate(); ?></td>
-                                    </tr>
-                                <?php endif; ?>
-
-                                <?php if ($track->getService()): ?>
-                                    <tr>
-                                        <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Service Type:'); ?></th>
-                                        <td class="col value"><?php /* @escapeNotVerified */ echo $track->getService(); ?></td>
-                                    </tr>
-                                <?php endif; ?>
-
-                                <?php if ($track->getWeight()): ?>
-                                    <tr>
-                                        <th class="col label" scope="row"><?php /* @escapeNotVerified */ echo __('Weight:'); ?></th>
-                                        <td class="col value"><?php /* @escapeNotVerified */ echo $track->getWeight(); ?></td>
-                                    </tr>
-                                <?php endif; ?>
-                            <?php endif; ?>
-                        <?php elseif (isset($track['title']) && isset($track['number']) && $track['number']): ?>
-                            <?php /* if the tracking is custom value */ ?>
-                            <tr>
-                                <th class="col label" scope="row"><?php echo($track['title'] ? $block->escapeHtml($track['title']) : __('N/A')); ?>:</th>
-                                <td class="col value"><?php echo(isset($track['number']) ? $block->escapeHtml($track['number']) : ''); ?></td>
-                            </tr>
-                        <?php endif; ?>
-                        </tbody>
-                    </table>
-                </div>
-                <?php if (is_object($track) && sizeof($track->getProgressdetail())>0): ?>
+    <?php if (!empty($results)): ?>
+        <?php foreach ($results as $shipId => $result): ?>
+            <?php if ($shipId): ?>
+                <div class="order subtitle caption"><?php /* @noEscape */ echo $block->escapeHtml(__('Shipment #')) . $shipId; ?></div>
+            <?php endif; ?>
+            <?php if (!empty($result)): ?>
+                <?php foreach ($result as $counter => $track): ?>
                     <div class="table-wrapper">
-                        <table class="data table order tracking" id="track-history-table-<?php /* @escapeNotVerified */ echo $track->getTracking(); ?>">
-                            <caption class="table-caption"><?php /* @escapeNotVerified */ echo __('Track history'); ?></caption>
-                            <thead>
-                            <tr>
-                                <th class="col location" scope="col"><?php /* @escapeNotVerified */ echo __('Location') ?></th>
-                                <th class="col date" scope="col"><?php /* @escapeNotVerified */ echo __('Date') ?></th>
-                                <th class="col time" scope="col"><?php /* @escapeNotVerified */ echo __('Local Time') ?></th>
-                                <th class="col description" scope="col"><?php /* @escapeNotVerified */ echo __('Description') ?></th>
-                            </tr>
-                            </thead>
-                            <tbody>
-                            <?php foreach ($track->getProgressdetail() as $_detail): ?>
-                                <?php $_detailDate = (isset($_detail['deliverydate']) ? $block->formatDeliveryDate($_detail['deliverydate']) : '') ?>
-                                <?php $_detailTime = (isset($_detail['deliverytime']) ? $block->formatDeliveryTime($_detail['deliverytime'], $_detail['deliverydate']) : '') ?>
-                                <tr>
-                                    <td data-th="<?php echo $block->escapeHtml(__('Location')) ?>" class="col location"><?php echo(isset($_detail['deliverylocation']) ? $_detail['deliverylocation'] : ''); ?></td>
-                                    <td data-th="<?php echo $block->escapeHtml(__('Date')) ?>" class="col date"><?php /* @escapeNotVerified */ echo $_detailDate ?></td>
-                                    <td data-th="<?php echo $block->escapeHtml(__('Local Time')) ?>" class="col time"><?php /* @escapeNotVerified */ echo $_detailTime ?></td>
-                                    <td data-th="<?php echo $block->escapeHtml(__('Description')) ?>" class="col description"><?php echo(isset($_detail['activity']) ? $_detail['activity'] : '') ?></td>
-                                </tr>
-                            <?php endforeach; ?>
-                            </tbody>
-                        </table>
+                        <?php
+                            $block->addChild('shipping.tracking.details.' . $counter, Template::class, [
+                                'track' => $track,
+                                'template' => 'Magento_Shipping::tracking/details.phtml',
+                                'storeSupportEmail' => $block->getStoreSupportEmail()
+                            ]
+                        );
+                        ?>
+                        <?php /* @noEscape */ echo $block->getChildHtml('shipping.tracking.details.' . $counter); ?>
                     </div>
-                <?php endif; ?>
-                <?php if ($counter != $rowCount): ?>
-                <?php endif; ?>
-                <?php $counter++; ?>
-            <?php /* end for each tracking information */ ?>
-            <?php endforeach; ?>
-        <?php else: ?>
-            <div class="message info empty"><div><?php /* @escapeNotVerified */ echo __('There is no tracking available for this shipment.'); ?></div></div>
-        <?php endif; ?>
-
-    <?php endforeach; ?>
+                    <?php if (!empty($track->getProgressdetail())): ?>
+                        <?php
+                            $block->addChild('shipping.tracking.progress.'. $counter, Template::class, [
+                                'track' => $track,
+                                'template' => 'Magento_Shipping::tracking/progress.phtml'
+                            ]);
+                        ?>
+                        <?php /* @noEscape  */echo $block->getChildHtml('shipping.tracking.progress.' . $counter); ?>
+                    <?php endif; ?>
+                <?php endforeach; ?>
+            <?php else: ?>
+                <div class="message info empty">
+                    <div><?php echo $block->escapeHtml(__('There is no tracking available for this shipment.')); ?></div>
+                </div>
+            <?php endif; ?>
+        <?php endforeach; ?>
     <?php else: ?>
-        <div class="message info empty"><div><?php /* @escapeNotVerified */ echo __('There is no tracking available.'); ?></div></div>
+        <div class="message info empty">
+            <div><?php echo $block->escapeHtml(__('There is no tracking available.')); ?></div>
+        </div>
     <?php endif; ?>
     <div class="actions">
         <button type="button"
-                title="<?php /* @escapeNotVerified */ echo __('Close Window') ?>"
+                title="<?php echo $block->escapeHtml(__('Close Window')); ?>"
                 class="action close"
                 onclick="window.close(); window.opener.focus();">
-            <span><?php /* @escapeNotVerified */ echo __('Close Window') ?></span>
+            <span><?php echo $block->escapeHtml(__('Close Window')); ?></span>
         </button>
     </div>
 </div>
diff --git a/app/code/Magento/Shipping/view/frontend/templates/tracking/progress.phtml b/app/code/Magento/Shipping/view/frontend/templates/tracking/progress.phtml
new file mode 100644
index 0000000000000000000000000000000000000000..d5ce13a277f8b07606e8d27b643e6f5dca6508ed
--- /dev/null
+++ b/app/code/Magento/Shipping/view/frontend/templates/tracking/progress.phtml
@@ -0,0 +1,43 @@
+<?php
+/**
+* Copyright © 2016 Magento. All rights reserved.
+* See COPYING.txt for license details.
+*/
+
+// @codingStandardsIgnoreFile
+
+/** @var $block \Magento\Framework\View\Element\Template */
+$track = $block->getData('track');
+?>
+<div class="table-wrapper">
+    <table class="data table order tracking" id="track-history-table-<?php /* @noEscape */ echo $track->getTracking(); ?>">
+        <caption class="table-caption"><?php echo $block->escapeHtml(__('Track history')); ?></caption>
+        <thead>
+        <tr>
+            <th class="col location" scope="col"><?php echo $block->escapeHtml(__('Location')); ?></th>
+            <th class="col date" scope="col"><?php echo $block->escapeHtml(__('Date')); ?></th>
+            <th class="col time" scope="col"><?php echo $block->escapeHtml(__('Local Time')); ?></th>
+            <th class="col description" scope="col"><?php echo $block->escapeHtml(__('Description')); ?></th>
+        </tr>
+        </thead>
+        <tbody>
+        <?php foreach ($track->getProgressdetail() as $detail): ?>
+            <?php $detailDate = (!empty($detail['deliverydate']) ? $block->formatDeliveryDate($detail['deliverydate']) : ''); ?>
+            <?php $detailTime = (!empty($detail['deliverytime']) ? $block->formatDeliveryTime($detail['deliverytime'], $detail['deliverydate']) : ''); ?>
+            <tr>
+                <td data-th="<?php echo $block->escapeHtml(__('Location')); ?>" class="col location">
+                    <?php echo(!empty($detail['deliverylocation']) ? $block->escapeHtml($detail['deliverylocation']) : ''); ?>
+                </td>
+                <td data-th="<?php echo $block->escapeHtml(__('Date')); ?>" class="col date">
+                    <?php /* @noEscape */ echo $detailDate; ?>
+                </td>
+                <td data-th="<?php echo $block->escapeHtml(__('Local Time')); ?>" class="col time">
+                    <?php /* @noEscape */ echo $detailTime; ?></td>
+                <td data-th="<?php echo $block->escapeHtml(__('Description')); ?>" class="col description">
+                    <?php echo(!empty($detail['activity']) ? $block->escapeHtml($detail['activity']) : ''); ?>
+                </td>
+            </tr>
+        <?php endforeach; ?>
+        </tbody>
+    </table>
+</div>
\ No newline at end of file
diff --git a/app/code/Magento/Store/Api/StoreWebsiteRelationInterface.php b/app/code/Magento/Store/Api/StoreWebsiteRelationInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..2e5b5ee6a2ea94b43b93eeff4194828feab825b6
--- /dev/null
+++ b/app/code/Magento/Store/Api/StoreWebsiteRelationInterface.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Store\Api;
+
+/**
+ * Interface StoreWebsiteRelationInterface
+ * Provides stores information by website id
+ * @package Magento\Store\Api
+ * @api
+ */
+interface StoreWebsiteRelationInterface
+{
+    /**
+     * Get assigned to website store
+     * @param int $websiteId
+     * @return array
+     */
+    public function getStoreByWebsiteId($websiteId);
+}
diff --git a/app/code/Magento/Store/App/Action/Plugin/Context.php b/app/code/Magento/Store/App/Action/Plugin/Context.php
index e56b301733cca65b6cb7cfdfce4a8b870f75ee47..1b4545384255c3154212ce84cc81c1a83fa6dcbb 100644
--- a/app/code/Magento/Store/App/Action/Plugin/Context.php
+++ b/app/code/Magento/Store/App/Action/Plugin/Context.php
@@ -11,6 +11,8 @@ use Magento\Framework\Phrase;
 use Magento\Store\Api\StoreCookieManagerInterface;
 use Magento\Store\Api\StoreResolverInterface;
 use Magento\Store\Model\StoreManagerInterface;
+use Magento\Framework\App\Action\AbstractAction;
+use Magento\Framework\App\RequestInterface;
 
 /**
  * Class ContextPlugin
@@ -27,11 +29,6 @@ class Context
      */
     protected $httpContext;
 
-    /**
-     * @var \Magento\Framework\App\Request\Http
-     */
-    protected $httpRequest;
-
     /**
      * @var \Magento\Store\Model\StoreManagerInterface
      */
@@ -45,40 +42,35 @@ class Context
     /**
      * @param \Magento\Framework\Session\SessionManagerInterface $session
      * @param \Magento\Framework\App\Http\Context $httpContext
-     * @param \Magento\Framework\App\Request\Http $httpRequest
      * @param \Magento\Store\Model\StoreManagerInterface $storeManager
      * @param StoreCookieManagerInterface $storeCookieManager
      */
     public function __construct(
         \Magento\Framework\Session\SessionManagerInterface $session,
         \Magento\Framework\App\Http\Context $httpContext,
-        \Magento\Framework\App\Request\Http $httpRequest,
         \Magento\Store\Model\StoreManagerInterface $storeManager,
         StoreCookieManagerInterface $storeCookieManager
     ) {
         $this->session      = $session;
         $this->httpContext  = $httpContext;
-        $this->httpRequest  = $httpRequest;
         $this->storeManager = $storeManager;
         $this->storeCookieManager = $storeCookieManager;
     }
 
     /**
-     * @param \Magento\Framework\App\ActionInterface $subject
-     * @param callable $proceed
-     * @param \Magento\Framework\App\RequestInterface $request
-     * @return mixed
+     * Set store and currency to http context
+     *
+     * @param AbstractAction $subject
+     * @param RequestInterface $request
+     * @return void
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundDispatch(
-        \Magento\Framework\App\ActionInterface $subject,
-        \Closure $proceed,
-        \Magento\Framework\App\RequestInterface $request
-    ) {
+    public function beforeDispatch(AbstractAction $subject, RequestInterface $request)
+    {
         /** @var \Magento\Store\Model\Store $defaultStore */
         $defaultStore = $this->storeManager->getWebsite()->getDefaultStore();
 
-        $storeCode = $this->httpRequest->getParam(
+        $storeCode = $request->getParam(
             StoreResolverInterface::PARAM_NAME,
             $this->storeCookieManager->getStoreCodeFromCookie()
         );
@@ -103,6 +95,5 @@ class Context
             $this->session->getCurrencyCode() ?: $currentStore->getDefaultCurrencyCode(),
             $defaultStore->getDefaultCurrencyCode()
         );
-        return $proceed($request);
     }
 }
diff --git a/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php b/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php
index 56a7157e7004c2b9ec87460b45dcf68d082557b5..fcb9316220793669b93630eb36b879de7be9a426 100644
--- a/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php
+++ b/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php
@@ -23,17 +23,14 @@ class StoreCheck
     }
 
     /**
-     * @param \Magento\Framework\App\ActionInterface $subject
-     * @param callable $proceed
+     * @param \Magento\Framework\App\Action\AbstractAction $subject
      * @param \Magento\Framework\App\RequestInterface $request
-     *
-     * @return \Magento\Framework\App\ResponseInterface
+     * @return void
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      * @throws \Magento\Framework\Exception\State\InitException
      */
-    public function aroundDispatch(
-        \Magento\Framework\App\ActionInterface $subject,
-        \Closure $proceed,
+    public function beforeDispatch(
+        \Magento\Framework\App\Action\AbstractAction $subject,
         \Magento\Framework\App\RequestInterface $request
     ) {
         if (!$this->_storeManager->getStore()->isActive()) {
@@ -41,6 +38,5 @@ class StoreCheck
                 __('Current store is not active.')
             );
         }
-        return $proceed($request);
     }
 }
diff --git a/app/code/Magento/Store/Model/ResourceModel/StoreWebsiteRelation.php b/app/code/Magento/Store/Model/ResourceModel/StoreWebsiteRelation.php
new file mode 100644
index 0000000000000000000000000000000000000000..7b8302578c24b1e905427290d7da9d012a2f6381
--- /dev/null
+++ b/app/code/Magento/Store/Model/ResourceModel/StoreWebsiteRelation.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Store\Model\ResourceModel;
+
+use Magento\Framework\App\ResourceConnection;
+
+/**
+ * Store Website Relation Resource Model
+ */
+class StoreWebsiteRelation
+{
+    /** @var  ResourceConnection */
+    private $resource;
+
+    /**
+     * StoreWebsiteRelation constructor.
+     * @param ResourceConnection $resource
+     */
+    public function __construct(ResourceConnection $resource)
+    {
+        $this->resource = $resource;
+    }
+
+    /**
+     * @param int $websiteId
+     * @return array
+     */
+    public function getStoreByWebsiteId($websiteId)
+    {
+        $connection = $this->resource->getConnection();
+        $storeTable = $this->resource->getTableName('store');
+        $storeSelect = $connection->select()->from($storeTable, ['store_id'])->where(
+            'website_id = ?',
+            $websiteId
+        );
+        $data = $connection->fetchCol($storeSelect);
+        return $data;
+    }
+}
diff --git a/app/code/Magento/Store/Model/StoreManager.php b/app/code/Magento/Store/Model/StoreManager.php
index 77532f2188c094b80f9d39b47e780361c302fdc2..c34f4e1bd2a58d370e92a34295ae4a60647133c1 100644
--- a/app/code/Magento/Store/Model/StoreManager.php
+++ b/app/code/Magento/Store/Model/StoreManager.php
@@ -5,12 +5,16 @@
  */
 namespace Magento\Store\Model;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Store\Api\StoreResolverInterface;
+use Magento\Store\Model\ResourceModel\StoreWebsiteRelation;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class StoreManager implements \Magento\Store\Model\StoreManagerInterface
+class StoreManager implements
+    \Magento\Store\Model\StoreManagerInterface,
+    \Magento\Store\Api\StoreWebsiteRelationInterface
 {
     /**
      * Application run code
@@ -286,4 +290,21 @@ class StoreManager implements \Magento\Store\Model\StoreManagerInterface
             \Magento\Store\Model\ScopeInterface::SCOPE_STORE
         );
     }
+
+    /**
+     * @deprecated
+     * @return StoreWebsiteRelation
+     */
+    private function getStoreWebsiteRelation()
+    {
+        return ObjectManager::getInstance()->get(StoreWebsiteRelation::class);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getStoreByWebsiteId($websiteId)
+    {
+        return $this->getStoreWebsiteRelation()->getStoreByWebsiteId($websiteId);
+    }
 }
diff --git a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/ContextTest.php b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/ContextTest.php
index 32aeb0b515124f1d552624d2a7a09b2ad520a85b..2411475b203818c28af71de117172236a5b321bf 100644
--- a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/ContextTest.php
+++ b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/ContextTest.php
@@ -3,14 +3,13 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
-// @codingStandardsIgnoreFile
-
 namespace Magento\Store\Test\Unit\App\Action\Plugin;
 
 use Magento\Framework\App\Http\Context;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
 use Magento\Store\Model\StoreManagerInterface;
+use Magento\Framework\App\Action\AbstractAction;
+use Magento\Framework\App\RequestInterface;
 
 /**
  * Class ContextPluginTest
@@ -38,11 +37,6 @@ class ContextTest extends \PHPUnit_Framework_TestCase
      */
     protected $httpContextMock;
 
-    /**
-     * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $httpRequestMock;
-
     /**
      * @var \Magento\Store\Model\StoreManager|\PHPUnit_Framework_MockObject_MockObject
      */
@@ -69,17 +63,12 @@ class ContextTest extends \PHPUnit_Framework_TestCase
     protected $websiteMock;
 
     /**
-     * @var \Closure
-     */
-    protected $closureMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var AbstractAction|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $subjectMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $requestMock;
 
@@ -88,67 +77,53 @@ class ContextTest extends \PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        $this->sessionMock = $this->getMock(
+        $this->sessionMock = $this->getMock(
             \Magento\Framework\Session\Generic::class,
             ['getCurrencyCode'],
             [],
             '',
             false
         );
-        $this->httpContextMock = $this->getMock(
+        $this->httpContextMock = $this->getMock(
             \Magento\Framework\App\Http\Context::class,
             [],
             [],
             '',
             false
         );
-        $this->httpRequestMock = $this->getMock(
-            \Magento\Framework\App\Request\Http::class,
-            ['getParam'],
-            [],
-            '',
-            false
-        );
         $this->storeManager = $this->getMock(\Magento\Store\Model\StoreManagerInterface::class);
         $this->storeCookieManager = $this->getMock(\Magento\Store\Api\StoreCookieManagerInterface::class);
-        $this->storeMock = $this->getMock(
+        $this->storeMock = $this->getMock(
             \Magento\Store\Model\Store::class,
             [],
             [],
             '',
             false
         );
-        $this->currentStoreMock = $this->getMock(
+        $this->currentStoreMock = $this->getMock(
             \Magento\Store\Model\Store::class,
             [],
             [],
             '',
             false
         );
-        $this->websiteMock = $this->getMock(
+        $this->websiteMock = $this->getMock(
             \Magento\Store\Model\Website::class,
             ['getDefaultStore', '__wakeup'],
             [],
             '',
             false
         );
-        $this->closureMock = function () {
-            return 'ExpectedValue';
-        };
-        $this->subjectMock = $this->getMock(
-            \Magento\Framework\App\Action\Action::class,
-            [],
-            [],
-            '',
-            false
-        );
-        $this->requestMock = $this->getMock(\Magento\Framework\App\RequestInterface::class);
+        $this->requestMock = $this->getMockBuilder(RequestInterface::class)->getMockForAbstractClass();
+        $this->subjectMock = $this->getMockBuilder(AbstractAction::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
 
-        $this->plugin = (new ObjectManager($this))->getObject(\Magento\Store\App\Action\Plugin\Context::class,
+        $this->plugin = (new ObjectManager($this))->getObject(
+            \Magento\Store\App\Action\Plugin\Context::class,
             [
                 'session' => $this->sessionMock,
                 'httpContext' => $this->httpContextMock,
-                'httpRequest' => $this->httpRequestMock,
                 'storeManager' => $this->storeManager,
                 'storeCookieManager' => $this->storeCookieManager,
             ]
@@ -171,7 +146,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue(self::CURRENCY_CURRENT_STORE));
     }
 
-    public function testAroundDispatchCurrencyFromSession()
+    public function testBeforeDispatchCurrencyFromSession()
     {
         $this->storeMock->expects($this->once())
             ->method('getDefaultCurrencyCode')
@@ -184,7 +159,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase
             ->method('getCode')
             ->willReturn('custom_store');
 
-        $this->httpRequestMock->expects($this->once())
+        $this->requestMock->expects($this->once())
             ->method('getParam')
             ->with($this->equalTo('___store'))
             ->will($this->returnValue('default'));
@@ -205,10 +180,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase
             ->method('setValue')
             ->with(Context::CONTEXT_CURRENCY, self::CURRENCY_SESSION, self::CURRENCY_DEFAULT);
 
-        $this->assertEquals(
-            'ExpectedValue',
-            $this->plugin->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock)
-        );
+        $this->plugin->beforeDispatch($this->subjectMock, $this->requestMock);
     }
 
     public function testDispatchCurrentStoreCurrency()
@@ -224,7 +196,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase
             ->method('getCode')
             ->willReturn('custom_store');
 
-        $this->httpRequestMock->expects($this->once())
+        $this->requestMock->expects($this->once())
             ->method('getParam')
             ->with($this->equalTo('___store'))
             ->will($this->returnValue('default'));
@@ -241,10 +213,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase
             ->method('setValue')
             ->with(Context::CONTEXT_CURRENCY, self::CURRENCY_CURRENT_STORE, self::CURRENCY_DEFAULT);
 
-        $this->assertEquals(
-            'ExpectedValue',
-            $this->plugin->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock)
-        );
+        $this->plugin->beforeDispatch($this->subjectMock, $this->requestMock);
     }
 
     public function testDispatchStoreParameterIsArray()
@@ -266,7 +235,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase
             ]
         ];
 
-        $this->httpRequestMock->expects($this->once())
+        $this->requestMock->expects($this->once())
             ->method('getParam')
             ->with($this->equalTo('___store'))
             ->will($this->returnValue($store));
@@ -284,11 +253,7 @@ class ContextTest extends \PHPUnit_Framework_TestCase
             ->method('setValue')
             ->with(Context::CONTEXT_CURRENCY, self::CURRENCY_CURRENT_STORE, self::CURRENCY_DEFAULT);
 
-        $result = $this->plugin->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock);
-        $this->assertEquals(
-            'ExpectedValue',
-            $result
-        );
+        $this->plugin->beforeDispatch($this->subjectMock, $this->requestMock);
     }
 
     /**
@@ -314,10 +279,10 @@ class ContextTest extends \PHPUnit_Framework_TestCase
             ]
         ];
 
-        $this->httpRequestMock->expects($this->once())
+        $this->requestMock->expects($this->once())
             ->method('getParam')
             ->with($this->equalTo('___store'))
             ->will($this->returnValue($store));
-        $this->plugin->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock);
+        $this->plugin->beforeDispatch($this->subjectMock, $this->requestMock);
     }
 }
diff --git a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php
index 1170377a6b27c8abf96648c5491ef68d6b35fa5e..7e443a05c1b25b2edfcce4499036d65010c215bf 100644
--- a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php
+++ b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php
@@ -3,9 +3,6 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
-// @codingStandardsIgnoreFile
-
 namespace Magento\Store\Test\Unit\App\Action\Plugin;
 
 class StoreCheckTest extends \PHPUnit_Framework_TestCase
@@ -26,17 +23,12 @@ class StoreCheckTest extends \PHPUnit_Framework_TestCase
     protected $_storeMock;
 
     /**
-     * @var \Closure
-     */
-    protected $closureMock;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\App\Action\AbstractAction|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $subjectMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $requestMock;
 
@@ -51,11 +43,10 @@ class StoreCheckTest extends \PHPUnit_Framework_TestCase
         )->will(
             $this->returnValue($this->_storeMock)
         );
-        $this->subjectMock = $this->getMock(\Magento\Framework\App\Action\Action::class, [], [], '', false);
-        $this->closureMock = function () {
-            return 'Expected';
-        };
         $this->requestMock = $this->getMock(\Magento\Framework\App\RequestInterface::class);
+        $this->subjectMock = $this->getMockBuilder(\Magento\Framework\App\Action\AbstractAction::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
 
         $this->_plugin = new \Magento\Store\App\Action\Plugin\StoreCheck($this->_storeManagerMock);
     }
@@ -64,22 +55,15 @@ class StoreCheckTest extends \PHPUnit_Framework_TestCase
      * @expectedException \Magento\Framework\Exception\State\InitException
      * @expectedExceptionMessage Current store is not active.
      */
-    public function testAroundDispatchWhenStoreNotActive()
+    public function testBeforeDispatchWhenStoreNotActive()
     {
         $this->_storeMock->expects($this->any())->method('isActive')->will($this->returnValue(false));
-        $this->assertEquals(
-            'Expected',
-            $this->_plugin->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock)
-        );
+        $this->_plugin->beforeDispatch($this->subjectMock, $this->requestMock);
     }
 
-    public function testAroundDispatchWhenStoreIsActive()
+    public function testBeforeDispatchWhenStoreIsActive()
     {
         $this->_storeMock->expects($this->any())->method('isActive')->will($this->returnValue(true));
-        $this->assertEquals(
-            'Expected',
-            $this->_plugin->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock)
-        );
+        $this->_plugin->beforeDispatch($this->subjectMock, $this->requestMock);
     }
-
 }
diff --git a/app/code/Magento/Store/Test/Unit/Model/ResourceModel/StoreWebsiteRelationTest.php b/app/code/Magento/Store/Test/Unit/Model/ResourceModel/StoreWebsiteRelationTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..fbf8f5aa3d85cd54faed3f1090e6ee490303765f
--- /dev/null
+++ b/app/code/Magento/Store/Test/Unit/Model/ResourceModel/StoreWebsiteRelationTest.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Store\Test\Unit\Model\ResourceModel;
+
+use Magento\Framework\App\ResourceConnection;
+use Magento\Framework\DB\Adapter\AdapterInterface;
+use Magento\Framework\DB\Select;
+use Magento\Store\Model\ResourceModel\StoreWebsiteRelation;
+
+class StoreWebsiteRelationTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var  StoreWebsiteRelation */
+    private $model;
+
+    /** @var  ResourceConnection | \PHPUnit_Framework_MockObject_MockObject */
+    private $resourceConnection;
+
+    /** @var  AdapterInterface | \PHPUnit_Framework_MockObject_MockObject */
+    private $connection;
+
+    /** @var  Select | \PHPUnit_Framework_MockObject_MockObject */
+    private $select;
+
+    public function setUp()
+    {
+        $this->select = $this->getMockBuilder(Select::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->resourceConnection = $this->getMockBuilder(ResourceConnection::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->connection = $this->getMock(AdapterInterface::class);
+
+        $this->model = new StoreWebsiteRelation($this->resourceConnection);
+    }
+
+    public function testGetStoreByWebsiteId()
+    {
+        $data = ['ololo'];
+        $websiteId = 1;
+        $storeTable = 'store';
+        $this->resourceConnection->expects($this->once())
+            ->method('getConnection')
+            ->willReturn($this->connection);
+        $this->resourceConnection->expects($this->once())
+            ->method('getTableName')
+            ->willReturn($storeTable);
+        $this->connection->expects($this->once())
+            ->method('select')
+            ->willReturn($this->select);
+
+        $this->select->expects($this->once())
+            ->method('from')
+            ->with($storeTable, ['store_id'])
+            ->willReturn($this->select);
+        $this->select->expects($this->once())
+            ->method('where')
+            ->with('website_id = ?', $websiteId)
+            ->willReturn($this->select);
+        $this->connection->expects($this->once())
+            ->method('fetchCol')
+            ->willReturn($data);
+
+        $this->assertEquals($data, $this->model->getStoreByWebsiteId($websiteId));
+    }
+}
diff --git a/app/code/Magento/Store/Test/Unit/Url/Plugin/RouteParamsResolverTest.php b/app/code/Magento/Store/Test/Unit/Url/Plugin/RouteParamsResolverTest.php
index b2c5a972734a9663cbcfa3ae13f7cd9f42812ee7..959f9efd0334546196a12df2bf1b546f42c7d6d4 100644
--- a/app/code/Magento/Store/Test/Unit/Url/Plugin/RouteParamsResolverTest.php
+++ b/app/code/Magento/Store/Test/Unit/Url/Plugin/RouteParamsResolverTest.php
@@ -39,10 +39,7 @@ class RouteParamsResolverTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    /**
-     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
-     */
-    public function testAroundSetRouteParamsScopeInParams()
+    public function testBeforeSetRouteParamsScopeInParams()
     {
         $storeCode = 'custom_store';
         $this->scopeConfigMock
@@ -66,20 +63,13 @@ class RouteParamsResolverTest extends \PHPUnit_Framework_TestCase
 
         $this->queryParamsResolverMock->expects($this->once())->method('setQueryParam')->with('___store', $storeCode);
 
-        $this->model->aroundSetRouteParams(
+        $this->model->beforeSetRouteParams(
             $routeParamsResolverMock,
-            function ($data, $unsetOldParams) {
-                $this->assertArrayNotHasKey('_scope_to_url', $data, 'This data item should have been unset.');
-                $this->assertArrayNotHasKey('_scope', $data, 'This data item should have been unset.');
-            },
             $data
         );
     }
 
-    /**
-     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
-     */
-    public function testAroundSetRouteParamsScopeUseStoreInUrl()
+    public function testBeforeSetRouteParamsScopeUseStoreInUrl()
     {
         $storeCode = 'custom_store';
         $this->scopeConfigMock
@@ -103,20 +93,13 @@ class RouteParamsResolverTest extends \PHPUnit_Framework_TestCase
 
         $this->queryParamsResolverMock->expects($this->never())->method('setQueryParam');
 
-        $this->model->aroundSetRouteParams(
+        $this->model->beforeSetRouteParams(
             $routeParamsResolverMock,
-            function ($data, $unsetOldParams) {
-                $this->assertArrayNotHasKey('_scope_to_url', $data, 'This data item should have been unset.');
-                $this->assertArrayNotHasKey('_scope', $data, 'This data item should have been unset.');
-            },
             $data
         );
     }
 
-    /**
-     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
-     */
-    public function testAroundSetRouteParamsSingleStore()
+    public function testBeforeSetRouteParamsSingleStore()
     {
         $storeCode = 'custom_store';
         $this->scopeConfigMock
@@ -140,20 +123,13 @@ class RouteParamsResolverTest extends \PHPUnit_Framework_TestCase
 
         $this->queryParamsResolverMock->expects($this->never())->method('setQueryParam');
 
-        $this->model->aroundSetRouteParams(
+        $this->model->beforeSetRouteParams(
             $routeParamsResolverMock,
-            function ($data, $unsetOldParams) {
-                $this->assertArrayNotHasKey('_scope_to_url', $data, 'This data item should have been unset.');
-                $this->assertArrayNotHasKey('_scope', $data, 'This data item should have been unset.');
-            },
             $data
         );
     }
 
-    /**
-     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
-     */
-    public function testAroundSetRouteParamsNoScopeInParams()
+    public function testBeforeSetRouteParamsNoScopeInParams()
     {
         $storeCode = 'custom_store';
         $this->scopeConfigMock
@@ -185,11 +161,8 @@ class RouteParamsResolverTest extends \PHPUnit_Framework_TestCase
 
         $this->queryParamsResolverMock->expects($this->once())->method('setQueryParam')->with('___store', $storeCode);
 
-        $this->model->aroundSetRouteParams(
+        $this->model->beforeSetRouteParams(
             $routeParamsResolverMock,
-            function ($data, $unsetOldParams) {
-                $this->assertArrayNotHasKey('_scope_to_url', $data, 'This data item should have been unset.');
-            },
             $data
         );
     }
diff --git a/app/code/Magento/Store/Url/Plugin/RouteParamsResolver.php b/app/code/Magento/Store/Url/Plugin/RouteParamsResolver.php
index 4435dfe108cffbffcfd458cc4a8a53dbdd8eb821..8ef0420a23cbe706d8df93abf18ae0fb573f709f 100644
--- a/app/code/Magento/Store/Url/Plugin/RouteParamsResolver.php
+++ b/app/code/Magento/Store/Url/Plugin/RouteParamsResolver.php
@@ -49,15 +49,12 @@ class RouteParamsResolver
      * Process scope query parameters.
      *
      * @param \Magento\Framework\Url\RouteParamsResolver $subject
-     * @param callable $proceed
      * @param array $data
      * @param bool $unsetOldParams
-     * @return \Magento\Framework\Url\RouteParamsResolver
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     * @return array
      */
-    public function aroundSetRouteParams(
+    public function beforeSetRouteParams(
         \Magento\Framework\Url\RouteParamsResolver $subject,
-        \Closure $proceed,
         array $data,
         $unsetOldParams = true
     ) {
@@ -78,6 +75,6 @@ class RouteParamsResolver
         }
         unset($data['_scope_to_url']);
 
-        return $proceed($data, $unsetOldParams);
+        return [$data, $unsetOldParams];
     }
 }
diff --git a/app/code/Magento/Store/etc/di.xml b/app/code/Magento/Store/etc/di.xml
index 3e9192c24d533e8634918dc2f20a1eb2bd265d65..57bf057af2724c220d3e7d1bda152351a8b9de88 100644
--- a/app/code/Magento/Store/etc/di.xml
+++ b/app/code/Magento/Store/etc/di.xml
@@ -12,6 +12,7 @@
     <preference for="Magento\Store\Api\Data\StoreInterface" type="Magento\Store\Model\Store"/>
     <preference for="Magento\Store\Api\Data\GroupInterface" type="Magento\Store\Model\Group"/>
     <preference for="Magento\Store\Api\Data\WebsiteInterface" type="Magento\Store\Model\Website"/>
+    <preference for="Magento\Store\Api\StoreWebsiteRelationInterface" type="Magento\Store\Model\StoreManager"/>
     <preference for="Magento\Store\Api\StoreResolverInterface" type="Magento\Store\Model\StoreResolver"/>
     <preference for="Magento\Framework\App\Request\PathInfoProcessorInterface" type="Magento\Store\App\Request\PathInfoProcessor" />
     <preference for="Magento\Store\Model\StoreManagerInterface" type="Magento\Store\Model\StoreManager" />
diff --git a/app/code/Magento/Swatches/view/adminhtml/ui_component/design_config_form.xml b/app/code/Magento/Swatches/view/adminhtml/ui_component/design_config_form.xml
index 1b5ec69e5d5c246ee0acc735bce6990a07dbe1a8..0891fb351837697abcfe0f45f759d2006d35121e 100644
--- a/app/code/Magento/Swatches/view/adminhtml/ui_component/design_config_form.xml
+++ b/app/code/Magento/Swatches/view/adminhtml/ui_component/design_config_form.xml
@@ -48,12 +48,13 @@
                 <field name="watermark_swatch_image_size">
                     <argument name="data" xsi:type="array">
                         <item name="config" xsi:type="array">
+                            <item name="component" xsi:type="string">Magento_Catalog/component/image-size-field</item>
                             <item name="label" xsi:type="string" translate="true">Image Size</item>
                             <item name="dataType" xsi:type="string">text</item>
                             <item name="formElement" xsi:type="string">input</item>
                             <item name="dataScope" xsi:type="string">watermark_swatch_image_size</item>
                             <item name="validation" xsi:type="array">
-                                <item name="validate-digits" xsi:type="boolean">true</item>
+                                <item name="validate-image-size-range" xsi:type="boolean">true</item>
                             </item>
                             <item name="notice" xsi:type="string" translate="true">Example format: 200x300.</item>
                         </item>
diff --git a/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/CalculationData.php b/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/CalculationData.php
new file mode 100644
index 0000000000000000000000000000000000000000..ccbc5876146ab7a96a95d2d9a03b99a58a434ee7
--- /dev/null
+++ b/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/CalculationData.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Tax\Model\Api\SearchCriteria\JoinProcessor;
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor\CustomJoinInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+/**
+ * Class CalculationData
+ * @package Magento\Tax\Model\Api\SearchCriteria\JoinProcessor
+ */
+class CalculationData implements CustomJoinInterface
+{
+    /** Alias of table, that will be joined */
+    const CALCULATION_DATA_ALIAS = "cd";
+
+    /**
+     * @param \Magento\Tax\Model\ResourceModel\Calculation\Rule\Collection $collection
+     * @return bool
+     */
+    public function apply(AbstractDb $collection)
+    {
+        $isNotApplied = !array_key_exists(
+            self::CALCULATION_DATA_ALIAS,
+            $collection->getSelect()->getPart(\Magento\Framework\Db\Select::FROM)
+        );
+        if ($isNotApplied) {
+            $collection->joinCalculationData(self::CALCULATION_DATA_ALIAS);
+            return true;
+        }
+
+        return false;
+    }
+}
diff --git a/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/CustomerTaxClass.php b/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/CustomerTaxClass.php
new file mode 100644
index 0000000000000000000000000000000000000000..d7ea765b81e1844f012c4f0befda2fda86c99623
--- /dev/null
+++ b/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/CustomerTaxClass.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Tax\Model\Api\SearchCriteria\JoinProcessor;
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor\CustomJoinInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+/**
+ * Class CustomerTaxClass
+ * @package Magento\Tax\Model\Api\SearchCriteria\JoinProcessor
+ */
+class CustomerTaxClass implements CustomJoinInterface
+{
+    /**
+     * @param \Magento\Tax\Model\ResourceModel\Calculation\Rule\Collection $collection
+     * @return true
+     */
+    public function apply(AbstractDb $collection)
+    {
+        $collection->joinCalculationData('ctc');
+        return true;
+    }
+}
diff --git a/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/ProductTaxClass.php b/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/ProductTaxClass.php
new file mode 100644
index 0000000000000000000000000000000000000000..4245013599e1a6310dc71fb949f9f70cc9d2d28c
--- /dev/null
+++ b/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/ProductTaxClass.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Tax\Model\Api\SearchCriteria\JoinProcessor;
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor\CustomJoinInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+/**
+ * Class ProductTaxClass
+ * @package Magento\Tax\Model\Api\SearchCriteria\JoinProcessor
+ */
+class ProductTaxClass implements CustomJoinInterface
+{
+    /**
+     * @param \Magento\Tax\Model\ResourceModel\Calculation\Rule\Collection $collection
+     * @return true
+     */
+    public function apply(AbstractDb $collection)
+    {
+        $collection->joinCalculationData('ptc');
+        return true;
+    }
+}
diff --git a/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/Rate.php b/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/Rate.php
new file mode 100644
index 0000000000000000000000000000000000000000..f77ad5fd86b6ff0d228a0a2cfd885eabddcd58f5
--- /dev/null
+++ b/app/code/Magento/Tax/Model/Api/SearchCriteria/JoinProcessor/Rate.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Tax\Model\Api\SearchCriteria\JoinProcessor;
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor\CustomJoinInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+/**
+ * Class Rate
+ * @package Magento\Tax\Model\Api\SearchCriteria\JoinProcessor
+ */
+class Rate implements CustomJoinInterface
+{
+    /**
+     * @param \Magento\Tax\Model\ResourceModel\Calculation\Rule\Collection $collection
+     * @return true
+     */
+    public function apply(AbstractDb $collection)
+    {
+        $collection->joinCalculationData('rate');
+        return true;
+    }
+}
diff --git a/app/code/Magento/Tax/Model/App/Action/ContextPlugin.php b/app/code/Magento/Tax/Model/App/Action/ContextPlugin.php
index 00dd9ff4cda98962934294e1ba52dfbc588b0e50..03927aed968889324c3e44df9dcb5f5fd1de36ac 100644
--- a/app/code/Magento/Tax/Model/App/Action/ContextPlugin.php
+++ b/app/code/Magento/Tax/Model/App/Action/ContextPlugin.php
@@ -6,9 +6,6 @@
 
 namespace Magento\Tax\Model\App\Action;
 
-use Magento\Customer\Model\Context;
-use Magento\Customer\Model\GroupManagement;
-
 /**
  * Class ContextPlugin
  */
@@ -74,21 +71,19 @@ class ContextPlugin
 
     /**
      * @param \Magento\Framework\App\ActionInterface $subject
-     * @param callable $proceed
      * @param \Magento\Framework\App\RequestInterface $request
      * @return mixed
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundDispatch(
+    public function beforeDispatch(
         \Magento\Framework\App\ActionInterface $subject,
-        \Closure $proceed,
         \Magento\Framework\App\RequestInterface $request
     ) {
         if (!$this->customerSession->isLoggedIn() ||
             !$this->moduleManager->isEnabled('Magento_PageCache') ||
             !$this->cacheConfig->isEnabled() ||
             !$this->taxHelper->isCatalogPriceDisplayAffectedByTax()) {
-            return $proceed($request);
+            return;
         }
 
         $defaultBillingAddress = $this->customerSession->getDefaultTaxBillingAddress();
@@ -107,6 +102,5 @@ class ContextPlugin
                 0
             );
         }
-        return $proceed($request);
     }
 }
diff --git a/app/code/Magento/Tax/Model/Calculation/RateRepository.php b/app/code/Magento/Tax/Model/Calculation/RateRepository.php
index b2d63d99dc88564c0c9316b7452080d94f1c6c18..7dede7589bc842a184bdc2def2481dc281b0388b 100644
--- a/app/code/Magento/Tax/Model/Calculation/RateRepository.php
+++ b/app/code/Magento/Tax/Model/Calculation/RateRepository.php
@@ -10,7 +10,7 @@ namespace Magento\Tax\Model\Calculation;
 use Magento\Directory\Model\CountryFactory;
 use Magento\Directory\Model\RegionFactory;
 use Magento\Framework\Api\Search\FilterGroup;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Exception\InputException;
 use Magento\Framework\Exception\LocalizedException;
 use Magento\Tax\Model\Calculation\Rate;
@@ -68,6 +68,9 @@ class RateRepository implements \Magento\Tax\Api\TaxRateRepositoryInterface
      */
     protected $joinProcessor;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
      * @param Converter $converter
      * @param RateRegistry $rateRegistry
@@ -77,6 +80,7 @@ class RateRepository implements \Magento\Tax\Api\TaxRateRepositoryInterface
      * @param RegionFactory $regionFactory
      * @param \Magento\Tax\Model\ResourceModel\Calculation\Rate $rateResource
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      */
     public function __construct(
         Converter $converter,
@@ -86,7 +90,8 @@ class RateRepository implements \Magento\Tax\Api\TaxRateRepositoryInterface
         CountryFactory $countryFactory,
         RegionFactory $regionFactory,
         \Magento\Tax\Model\ResourceModel\Calculation\Rate $rateResource,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->converter = $converter;
         $this->rateRegistry = $rateRegistry;
@@ -96,6 +101,7 @@ class RateRepository implements \Magento\Tax\Api\TaxRateRepositoryInterface
         $this->regionFactory = $regionFactory;
         $this->resourceModel = $rateResource;
         $this->joinProcessor = $joinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -155,24 +161,7 @@ class RateRepository implements \Magento\Tax\Api\TaxRateRepositoryInterface
         $this->joinProcessor->process($collection);
         $collection->joinRegionTable();
 
-        //Add filters from root filter group to the collection
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
-
-        $sortOrders = $searchCriteria->getSortOrders();
-        /** @var SortOrder $sortOrder */
-        if ($sortOrders) {
-            foreach ($sortOrders as $sortOrder) {
-                $collection->addOrder(
-                    $this->translateField($sortOrder->getField()),
-                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-                );
-            }
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
-
+        $this->collectionProcessor->process($searchCriteria, $collection);
         $taxRate = [];
 
         /** @var \Magento\Tax\Model\Calculation\Rate $taxRateModel */
@@ -192,6 +181,7 @@ class RateRepository implements \Magento\Tax\Api\TaxRateRepositoryInterface
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
+     * @deprecated 
      * @throws \Magento\Framework\Exception\InputException
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection)
@@ -211,6 +201,7 @@ class RateRepository implements \Magento\Tax\Api\TaxRateRepositoryInterface
     /**
      * Translates a field name to a DB column name for use in collection queries.
      *
+     * @deprecated 
      * @param string $field a field name that should be translated to a DB column name.
      * @return string
      */
@@ -308,4 +299,20 @@ class RateRepository implements \Magento\Tax\Api\TaxRateRepositoryInterface
             throw $exception;
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Tax\Model\Api\SearchCriteria\TaxRateCollectionProcessor'
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php b/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php
index 7964353a74c96eb40ac652eb72c19730c6c135f8..a727beef10b0648934dbb21b89945ff2d1462193 100644
--- a/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php
+++ b/app/code/Magento/Tax/Model/Quote/GrandTotalDetailsPlugin.php
@@ -71,18 +71,18 @@ class GrandTotalDetailsPlugin
 
     /**
      * @param \Magento\Quote\Model\Cart\TotalsConverter $subject
-     * @param \Closure $proceed
+     * @param \Magento\Quote\Api\Data\TotalSegmentInterface[] $totalSegments
      * @param \Magento\Quote\Model\Quote\Address\Total[] $addressTotals
+     *
      * @return \Magento\Quote\Api\Data\TotalSegmentInterface[]
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      */
-    public function aroundProcess(
+    public function afterProcess(
         \Magento\Quote\Model\Cart\TotalsConverter $subject,
-        \Closure $proceed,
+        array $totalSegments,
         array $addressTotals = []
     ) {
-        $totalSegments = $proceed($addressTotals);
 
         if (!array_key_exists($this->code, $addressTotals)) {
             return $totalSegments;
diff --git a/app/code/Magento/Tax/Model/TaxClass/Repository.php b/app/code/Magento/Tax/Model/TaxClass/Repository.php
index 30fade99f5018c6cd98b6fe923e7de44a692e86b..2eb8b1757f4bf90ec9c1b8ab2d4ee082e3a7b691 100644
--- a/app/code/Magento/Tax/Model/TaxClass/Repository.php
+++ b/app/code/Magento/Tax/Model/TaxClass/Repository.php
@@ -9,8 +9,8 @@ namespace Magento\Tax\Model\TaxClass;
 
 use Magento\Framework\Api\FilterBuilder;
 use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Api\SearchCriteriaBuilder;
-use Magento\Framework\Api\SortOrder;
 use Magento\Framework\Exception\CouldNotDeleteException;
 use Magento\Framework\Exception\InputException;
 use Magento\Framework\Exception\LocalizedException as ModelException;
@@ -66,6 +66,9 @@ class Repository implements \Magento\Tax\Api\TaxClassRepositoryInterface
      */
     protected $joinProcessor;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
      * @param SearchCriteriaBuilder $searchCriteriaBuilder
      * @param FilterBuilder $filterBuilder
@@ -74,6 +77,7 @@ class Repository implements \Magento\Tax\Api\TaxClassRepositoryInterface
      * @param ClassModelRegistry $classModelRegistry
      * @param \Magento\Tax\Model\ResourceModel\TaxClass $taxClassResource
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+     * @param CollectionProcessorInterface $collectionProcessor
      */
     public function __construct(
         SearchCriteriaBuilder $searchCriteriaBuilder,
@@ -82,7 +86,8 @@ class Repository implements \Magento\Tax\Api\TaxClassRepositoryInterface
         \Magento\Tax\Api\Data\TaxClassSearchResultsInterfaceFactory $searchResultsFactory,
         ClassModelRegistry $classModelRegistry,
         \Magento\Tax\Model\ResourceModel\TaxClass $taxClassResource,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->searchCriteriaBuilder = $searchCriteriaBuilder;
         $this->filterBuilder = $filterBuilder;
@@ -91,6 +96,7 @@ class Repository implements \Magento\Tax\Api\TaxClassRepositoryInterface
         $this->classModelRegistry = $classModelRegistry;
         $this->taxClassResource = $taxClassResource;
         $this->joinProcessor = $joinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -203,34 +209,18 @@ class Repository implements \Magento\Tax\Api\TaxClassRepositoryInterface
         /** @var TaxClassCollection $collection */
         $collection = $this->taxClassCollectionFactory->create();
         $this->joinProcessor->process($collection);
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
+        $this->collectionProcessor->process($searchCriteria, $collection);
         $searchResults->setTotalCount($collection->getSize());
-        $sortOrders = $searchCriteria->getSortOrders();
-        /** @var SortOrder $sortOrder */
-        if ($sortOrders) {
-            foreach ($searchCriteria->getSortOrders() as $sortOrder) {
-                $collection->addOrder(
-                    $sortOrder->getField(),
-                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-                );
-            }
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
         $searchResults->setItems($collection->getItems());
         return $searchResults;
     }
 
     /**
      * Helper function that adds a FilterGroup to the collection.
-     *
-     * TODO: This method duplicates functionality of search methods in other services and should be refactored.
-     *
      * @param FilterGroup $filterGroup
      * @param TaxClassCollection $collection
      * @return void
+     * @deprecated
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, TaxClassCollection $collection)
     {
@@ -245,4 +235,20 @@ class Repository implements \Magento\Tax\Api\TaxClassRepositoryInterface
             $collection->addFieldToFilter($fields, $conditions);
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessor::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Tax/Model/TaxRuleRepository.php b/app/code/Magento/Tax/Model/TaxRuleRepository.php
index b63a1aef1dd073597093dc0bf268be66ab0b9167..312fca035f0e4a97591081b83d14e367aa572ae8 100644
--- a/app/code/Magento/Tax/Model/TaxRuleRepository.php
+++ b/app/code/Magento/Tax/Model/TaxRuleRepository.php
@@ -7,7 +7,7 @@
 namespace Magento\Tax\Model;
 
 use Magento\Framework\Api\Search\FilterGroup;
-use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\Exception\CouldNotSaveException;
 use Magento\Framework\Exception\NoSuchEntityException;
@@ -56,6 +56,11 @@ class TaxRuleRepository implements TaxRuleRepositoryInterface
      */
     protected $joinProcessor;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param TaxRuleRegistry $taxRuleRegistry
      * @param TaxRuleSearchResultsInterfaceFactory $searchResultsFactory
@@ -63,6 +68,7 @@ class TaxRuleRepository implements TaxRuleRepositoryInterface
      * @param CollectionFactory $collectionFactory
      * @param ResourceRule $resource
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+     * @param CollectionProcessorInterface | null $collectionProcessor
      */
     public function __construct(
         TaxRuleRegistry $taxRuleRegistry,
@@ -70,7 +76,8 @@ class TaxRuleRepository implements TaxRuleRepositoryInterface
         RuleFactory $ruleFactory,
         CollectionFactory $collectionFactory,
         ResourceRule $resource,
-        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
+        \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->taxRuleRegistry = $taxRuleRegistry;
         $this->taxRuleSearchResultsFactory = $searchResultsFactory;
@@ -78,6 +85,7 @@ class TaxRuleRepository implements TaxRuleRepositoryInterface
         $this->collectionFactory = $collectionFactory;
         $this->resource = $resource;
         $this->joinProcessor = $joinProcessor;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -137,37 +145,11 @@ class TaxRuleRepository implements TaxRuleRepositoryInterface
     {
         $searchResults = $this->taxRuleSearchResultsFactory->create();
         $searchResults->setSearchCriteria($searchCriteria);
-
-        $fields = [];
         $collection = $this->collectionFactory->create();
         $this->joinProcessor->process($collection);
 
-        //Add filters from root filter group to the collection
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-            foreach ($group->getFilters() as $filter) {
-                $fields[] = $this->translateField($filter->getField());
-            }
-        }
-        if ($fields) {
-            if (in_array('cd.customer_tax_class_id', $fields) || in_array('cd.product_tax_class_id', $fields)) {
-                $collection->joinCalculationData('cd');
-            }
-        }
-
+        $this->collectionProcessor->process($searchCriteria, $collection);
         $searchResults->setTotalCount($collection->getSize());
-        $sortOrders = $searchCriteria->getSortOrders();
-        /** @var SortOrder $sortOrder */
-        if ($sortOrders) {
-            foreach ($sortOrders as $sortOrder) {
-                $collection->addOrder(
-                    $this->translateField($sortOrder->getField()),
-                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-                );
-            }
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
 
         $searchResults->setItems($collection->getItems());
         return $searchResults;
@@ -179,6 +161,7 @@ class TaxRuleRepository implements TaxRuleRepositoryInterface
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
+     * @deprecated
      * @throws \Magento\Framework\Exception\InputException
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection)
@@ -213,6 +196,7 @@ class TaxRuleRepository implements TaxRuleRepositoryInterface
      * Translates a field name to a DB column name for use in collection queries.
      *
      * @param string $field a field name that should be translated to a DB column name.
+     * @deprecated
      * @return string
      */
     protected function translateField($field)
@@ -232,4 +216,20 @@ class TaxRuleRepository implements TaxRuleRepositoryInterface
                 return $field;
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                'Magento\Tax\Model\Api\SearchCriteria\TaxRuleCollectionProcessor'
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php b/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php
index 6bf64c3300937045c7bde0a6f455f2d4667f4b10..a95ead9efe30405a51558dc8f7ade3ef23306ae4 100644
--- a/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php
+++ b/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php
@@ -111,9 +111,9 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
      * @param bool $cache
      * @param bool $taxEnabled
      * @param bool $loggedIn
-     * @dataProvider dataProviderAroundDispatch
+     * @dataProvider beforeDispatchDataProvider
      */
-    public function testAroundDispatch($cache, $taxEnabled, $loggedIn)
+    public function testBeforeDispatch($cache, $taxEnabled, $loggedIn)
     {
         $this->customerSessionMock->expects($this->any())
             ->method('isLoggedIn')
@@ -160,18 +160,14 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
 
             $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class);
             $request = $this->getMock(\Magento\Framework\App\Request\Http::class, ['getActionName'], [], '', false);
-            $expectedResult = 'expectedResult';
-            $proceed = function ($request) use ($expectedResult) {
-                return $expectedResult;
-            };
-            $this->contextPlugin->aroundDispatch($action, $proceed, $request);
+            $this->contextPlugin->beforeDispatch($action, $request);
         }
     }
 
     /**
      * @return array
      */
-    public function dataProviderAroundDispatch()
+    public function beforeDispatchDataProvider()
     {
         return [
             [false, false, false],
diff --git a/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php
index 949b5e187546e0b87de48a9f0ac11f68b631b5e5..4a5a60a52e5034ef5b088704e34b0843bd8b4a76 100644
--- a/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php
+++ b/app/code/Magento/Tax/Test/Unit/Model/Calculation/RateRepositoryTest.php
@@ -13,6 +13,8 @@ use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\Exception\AlreadyExistsException;
 
 /**
+ * Class RateRepositoryTest
+ * @package Magento\Tax\Test\Unit\Model\Calculation
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class RateRepositoryTest extends \PHPUnit_Framework_TestCase
@@ -67,6 +69,11 @@ class RateRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     private $joinProcessorMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     protected function setUp()
     {
         $this->rateConverterMock = $this->getMock(
@@ -132,6 +139,13 @@ class RateRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->model = new RateRepository(
             $this->rateConverterMock,
             $this->rateRegistryMock,
@@ -140,7 +154,8 @@ class RateRepositoryTest extends \PHPUnit_Framework_TestCase
             $this->countryFactoryMock,
             $this->regionFactoryMock,
             $this->rateResourceMock,
-            $this->joinProcessorMock
+            $this->joinProcessorMock,
+            $this->collectionProcessor
         );
     }
 
@@ -243,12 +258,7 @@ class RateRepositoryTest extends \PHPUnit_Framework_TestCase
     public function testGetList()
     {
         $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class);
-        $searchCriteriaMock->expects($this->any())->method('getFilterGroups')->will($this->returnValue([]));
-        $searchCriteriaMock->expects($this->any())->method('getSortOrders')->will($this->returnValue([]));
-        $currentPage = 1;
-        $pageSize = 100;
-        $searchCriteriaMock->expects($this->any())->method('getCurrentPage')->will($this->returnValue($currentPage));
-        $searchCriteriaMock->expects($this->any())->method('getPageSize')->will($this->returnValue($pageSize));
+        $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class);
         $rateMock = $this->getTaxRateMock([]);
 
         $objectManager = new ObjectManager($this);
@@ -258,8 +268,6 @@ class RateRepositoryTest extends \PHPUnit_Framework_TestCase
             $items
         );
         $collectionMock->expects($this->once())->method('joinRegionTable');
-        $collectionMock->expects($this->once())->method('setCurPage')->with($currentPage);
-        $collectionMock->expects($this->once())->method('setPageSize')->with($pageSize);
         $collectionMock->expects($this->once())->method('getSize')->will($this->returnValue(count($items)));
 
         $this->rateFactoryMock->expects($this->once())->method('create')->will($this->returnValue($rateMock));
@@ -270,6 +278,9 @@ class RateRepositoryTest extends \PHPUnit_Framework_TestCase
             ->willReturnSelf();
         $this->searchResultMock->expects($this->once())->method('setSearchCriteria')->with($searchCriteriaMock)
             ->willReturnSelf();
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
         $this->searchResultFactory->expects($this->once())->method('create')->willReturn($this->searchResultMock);
 
         $this->joinProcessorMock->expects($this->once())->method('process')->with($collectionMock);
@@ -365,16 +376,6 @@ class RateRepositoryTest extends \PHPUnit_Framework_TestCase
     public function testGetListWhenFilterGroupExists()
     {
         $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class);
-        $filterGroupMock = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $searchCriteriaMock
-            ->expects($this->any())
-            ->method('getFilterGroups')
-            ->will($this->returnValue([$filterGroupMock]));
-        $filterMock = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
-        $filterGroupMock->expects($this->once())->method('getFilters')->willReturn([$filterMock]);
-        $filterMock->expects($this->exactly(2))->method('getConditionType')->willReturn('like');
-        $filterMock->expects($this->once())->method('getField')->willReturn('region_name');
-        $filterMock->expects($this->once())->method('getValue')->willReturn('condition_value');
         $objectManager = new ObjectManager($this);
         $rateMock = $this->getTaxRateMock([]);
         $items = [$rateMock];
@@ -382,27 +383,11 @@ class RateRepositoryTest extends \PHPUnit_Framework_TestCase
             \Magento\Tax\Model\ResourceModel\Calculation\Rate\Collection::class,
             $items
         );
-        $collectionMock
-            ->expects($this->once())
-            ->method('addFieldToFilter')
-            ->with(['region_table.code'], [['like' => 'condition_value']]);
-        $sortOrderMock = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
-        $searchCriteriaMock
-            ->expects($this->any())
-            ->method('getSortOrders')
-            ->will($this->returnValue([$sortOrderMock]));
-        $sortOrderMock->expects($this->once())->method('getField')->willReturn('field_name');
-        $sortOrderMock->expects($this->once())->method('getDirection')->willReturn(SortOrder::SORT_ASC);
-        $collectionMock->expects($this->once())->method('addOrder')->with('main_table.field_name', 'ASC');
-        $currentPage = 1;
-        $pageSize = 100;
-        $searchCriteriaMock->expects($this->any())->method('getCurrentPage')->will($this->returnValue($currentPage));
-        $searchCriteriaMock->expects($this->any())->method('getPageSize')->will($this->returnValue($pageSize));
         $rateMock = $this->getTaxRateMock([]);
-
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
         $collectionMock->expects($this->once())->method('joinRegionTable');
-        $collectionMock->expects($this->once())->method('setCurPage')->with($currentPage);
-        $collectionMock->expects($this->once())->method('setPageSize')->with($pageSize);
         $collectionMock->expects($this->once())->method('getSize')->will($this->returnValue(count($items)));
 
         $this->rateFactoryMock->expects($this->once())->method('create')->will($this->returnValue($rateMock));
diff --git a/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php
index 52af1315ba76685ac64662f425bcfb9f6b11837e..693b0d437afc45853b5ab224d04c535f1af1ca92 100644
--- a/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php
+++ b/app/code/Magento/Tax/Test/Unit/Model/Quote/GrandTotalDetailsPluginTest.php
@@ -38,11 +38,6 @@ class GrandTotalDetailsPluginTest extends \PHPUnit_Framework_TestCase
      */
     protected $subjectMock;
 
-    /**
-     * @var \Closure|\PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $closureMock;
-
     /**
      * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager
      */
@@ -153,7 +148,7 @@ class GrandTotalDetailsPluginTest extends \PHPUnit_Framework_TestCase
         return $taxDetailsMock;
     }
 
-    public function testAroundProcess()
+    public function testAfterProcess()
     {
         $taxRate = [
             'percent' => 8.25,
@@ -211,11 +206,7 @@ class GrandTotalDetailsPluginTest extends \PHPUnit_Framework_TestCase
             'tax' => $taxSegmentMock,
         ];
 
-        $this->closureMock = function () use ($totalSegments) {
-            return $totalSegments;
-        };
-
-        $result = $this->model->aroundProcess($this->subjectMock, $this->closureMock, $addressTotals);
+        $result = $this->model->afterProcess($this->subjectMock, $totalSegments, $addressTotals);
         $this->assertEquals($totalSegments, $result);
     }
 }
diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/RepositoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/RepositoryTest.php
index 4a41d04fe7ac3d38a9f517a304b41ff2bfba7283..11a4fd40b5662d68958bf2a82311f82d0768e2f7 100644
--- a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/RepositoryTest.php
+++ b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/RepositoryTest.php
@@ -55,6 +55,12 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $extensionAttributesJoinProcessorMock;
 
+    /**
+     * @var \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface |
+     *  \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * @return void
      */
@@ -107,7 +113,13 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->model = $this->objectManager->getObject(
             \Magento\Tax\Model\TaxClass\Repository::class,
             [
@@ -115,7 +127,8 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
                 'taxClassResource' => $this->taxClassResourceMock,
                 'searchResultsFactory' => $this->searchResultFactory,
                 'taxClassCollectionFactory' => $this->taxClassCollectionFactory,
-                'joinProcessor' => $this->extensionAttributesJoinProcessorMock
+                'joinProcessor' => $this->extensionAttributesJoinProcessorMock,
+                'collectionProcessor' => $this->collectionProcessor
             ]
         );
     }
@@ -206,34 +219,18 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
         $taxClassOne = $this->getMock(\Magento\Tax\Api\Data\TaxClassInterface::class);
         $taxClassTwo = $this->getMock(\Magento\Tax\Api\Data\TaxClassInterface::class);
         $searchCriteria = $this->getMock(\Magento\Framework\Api\SearchCriteriaInterface::class);
-        $filterGroup = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filter = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
         $collection = $this->getMock(\Magento\Tax\Model\ResourceModel\TaxClass\Collection::class, [], [], '', false);
-        $sortOrder = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
 
         $this->extensionAttributesJoinProcessorMock->expects($this->once())
             ->method('process')
             ->with($collection);
-
-        $searchCriteria->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroup]);
-        $filterGroup->expects($this->once())->method('getFilters')->willReturn([$filter]);
-        $filter->expects($this->atLeastOnce())->method('getConditionType')->willReturn('eq');
-        $filter->expects($this->once())->method('getField')->willReturn('field');
-        $filter->expects($this->once())->method('getValue')->willReturn('value');
-        $collection->expects($this->once())->method('addFieldToFilter')->with(['field'], [['eq' => 'value']]);
-
-        $searchCriteria->expects($this->exactly(2))->method('getSortOrders')->willReturn([$sortOrder]);
-        $sortOrder->expects($this->once())->method('getField')->willReturn('field');
-        $sortOrder->expects($this->once())->method('getDirection')->willReturn(SortOrder::SORT_ASC);
-        $collection->expects($this->once())->method('addOrder')->with('field', 'ASC');
-        $searchCriteria->expects($this->once())->method('getPageSize')->willReturn(20);
-        $searchCriteria->expects($this->once())->method('getCurrentPage')->willReturn(0);
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteria, $collection);
 
         $collection->expects($this->any())->method('getSize')->willReturn(2);
         $collection->expects($this->any())->method('setItems')->with([$taxClassOne, $taxClassTwo]);
         $collection->expects($this->any())->method('getItems')->willReturn([$taxClassOne, $taxClassTwo]);
-        $collection->expects($this->once())->method('setCurPage')->with(0);
-        $collection->expects($this->once())->method('setPageSize')->with(20);
 
         $this->searchResultMock->expects($this->once())->method('setSearchCriteria')->with($searchCriteria);
         $this->searchResultMock->expects($this->once())->method('setTotalCount')->with(2);
diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php
index 773b12a382cdb2a069f5e01257733fcf055c3bf8..a0f53d82923e324d2956ebd9a23a954a8ab50364 100644
--- a/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php
+++ b/app/code/Magento/Tax/Test/Unit/Model/TaxRuleRepositoryTest.php
@@ -9,6 +9,8 @@ use Magento\Framework\Api\SortOrder;
 use \Magento\Tax\Model\TaxRuleRepository;
 
 /**
+ * Class TaxRuleRepositoryTest
+ * @package Magento\Tax\Test\Unit\Model
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class TaxRuleRepositoryTest extends \PHPUnit_Framework_TestCase
@@ -58,9 +60,17 @@ class TaxRuleRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $objectManager;
 
+    /**
+     * @var \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface |
+     * \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     protected function setUp()
     {
         $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+        $this->taxRuleRegistry =
+            $this->getMock(\Magento\Tax\Model\Calculation\TaxRuleRegistry::class, [], [], '', false);
         $this->taxRuleRegistry = $this->getMock(
             \Magento\Tax\Model\Calculation\TaxRuleRegistry::class,
             [],
@@ -98,14 +108,21 @@ class TaxRuleRepositoryTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->model = new TaxRuleRepository(
             $this->taxRuleRegistry,
             $this->searchResultFactory,
             $this->ruleFactory,
             $this->collectionFactory,
             $this->resource,
-            $this->extensionAttributesJoinProcessorMock
+            $this->extensionAttributesJoinProcessorMock,
+            $this->collectionProcessor
         );
     }
 
@@ -189,44 +206,19 @@ class TaxRuleRepositoryTest extends \PHPUnit_Framework_TestCase
 
     public function testGetList()
     {
-        $collectionSize = 1;
-        $currentPage = 42;
-        $pageSize = 4;
-
         $searchCriteriaMock = $this->getMock(\Magento\Framework\Api\SearchCriteria::class, [], [], '', false);
         $collectionMock =
             $this->getMock(\Magento\Tax\Model\ResourceModel\Calculation\Rule\Collection::class, [], [], '', false);
-        $filterGroupMock = $this->getMock(\Magento\Framework\Api\Search\FilterGroup::class, [], [], '', false);
-        $filterMock = $this->getMock(\Magento\Framework\Api\Filter::class, [], [], '', false);
-        $sortOrderMock = $this->getMock(\Magento\Framework\Api\SortOrder::class, [], [], '', false);
+            $this->getMock(\Magento\Tax\Model\ResourceModel\Calculation\Rule\Collection::class, [], [], '', false);
 
         $this->extensionAttributesJoinProcessorMock->expects($this->once())
             ->method('process')
             ->with($collectionMock);
-
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
         $this->searchResultsMock->expects($this->once())->method('setSearchCriteria')->with($searchCriteriaMock);
         $this->collectionFactory->expects($this->once())->method('create')->willReturn($collectionMock);
-        $searchCriteriaMock->expects($this->once())->method('getFilterGroups')->willReturn([$filterGroupMock]);
-        $filterGroupMock->expects($this->exactly(2))->method('getFilters')->willReturn([$filterMock]);
-        $filterMock->expects($this->exactly(2))->method('getConditionType')->willReturn('eq');
-        $filterMock->expects($this->exactly(2))->method('getField')->willReturnOnConsecutiveCalls(
-            'rate.tax_calculation_rate_id',
-            'cd.customer_tax_class_id'
-        );
-        $filterMock->expects($this->once())->method('getValue')->willReturn('value');
-        $collectionMock->expects($this->exactly(2))->method('joinCalculationData')->withConsecutive(['rate'], ['cd']);
-        $collectionMock->expects($this->once())->method('addFieldToFilter')
-            ->with([0 => 'rate.tax_calculation_rate_id'], [0 => ['eq' => 'value']]);
-        $collectionMock->expects($this->once())->method('getSize')->willReturn($collectionSize);
-        $this->searchResultsMock->expects($this->once())->method('setTotalCount')->with($collectionSize);
-        $searchCriteriaMock->expects($this->once())->method('getSortOrders')->willReturn([$sortOrderMock]);
-        $sortOrderMock->expects($this->once())->method('getField')->willReturn('sort_order');
-        $sortOrderMock->expects($this->once())->method('getDirection')->willReturn(SortOrder::SORT_ASC);
-        $collectionMock->expects($this->once())->method('addOrder')->with('position', 'ASC');
-        $searchCriteriaMock->expects($this->once())->method('getCurrentPage')->willReturn($currentPage);
-        $collectionMock->expects($this->once())->method('setCurPage')->with($currentPage);
-        $searchCriteriaMock->expects($this->once())->method('getPageSize')->willReturn($pageSize);
-        $collectionMock->expects($this->once())->method('setPageSize')->with($pageSize);
         $collectionMock->expects($this->once())->method('getItems')->willReturn([]);
         $this->searchResultsMock->expects($this->once())->method('setItems')->with([]);
         $this->searchResultFactory->expects($this->once())->method('create')->willReturn($this->searchResultsMock);
diff --git a/app/code/Magento/Tax/etc/di.xml b/app/code/Magento/Tax/etc/di.xml
index 09f969423f71575f0f9537b2da494103217722fd..811272040314956c37204a9ce20c17191ee194ab 100644
--- a/app/code/Magento/Tax/etc/di.xml
+++ b/app/code/Magento/Tax/etc/di.xml
@@ -85,4 +85,87 @@
             <argument name="connectionName" xsi:type="string">sales</argument>
         </arguments>
     </type>
+    <type name="Magento\Tax\Model\TaxRuleRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\TaxRuleCollectionProcessor</argument>
+        </arguments>
+    </type>
+    <type name="Magento\Tax\Model\Calculation\RateRepository">
+        <arguments>
+            <argument name="collectionProcessor" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\TaxRateCollectionProcessor</argument>
+        </arguments>
+    </type>
+    <virtualType name="Magento\Tax\Model\Api\SearchCriteria\TaxRateCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="filters" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\CollectionProcessor\TaxRateFilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Tax\Model\Api\SearchCriteria\CollectionProcessor\TaxRateFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
+        <arguments>
+            <argument name="fieldMapping" xsi:type="array">
+                <item name="tax_calculation_rate_id" xsi:type="string">main_table.tax_calculation_rate_id</item>
+                <item name="tax_country_id" xsi:type="string">main_table.tax_country_id</item>
+                <item name="tax_region_id" xsi:type="string">main_table.tax_region_id</item>
+                <item name="code" xsi:type="string">main_table.code</item>
+                <item name="rate" xsi:type="string">main_table.rate</item>
+                <item name="zip_is_range" xsi:type="string">main_table.zip_is_range</item>
+                <item name="zip_from" xsi:type="string">main_table.zip_from</item>
+                <item name="zip_to" xsi:type="string">main_table.zip_to</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Tax\Model\Api\SearchCriteria\CollectionProcessor\TaxRuleJoinProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor">
+        <arguments>
+            <argument name="customJoins" xsi:type="array">
+                <item name="rate.tax_calculation_rate_id" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\JoinProcessor\Rate</item>
+                <item name="ctc.customer_tax_class_id" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\JoinProcessor\CustomerTaxClass</item>
+                <item name="ptc.product_tax_class_id" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\JoinProcessor\ProductTaxClass</item>
+                <item name="cd.customer_tax_class_id" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\JoinProcessor\CalculationData</item>
+                <item name="cd.product_tax_class_id" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\JoinProcessor\CalculationData</item>
+            </argument>
+            <argument name="fieldMapping" xsi:type="array">
+                <item name="id" xsi:type="string">tax_calculation_rule_id</item>
+                <item name="tax_rate_ids" xsi:type="string">tax_calculation_rate_id</item>
+                <item name="customer_tax_class_ids" xsi:type="string">cd.customer_tax_class_id</item>
+                <item name="product_tax_class_ids" xsi:type="string">cd.product_tax_class_id</item>
+                <item name="tax_calculation_rate_id" xsi:type="string">rate.tax_calculation_rate_id</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Tax\Model\Api\SearchCriteria\CollectionProcessor\TaxRuleSortingProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor">
+        <arguments>
+            <argument name="fieldMapping" xsi:type="array">
+                <item name="id" xsi:type="string">tax_calculation_rule_id</item>
+                <item name="tax_rate_ids" xsi:type="string">tax_calculation_rate_id</item>
+                <item name="customer_tax_class_ids" xsi:type="string">cd.customer_tax_class_id</item>
+                <item name="product_tax_class_ids" xsi:type="string">cd.product_tax_class_id</item>
+                <item name="tax_calculation_rate_id" xsi:type="string">rate.tax_calculation_rate_id</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Tax\Model\Api\SearchCriteria\CollectionProcessor\TaxRuleFilterProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor">
+        <arguments>
+            <argument name="fieldMapping" xsi:type="array">
+                <item name="id" xsi:type="string">tax_calculation_rule_id</item>
+                <item name="tax_rate_ids" xsi:type="string">tax_calculation_rate_id</item>
+                <item name="customer_tax_class_ids" xsi:type="string">cd.customer_tax_class_id</item>
+                <item name="product_tax_class_ids" xsi:type="string">cd.product_tax_class_id</item>
+                <item name="tax_calculation_rate_id" xsi:type="string">rate.tax_calculation_rate_id</item>
+            </argument>
+        </arguments>
+    </virtualType>
+    <virtualType name="Magento\Tax\Model\Api\SearchCriteria\TaxRuleCollectionProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="joins" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\CollectionProcessor\TaxRuleJoinProcessor</item>
+                <item name="filters" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\CollectionProcessor\TaxRuleFilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Tax\Model\Api\SearchCriteria\CollectionProcessor\TaxRuleSortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </virtualType>
 </config>
diff --git a/app/code/Magento/Theme/Model/Url/Plugin/Signature.php b/app/code/Magento/Theme/Model/Url/Plugin/Signature.php
index 2a4d878e80d7a1fec2a8daaf970298575b8a633a..8934c598feb79a438b442a39612f81673b3d8f4b 100644
--- a/app/code/Magento/Theme/Model/Url/Plugin/Signature.php
+++ b/app/code/Magento/Theme/Model/Url/Plugin/Signature.php
@@ -47,7 +47,7 @@ class Signature
      * Append signature to rendered base URL for static view files
      *
      * @param \Magento\Framework\Url\ScopeInterface $subject
-     * @param callable $proceed
+     * @param string $baseUrl
      * @param string $type
      * @param null $secure
      * @return string
@@ -55,13 +55,12 @@ class Signature
      *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundGetBaseUrl(
+    public function afterGetBaseUrl(
         \Magento\Framework\Url\ScopeInterface $subject,
-        \Closure $proceed,
+        $baseUrl,
         $type = \Magento\Framework\UrlInterface::URL_TYPE_LINK,
         $secure = null
     ) {
-        $baseUrl = $proceed($type, $secure);
         if ($type == \Magento\Framework\UrlInterface::URL_TYPE_STATIC && $this->isUrlSignatureEnabled()) {
             $baseUrl .= $this->renderUrlSignature() . '/';
         }
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Url/Plugin/SignatureTest.php b/app/code/Magento/Theme/Test/Unit/Model/Url/Plugin/SignatureTest.php
index 46097a13db12f48c6670649568e44e1cd6d67ee6..58cf9bcc31e5b8bb4a02cf9d5c93e5ca6f645bce 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Url/Plugin/SignatureTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Url/Plugin/SignatureTest.php
@@ -3,9 +3,6 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
-// @codingStandardsIgnoreFile
-
 namespace Magento\Theme\Test\Unit\Model\Url\Plugin;
 
 use \Magento\Theme\Model\Url\Plugin\Signature;
@@ -27,29 +24,25 @@ class SignatureTest extends \PHPUnit_Framework_TestCase
      */
     private $deploymentVersion;
 
-    /**
-     * @var callable
-     */
-    private $closureMock;
-
     protected function setUp()
     {
         $this->config = $this->getMock(\Magento\Framework\View\Url\ConfigInterface::class);
-        $this->deploymentVersion = $this->getMock(
-            \Magento\Framework\App\View\Deployment\Version::class, [], [], '', false
+        $this->deploymentVersion = $this->getMock(
+            \Magento\Framework\App\View\Deployment\Version::class,
+            [],
+            [],
+            '',
+            false
         );
-        $this->closureMock = function () {
-            return 'http://127.0.0.1/magento/pub/static/';
-        };
         $this->object = new Signature($this->config, $this->deploymentVersion);
     }
 
     /**
      * @param bool|int $fixtureConfigFlag
      * @param string $inputUrlType
-     * @dataProvider aroundGetBaseUrlInactiveDataProvider
+     * @dataProvider afterGetBaseUrlInactiveDataProvider
      */
-    public function testAroundGetBaseUrlInactive($fixtureConfigFlag, $inputUrlType)
+    public function testAfterGetBaseUrlInactive($fixtureConfigFlag, $inputUrlType)
     {
         $this->config
             ->expects($this->any())
@@ -59,11 +52,14 @@ class SignatureTest extends \PHPUnit_Framework_TestCase
         $this->deploymentVersion->expects($this->never())->method($this->anything());
 
         $url = $this->getMockForAbstractClass(\Magento\Framework\Url\ScopeInterface::class);
-        $actualResult = $this->object->aroundGetBaseUrl($url, $this->closureMock, $inputUrlType);
+        $actualResult = $this->object->afterGetBaseUrl($url, 'http://127.0.0.1/magento/pub/static/', $inputUrlType);
         $this->assertEquals('http://127.0.0.1/magento/pub/static/', $actualResult);
     }
 
-    public function aroundGetBaseUrlInactiveDataProvider()
+    /**
+     * @return array
+     */
+    public function afterGetBaseUrlInactiveDataProvider()
     {
         return [
             'disabled in config, relevant URL type'  => [0, \Magento\Framework\UrlInterface::URL_TYPE_STATIC],
@@ -81,8 +77,10 @@ class SignatureTest extends \PHPUnit_Framework_TestCase
         $this->deploymentVersion->expects($this->once())->method('getValue')->will($this->returnValue('123'));
 
         $url = $this->getMockForAbstractClass(\Magento\Framework\Url\ScopeInterface::class);
-        $actualResult = $this->object->aroundGetBaseUrl(
-            $url, $this->closureMock, \Magento\Framework\UrlInterface::URL_TYPE_STATIC
+        $actualResult = $this->object->afterGetBaseUrl(
+            $url,
+            'http://127.0.0.1/magento/pub/static/',
+            \Magento\Framework\UrlInterface::URL_TYPE_STATIC
         );
         $this->assertEquals('http://127.0.0.1/magento/pub/static/version123/', $actualResult);
     }
diff --git a/app/code/Magento/Ui/Model/BookmarkManagement.php b/app/code/Magento/Ui/Model/BookmarkManagement.php
index bcfc137d9305720e5e27a045f73dc7b6201e7e10..83f1155d2cb25223aed081ce3cec872c6ab9f478 100644
--- a/app/code/Magento/Ui/Model/BookmarkManagement.php
+++ b/app/code/Magento/Ui/Model/BookmarkManagement.php
@@ -51,20 +51,19 @@ class BookmarkManagement implements \Magento\Ui\Api\BookmarkManagementInterface
      */
     public function loadByNamespace($namespace)
     {
-        $this->searchCriteriaBuilder->addFilters(
-            [
-                $this->filterBuilder
-                    ->setField('user_id')
-                    ->setConditionType('eq')
-                    ->setValue($this->userContext->getUserId())
-                    ->create(),
-                $this->filterBuilder
-                    ->setField('namespace')
-                    ->setConditionType('eq')
-                    ->setValue($namespace)
-                    ->create(),
-            ]
-        );
+        $userIdFilter = $this->filterBuilder
+            ->setField('user_id')
+            ->setConditionType('eq')
+            ->setValue($this->userContext->getUserId())
+            ->create();
+        $namespaceFilter = $this->filterBuilder
+            ->setField('namespace')
+            ->setConditionType('eq')
+            ->setValue($namespace)
+            ->create();
+
+        $this->searchCriteriaBuilder->addFilters([$userIdFilter]);
+        $this->searchCriteriaBuilder->addFilters([$namespaceFilter]);
 
         $searchCriteria = $this->searchCriteriaBuilder->create();
         $searchResults = $this->bookmarkRepository->getList($searchCriteria);
@@ -77,25 +76,25 @@ class BookmarkManagement implements \Magento\Ui\Api\BookmarkManagementInterface
      */
     public function getByIdentifierNamespace($identifier, $namespace)
     {
-        $this->searchCriteriaBuilder->addFilters(
-            [
-                $this->filterBuilder
-                    ->setField('user_id')
-                    ->setConditionType('eq')
-                    ->setValue($this->userContext->getUserId())
-                    ->create(),
-                $this->filterBuilder
-                    ->setField('identifier')
-                    ->setConditionType('eq')
-                    ->setValue($identifier)
-                    ->create(),
-                $this->filterBuilder
-                    ->setField('namespace')
-                    ->setConditionType('eq')
-                    ->setValue($namespace)
-                    ->create(),
-            ]
-        );
+        $userIdFilter = $this->filterBuilder
+            ->setField('user_id')
+            ->setConditionType('eq')
+            ->setValue($this->userContext->getUserId())
+            ->create();
+        $identifierFilter = $this->filterBuilder
+            ->setField('identifier')
+            ->setConditionType('eq')
+            ->setValue($identifier)
+            ->create();
+        $namespaceFilter = $this->filterBuilder
+            ->setField('namespace')
+            ->setConditionType('eq')
+            ->setValue($namespace)
+            ->create();
+
+        $this->searchCriteriaBuilder->addFilters([$userIdFilter]);
+        $this->searchCriteriaBuilder->addFilters([$identifierFilter]);
+        $this->searchCriteriaBuilder->addFilters([$namespaceFilter]);
 
         $searchCriteria = $this->searchCriteriaBuilder->create();
         $searchResults = $this->bookmarkRepository->getList($searchCriteria);
diff --git a/app/code/Magento/Ui/Model/ResourceModel/BookmarkRepository.php b/app/code/Magento/Ui/Model/ResourceModel/BookmarkRepository.php
index 150983825f6e0dd861569079bede1ec7a4aa61fa..76c2e3cab000ed6e82551c9de6ecaffd6fe89d94 100644
--- a/app/code/Magento/Ui/Model/ResourceModel/BookmarkRepository.php
+++ b/app/code/Magento/Ui/Model/ResourceModel/BookmarkRepository.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Ui\Model\ResourceModel;
 
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Api\SearchCriteriaInterface;
 use Magento\Framework\Api\SortOrder;
 use Magento\Ui\Api\BookmarkRepositoryInterface;
@@ -37,20 +38,28 @@ class BookmarkRepository implements BookmarkRepositoryInterface
      */
     protected $searchResultsFactory;
 
+    /**
+     * @var CollectionProcessorInterface
+     */
+    private $collectionProcessor;
+
     /**
      * @param \Magento\Ui\Api\Data\BookmarkInterfaceFactory $bookmarkFactory
      * @param Bookmark $bookmarkResourceModel
      * @param \Magento\Ui\Api\Data\BookmarkSearchResultsInterfaceFactory $searchResultsFactory
+     * @param CollectionProcessorInterface | null $collectionProcessor
      */
     public function __construct(
         \Magento\Ui\Api\Data\BookmarkInterfaceFactory $bookmarkFactory,
         \Magento\Ui\Model\ResourceModel\Bookmark $bookmarkResourceModel,
-        \Magento\Ui\Api\Data\BookmarkSearchResultsInterfaceFactory $searchResultsFactory
+        \Magento\Ui\Api\Data\BookmarkSearchResultsInterfaceFactory $searchResultsFactory,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
 
         $this->bookmarkResourceModel = $bookmarkResourceModel;
         $this->bookmarkFactory = $bookmarkFactory;
         $this->searchResultsFactory = $searchResultsFactory;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -101,24 +110,8 @@ class BookmarkRepository implements BookmarkRepositoryInterface
 
         /** @var \Magento\Ui\Model\ResourceModel\Bookmark\Collection $collection */
         $collection = $this->bookmarkFactory->create()->getCollection();
-        // Add filters from root filter group to the collection
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
+        $this->collectionProcessor->process($searchCriteria, $collection);
         $searchResults->setTotalCount($collection->getSize());
-        $sortOrders = $searchCriteria->getSortOrders();
-        if ($sortOrders) {
-            /** @var SortOrder $sortOrder */
-            foreach ($sortOrders as $sortOrder) {
-                $field = $sortOrder->getField();
-                $collection->addOrder(
-                    $field,
-                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
-                );
-            }
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
 
         $bookmarks = [];
         /** @var BookmarkInterface $bookmark */
@@ -166,6 +159,7 @@ class BookmarkRepository implements BookmarkRepositoryInterface
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
+     * @deprecated
      * @throws \Magento\Framework\Exception\InputException
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection)
@@ -175,4 +169,20 @@ class BookmarkRepository implements BookmarkRepositoryInterface
             $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Ui/Test/Unit/Model/BookmarkManagementTest.php b/app/code/Magento/Ui/Test/Unit/Model/BookmarkManagementTest.php
index 4f2eb225ba0deae73c7933a7889a7be5e5766a9a..10a665a0be397f74bc5aa4ef398c789793d84437 100644
--- a/app/code/Magento/Ui/Test/Unit/Model/BookmarkManagementTest.php
+++ b/app/code/Magento/Ui/Test/Unit/Model/BookmarkManagementTest.php
@@ -89,9 +89,9 @@ class BookmarkManagementTest extends \PHPUnit_Framework_TestCase
         $this->filterBuilder->expects($this->at(1))
             ->method('create')
             ->willReturn($fieldNamespace);
-        $this->searchCriteriaBuilder->expects($this->once())
+        $this->searchCriteriaBuilder->expects($this->exactly(2))
             ->method('addFilters')
-            ->with([$fieldUserId, $fieldNamespace]);
+            ->withConsecutive([[$fieldUserId]], [[$fieldNamespace]]);
         $this->searchCriteriaBuilder->expects($this->once())
             ->method('create')
             ->willReturn($searchCriteria);
@@ -147,9 +147,9 @@ class BookmarkManagementTest extends \PHPUnit_Framework_TestCase
         $this->filterBuilder->expects($this->at(2))
             ->method('create')
             ->willReturn($fieldNamespace);
-        $this->searchCriteriaBuilder->expects($this->once())
+        $this->searchCriteriaBuilder->expects($this->exactly(3))
             ->method('addFilters')
-            ->with([$fieldUserId, $fieldIdentifier, $fieldNamespace]);
+            ->withConsecutive([[$fieldUserId]], [[$fieldIdentifier]], [[$fieldNamespace]]);
         $this->searchCriteriaBuilder->expects($this->once())
             ->method('create')
             ->willReturn($searchCriteria);
diff --git a/app/code/Magento/Ui/Test/Unit/Model/ResourceModel/BookmarkRepositoryTest.php b/app/code/Magento/Ui/Test/Unit/Model/ResourceModel/BookmarkRepositoryTest.php
index 8a3d43354e8767cadd34ba7ae1bd482f3e03fd33..9feb02072c1582f51fbee626a481a201151ebae2 100644
--- a/app/code/Magento/Ui/Test/Unit/Model/ResourceModel/BookmarkRepositoryTest.php
+++ b/app/code/Magento/Ui/Test/Unit/Model/ResourceModel/BookmarkRepositoryTest.php
@@ -36,6 +36,11 @@ class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $searchResultsMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * Set up
      */
@@ -64,11 +69,18 @@ class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
             \Magento\Ui\Api\Data\BookmarkSearchResultsInterfaceFactory::class
         )->disableOriginalConstructor()->setMethods(['create'])->getMock();
         $searchResultsFactoryMock->expects($this->any())->method('create')->willReturn($this->searchResultsMock);
-
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->bookmarkRepository = new BookmarkRepository(
             $bookmarkFactoryMock,
             $this->bookmarkResourceMock,
-            $searchResultsFactoryMock
+            $searchResultsFactoryMock,
+            $this->collectionProcessor
         );
     }
 
@@ -143,10 +155,7 @@ class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
     public function testGetList()
     {
         $bookmarkId = 1;
-        $fieldNameAsc = 'first_field';
-        $fieldValueAsc = 'first_value';
-        $fieldNameDesc = 'second_field';
-        $fieldValueDesc = 'second_value';
+
         $this->bookmarkMock->expects($this->any())
             ->method('getId')
             ->willReturn($bookmarkId);
@@ -154,77 +163,17 @@ class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
             ->method('load')
             ->with($this->bookmarkMock, $bookmarkId)
             ->willReturn($this->bookmarkMock);
-        $filterGroup = $this->getMockBuilder(\Magento\Framework\Api\Search\FilterGroup::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $sortOrderAsc = $this->getMockBuilder(\Magento\Framework\Api\SortOrder::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $sortOrderAsc->expects($this->once())
-            ->method('getField')
-            ->willReturn($fieldNameAsc);
-        $sortOrderAsc->expects($this->once())
-            ->method('getDirection')
-            ->willReturn(SortOrder::SORT_ASC);
-        $sortOrderDesc = $this->getMockBuilder(\Magento\Framework\Api\SortOrder::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $sortOrderDesc->expects($this->once())
-            ->method('getField')
-            ->willReturn($fieldNameDesc);
-        $sortOrderDesc->expects($this->once())
-            ->method('getDirection')
-            ->willReturn(SortOrder::SORT_DESC);
-        $fieldAsc = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $fieldAsc->expects($this->once())
-            ->method('getField')
-            ->willReturn($fieldNameAsc);
-        $fieldAsc->expects($this->once())
-            ->method('getValue')
-            ->willReturn($fieldValueAsc);
-        $fieldAsc->expects($this->any())
-            ->method('getConditionType')
-            ->willReturn(false);
-        $fieldDesc = $this->getMockBuilder(\Magento\Framework\Api\Filter::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $fieldDesc->expects($this->once())
-            ->method('getField')
-            ->willReturn($fieldNameDesc);
-        $fieldDesc->expects($this->once())
-            ->method('getValue')
-            ->willReturn($fieldValueDesc);
-        $fieldDesc->expects($this->any())
-            ->method('getConditionType')
-            ->willReturn('eq');
-        $filterGroup->expects($this->once())
-            ->method('getFilters')
-            ->willReturn([$fieldAsc, $fieldDesc]);
         $collection = $this->getMockBuilder(\Magento\Ui\Model\ResourceModel\Bookmark\Collection::class)
             ->disableOriginalConstructor()
             ->getMock();
         $collection->expects($this->once())
             ->method('getItems')
             ->willReturn([$this->bookmarkMock]);
-        $collection->expects($this->any())
-            ->method('addOrder')
-            ->willReturnMap([[$fieldNameAsc, SortOrder::SORT_ASC], [$fieldNameDesc, SortOrder::SORT_DESC]]);
-        $collection->expects($this->any())
-            ->method('addFieldToFilter')
-            ->willReturnMap([[$fieldNameAsc, [$fieldValueAsc => 'eq']], [$fieldNameDesc, [$fieldValueDesc => 'eq']]]);
         $this->bookmarkMock->expects($this->once())
             ->method('getCollection')
             ->willReturn($collection);
         $searchCriteria = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaInterface::class)
             ->getMockForAbstractClass();
-        $searchCriteria->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn([$filterGroup]);
-        $searchCriteria->expects($this->once())
-            ->method('getSortOrders')
-            ->willReturn([$sortOrderAsc, $sortOrderDesc]);
         $this->assertEquals($this->searchResultsMock, $this->bookmarkRepository->getList($searchCriteria));
     }
 
diff --git a/app/code/Magento/Ui/view/base/web/js/form/element/select.js b/app/code/Magento/Ui/view/base/web/js/form/element/select.js
index ebcbd96789588b30abd833bf3a9684181c9a83a9..1887639c8d0313fe466aadb89b3cdaf7adc6bd81 100644
--- a/app/code/Magento/Ui/view/base/web/js/form/element/select.js
+++ b/app/code/Magento/Ui/view/base/web/js/form/element/select.js
@@ -44,9 +44,9 @@ define([
                 if (_.isUndefined(caption)) {
                     caption = node.label;
                 }
-            } else {
-                return node;
             }
+
+            return node;
         });
 
         return {
@@ -194,7 +194,7 @@ define([
         },
 
         /**
-         * Matches specfied value with existing options
+         * Matches specified value with existing options
          * or, if value is not specified, returns value of the first option.
          *
          * @returns {*}
@@ -286,6 +286,11 @@ define([
             return preview;
         },
 
+        /**
+         *
+         * @param {Number} value
+         * @returns {Object} Chainable
+         */
         getOption: function (value) {
             return this.indexedOptions[value];
         },
@@ -301,6 +306,19 @@ define([
             this.value(value);
 
             return this;
+        },
+
+        /**
+         * Initializes observable properties of instance
+         *
+         * @returns {Object} Chainable.
+         */
+        setInitialValue: function () {
+            if (_.isUndefined(this.value()) && !this.default) {
+                this.clear();
+            }
+
+            return this._super();
         }
     });
 });
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js b/app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js
index 0ce86c5fad84fa63aaabf2023fe8b87e462e39ab..24e502549ac0b61871a7a75828ab417b4f98202d 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js
@@ -31,7 +31,11 @@ define([
      * @returns {Object}
      */
     function removeEmpty(data) {
-        return utils.mapRecursive(data, utils.removeEmptyValues.bind(utils));
+        var result = utils.mapRecursive(data, utils.removeEmptyValues.bind(utils));
+
+        return utils.mapRecursive(result, function (value) {
+            return _.isString(value) ? value.trim() : value;
+        });
     }
 
     return Collection.extend({
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/filters/range.js b/app/code/Magento/Ui/view/base/web/js/grid/filters/range.js
index b068af92aecf6c3b80c8069c516716be14371317..6af90fdf688a7a241dea3019e308570757f533b3 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/filters/range.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/filters/range.js
@@ -6,8 +6,9 @@ define([
     'underscore',
     'uiLayout',
     'mageUtils',
-    'Magento_Ui/js/form/components/group'
-], function (_, layout, utils, Group) {
+    'Magento_Ui/js/form/components/group',
+    'mage/translate'
+], function (_, layout, utils, Group, $t) {
     'use strict';
 
     return Group.extend({
@@ -29,11 +30,11 @@ define([
                 },
                 ranges: {
                     from: {
-                        label: 'from',
+                        label: $t('from'),
                         dataScope: 'from'
                     },
                     to: {
-                        label: 'to',
+                        label: $t('to'),
                         dataScope: 'to'
                     }
                 }
diff --git a/app/code/Magento/Ui/view/base/web/js/grid/search/search.js b/app/code/Magento/Ui/view/base/web/js/grid/search/search.js
index 5760866ec337675c5985800d1e3499548e5ff5e1..16b850e7641d65560039b0c09f8986f6d232699b 100644
--- a/app/code/Magento/Ui/view/base/web/js/grid/search/search.js
+++ b/app/code/Magento/Ui/view/base/web/js/grid/search/search.js
@@ -105,7 +105,7 @@ define([
         apply: function (value) {
             value = value || this.inputValue;
 
-            this.value = this.inputValue = value;
+            this.value = this.inputValue = value.trim();
 
             return this;
         },
diff --git a/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/tooltip.js b/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/tooltip.js
index 819058ff7a8ddac22d2fce028e408c963333e218..6040b1efa7a85707ddc36d66f031447d42bc95c5 100644
--- a/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/tooltip.js
+++ b/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/tooltip.js
@@ -599,6 +599,8 @@ define([
             }
 
             tooltip.setContent.apply(null, arguments);
+
+            return false;
         },
 
         /**
diff --git a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/action-delete.html b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/action-delete.html
index a8a77d593fe9858ac6d49c7ddbb80cc3bb50b6a7..854705a75d5ce0bff3e409bcf7768131a17e7095 100644
--- a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/action-delete.html
+++ b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/action-delete.html
@@ -12,5 +12,5 @@
                 title: $parent.deleteButtonLabel
             }
         ">
-    <span data-bind="text: $parent.deleteButtonLabel"></span>
+    <span translate="$parent.deleteButtonLabel"></span>
 </button>
\ No newline at end of file
diff --git a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/collapsible.html b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/collapsible.html
index 64f78bd64fc0e84d41d852ee5e535875d4323ca0..aa4e21c9c2ef9e5e8353976f1a93fc6ea12049a6 100644
--- a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/collapsible.html
+++ b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/collapsible.html
@@ -6,7 +6,7 @@
 -->
 <div class="admin__field" css="element.setClasses(element)">
     <label if="element.label" class="admin__field-label" attr="for: element.uid">
-        <span text="element.label"/>
+        <span translate="element.label"/>
     </label>
 
     <div class="admin__field-control" data-role="grid-wrapper">
@@ -22,7 +22,7 @@
 
             <thead if="element.columnsHeader">
             <tr data-bind="foreach: {data: labels, as: 'label'}">
-                <th text="label.config.label"
+                <th translate="label.config.label"
                     css="item.columnsHeaderClasses">
                 </th>
             </tr>
@@ -39,7 +39,7 @@
                                 <render args="name: $parents[1].dndConfig.template, data: $parents[1].dnd"
                                         if="$parents[1].dndConfig.enabled" />
 
-                                <span text="$parent.getLabel(elem)" />
+                                <span translate="$parent.getLabel(elem)" />
                             </div>
 
                             <button class="action-delete"
@@ -48,7 +48,7 @@
                                     click="function(){
                                             $parents[1].deleteRecord($parent.index, $parent.recordId)
                                         }">
-                                <span text="'Delete'"/>
+                                <span translate="'Delete'"/>
                             </button>
                         </div>
 
@@ -66,7 +66,7 @@
             <button attr="{disabled: disabled}"
                     type="button"
                     click="addChild.bind($data, false, false)">
-                <span text="addButtonLabel"/>
+                <span translate="addButtonLabel"/>
             </button>
         </div>
     </div>
diff --git a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/default.html b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/default.html
index 57b7fdaad17ef9e9a818cb7bf8e08a17d1b71c4c..6e1588d7296855ed29e107515b1a02c1802ccb76 100644
--- a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/default.html
+++ b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/default.html
@@ -6,7 +6,7 @@
 -->
 <div class="admin__field" visible="visible" disable="disabled" css="element.setClasses(element)">
     <label if="element.label" class="admin__field-label" attr="for: element.uid">
-        <span text="element.label"/>
+        <span translate="element.label"/>
     </label>
 
     <div class="admin__field-control" data-role="grid-wrapper" attr="'data-index': index">
@@ -24,7 +24,7 @@
                     <tr>
                         <th if="dndConfig.enabled"/>
                         <th repeat="foreach: labels, item: '$label'"
-                            text="$label().label"
+                            translate="$label().label"
                             css="setClasses($label())"
                             visible="$label().visible"
                             disable="$label().disabled"
@@ -56,7 +56,7 @@
                                     attr="{disabled: disabled, 'data-action': 'add_new_row'}"
                                     type="button"
                                     click="processingAddChild.bind($data, false, false, false)">
-                                <span text="addButtonLabel"/>
+                                <span translate="addButtonLabel"/>
                             </button>
 
                             <div class="admin__control-table-pagination" visible="!!$data.recordData().length && (pages() > 1)">
diff --git a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/grid.html b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/grid.html
index 13f1bed36d2975ce5a9f842f8cc57fa6cb6740b6..3a5b8ad4631c49ec8c3042a0d8f8af3443ce594a 100644
--- a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/grid.html
+++ b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/grid.html
@@ -11,7 +11,7 @@
      css="element.setClasses(element)"
      attr="'data-index': index">
     <label if="element.label" class="admin__field-label" attr="for: element.uid">
-        <span text="element.label"/>
+        <span translate="element.label"/>
     </label>
 
     <div class="admin__field-control" data-role="grid-wrapper">
@@ -40,7 +40,7 @@
 
                     <th repeat="foreach: labels, item: '$label'"
                         class="data-grid-th"
-                        text="$label().label"
+                        translate="$label().label"
                         visible="$label().visible"
                         disable="$label().disabled"
                         css="$label().columnsHeaderClasses">
@@ -73,7 +73,7 @@
             <button attr="{disabled: disabled}"
                     type="button"
                     click="addChild.bind($data, false, false)">
-                <span text="addButtonLabel"/>
+                <span translate="addButtonLabel"/>
             </button>
         </div>
         <render args="fallbackResetTpl" if="$data.showFallbackReset && $data.isDifferedFromDefault"/>
diff --git a/app/code/Magento/Ui/view/base/web/templates/form/element/uploader/uploader.html b/app/code/Magento/Ui/view/base/web/templates/form/element/uploader/uploader.html
index 7415b4e6c330e8e8b1c21a3299b0c01fc34b6fd4..63c34c1a433129ddf427ecd8104743083a81e98b 100644
--- a/app/code/Magento/Ui/view/base/web/templates/form/element/uploader/uploader.html
+++ b/app/code/Magento/Ui/view/base/web/templates/form/element/uploader/uploader.html
@@ -6,7 +6,7 @@
 -->
 <div class="admin__field" visible="visible" css="$data.additionalClasses">
     <label class="admin__field-label" if="$data.label" attr="for: uid">
-        <span text="label" attr="'data-config-scope': $data.scopeLabel"/>
+        <span translate="label" attr="'data-config-scope': $data.scopeLabel"/>
     </label>
 
     <div class="admin__field-control" css="'_with-tooltip': $data.tooltip">
diff --git a/app/code/Magento/Ui/view/base/web/templates/form/field.html b/app/code/Magento/Ui/view/base/web/templates/form/field.html
index 60f902a42d9968ba7dc9051372e43114e58c116f..adc9814a91d0ee3cbe5a1c955b532d385536fd8f 100644
--- a/app/code/Magento/Ui/view/base/web/templates/form/field.html
+++ b/app/code/Magento/Ui/view/base/web/templates/form/field.html
@@ -9,7 +9,7 @@
      css="$data.additionalClasses"
      attr="'data-index': index">
     <label class="admin__field-label" if="$data.label" visible="$data.labelVisible" attr="for: uid">
-        <span text="label" attr="'data-config-scope': $data.scopeLabel"/>
+        <span translate="label" attr="'data-config-scope': $data.scopeLabel"/>
     </label>
     <div class="admin__field-control"
          css="'_with-tooltip': $data.tooltip, '_with-reset': $data.showFallbackReset && $data.isDifferedFromDefault">
@@ -33,7 +33,7 @@
         <label class="admin__field-error" if="error" attr="for: uid" text="error"/>
 
         <div class="admin__field-note" if="$data.notice" attr="id: noticeId">
-            <span text="notice"/>
+            <span translate="notice"/>
         </div>
         
         <div class="admin__additional-info" if="$data.additionalInfo" html="$data.additionalInfo"></div>
diff --git a/app/code/Magento/Ui/view/base/web/templates/form/fieldset.html b/app/code/Magento/Ui/view/base/web/templates/form/fieldset.html
index 058d1ff5c85ddf60879a22d8e84ac239cc48518d..b45e5385d037ac9b4cecca6888a7318e6ec8e384 100644
--- a/app/code/Magento/Ui/view/base/web/templates/form/fieldset.html
+++ b/app/code/Magento/Ui/view/base/web/templates/form/fieldset.html
@@ -19,7 +19,7 @@
                       '_changed': changed,
                       '_loading': loading,
                       '_error': error">
-            <span text="label"/>
+            <span translate="label"/>
             <span class="admin__page-nav-item-messages" if="collapsible">
                 <span class="admin__page-nav-item-message _changed">
                     <span class="admin__page-nav-item-message-icon"></span>
diff --git a/app/code/Magento/Ui/view/base/web/templates/grid/columns/text.html b/app/code/Magento/Ui/view/base/web/templates/grid/columns/text.html
index ce9015051537169b6357374f9d8f7ad566b624fd..b045149dda5fcd3a7fb09e2fdf168492e8b6cc96 100644
--- a/app/code/Magento/Ui/view/base/web/templates/grid/columns/text.html
+++ b/app/code/Magento/Ui/view/base/web/templates/grid/columns/text.html
@@ -10,5 +10,5 @@
         _draggable: draggable,
         _ascend: sorting === 'asc',
         _descend: sorting === 'desc'">
-    <span class="data-grid-cell-content" text="label"/>
+    <span class="data-grid-cell-content" translate="label"/>
 </th>
diff --git a/app/code/Magento/Ui/view/base/web/templates/grid/controls/columns.html b/app/code/Magento/Ui/view/base/web/templates/grid/controls/columns.html
index 113806471bc9b60b46e64a976362b41a8c0bdc17..56a69b6bc3cc3339d059fce0803a0965946f9524 100644
--- a/app/code/Magento/Ui/view/base/web/templates/grid/controls/columns.html
+++ b/app/code/Magento/Ui/view/base/web/templates/grid/controls/columns.html
@@ -17,7 +17,7 @@
                     ko-checked="$col().visible"
                     attr="id: ++ko.uid"/>
                 <label class="admin__field-label"
-                       text="$col().label"
+                       translate="$col().label"
                        attr="for: ko.uid, title: $col().label"/>
             </div>
         </div>
diff --git a/app/code/Magento/Ui/view/base/web/templates/grid/filters/elements/group.html b/app/code/Magento/Ui/view/base/web/templates/grid/filters/elements/group.html
index d768bd8033cc129b1438e769ecf4f34aa3315e8a..7d89f3dbecf50c136933c18665ad4a44079e50c6 100644
--- a/app/code/Magento/Ui/view/base/web/templates/grid/filters/elements/group.html
+++ b/app/code/Magento/Ui/view/base/web/templates/grid/filters/elements/group.html
@@ -5,6 +5,6 @@
  */
 -->
 <legend class="admin__form-field-legend">
-    <span text="label"/>
+    <span translate="label"/>
 </legend>
 <div class="admin__form-field" outereach="elems" render=""/>
diff --git a/app/code/Magento/Ui/view/base/web/templates/grid/filters/elements/ui-select.html b/app/code/Magento/Ui/view/base/web/templates/grid/filters/elements/ui-select.html
index 326a9d7ee4a4cbea38c40766f5a7456d8fdd893e..a913d27c8aa5aeba6968ab6283dc4717e65e3a9d 100644
--- a/app/code/Magento/Ui/view/base/web/templates/grid/filters/elements/ui-select.html
+++ b/app/code/Magento/Ui/view/base/web/templates/grid/filters/elements/ui-select.html
@@ -10,7 +10,7 @@
         class="admin__form-field-label"
         data-bind="attr: {for: uid}
 ">
-    <span data-bind="text: label"></span>
+    <span translate="label"></span>
 </label>
 <!-- /ko -->
 <div
@@ -60,7 +60,7 @@
         <div class="admin__action-multiselect-text"
              data-bind="
                 visible: !hasData(),
-                text: selectedPlaceholders.defaultPlaceholder
+                i18n: selectedPlaceholders.defaultPlaceholder
         ">
         </div>
         <!-- ko foreach: { data: getSelected(), as: 'option'}  -->
@@ -74,11 +74,7 @@
                         tabindex="-1"
                         data-bind="click: $parent.removeSelected.bind($parent, value)
                 ">
-                    <span
-                            class="action-close-text"
-                            data-bind="text: 'Close'
-                    ">
-                    </span>
+                    <span class="action-close-text" translate="'Close'"></span>
                 </button>
             </span>
         <!-- /ko -->
@@ -177,7 +173,7 @@
                     data-action="close-advanced-select"
                     type="button"
                     data-bind="click: outerClick">
-                <span data-bind="text: closeBtnLabel"></span>
+                <span translate="closeBtnLabel"></span>
             </button>
         </div>
         <!-- /ko -->
diff --git a/app/code/Magento/Ui/view/base/web/templates/grid/filters/field.html b/app/code/Magento/Ui/view/base/web/templates/grid/filters/field.html
index 1d5290bc6cc2c6f858305ce11dcbeb9a545e1a6c..6fa5df5497e362ac7b1c4aeb2cb490fa84bd5001 100644
--- a/app/code/Magento/Ui/view/base/web/templates/grid/filters/field.html
+++ b/app/code/Magento/Ui/view/base/web/templates/grid/filters/field.html
@@ -5,6 +5,6 @@
  */
 -->
 <label class="admin__form-field-label" attr="for: uid">
-    <span text="label"/>
+    <span translate="label"/>
 </label>
 <div class="admin__form-field-control" render="elementTmpl"/>
diff --git a/app/code/Magento/Ui/view/base/web/templates/group/group.html b/app/code/Magento/Ui/view/base/web/templates/group/group.html
index de4b9cc332e9bbd337745976942e188fed853cc1..ed1c9efd2b0af800bb1046afb897ec3b45621e43 100644
--- a/app/code/Magento/Ui/view/base/web/templates/group/group.html
+++ b/app/code/Magento/Ui/view/base/web/templates/group/group.html
@@ -9,7 +9,7 @@
           css="_required: required"
           attr="'data-index': index">
     <legend class="admin__field-label" if="showLabel">
-        <span text="label" attr="'data-config-scope': $data.scopeLabel"/>
+        <span translate="label" attr="'data-config-scope': $data.scopeLabel"/>
     </legend>
 
     <div class="admin__field-control" css="$data.additionalClasses">
diff --git a/app/code/Magento/Ui/view/frontend/web/templates/form/element/helper/tooltip.html b/app/code/Magento/Ui/view/frontend/web/templates/form/element/helper/tooltip.html
index 8cb1cf0eae7a758ca90c4fb8d6079a916b7a0c15..393989112c971a1cabbdd55125494e3476ab31d4 100644
--- a/app/code/Magento/Ui/view/frontend/web/templates/form/element/helper/tooltip.html
+++ b/app/code/Magento/Ui/view/frontend/web/templates/form/element/helper/tooltip.html
@@ -21,7 +21,6 @@
      <!-- /ko -->
 
     <div class="field-tooltip-content"
-         data-target="dropdown">
-        <!-- ko text: tooltip.description --><!-- /ko -->
+         data-target="dropdown" translate="tooltip.description">
     </div>
 </div>
diff --git a/app/code/Magento/Ui/view/frontend/web/templates/form/field.html b/app/code/Magento/Ui/view/frontend/web/templates/form/field.html
index 38d868a0f6187dc980fe54073f3cf19ac7da8940..f3be62f116b8358e9424934951dc9c40a4a2d22a 100644
--- a/app/code/Magento/Ui/view/frontend/web/templates/form/field.html
+++ b/app/code/Magento/Ui/view/frontend/web/templates/form/field.html
@@ -8,7 +8,7 @@
 
     <label class="label" data-bind="attr: { for: element.uid }">
         <!-- ko if: element.label -->
-        <span data-bind="text: element.label"></span>
+        <span translate="element.label"></span>
         <!-- /ko -->
     </label>
 
diff --git a/app/code/Magento/Ui/view/frontend/web/templates/group/group.html b/app/code/Magento/Ui/view/frontend/web/templates/group/group.html
index 214fc6190ec95be4e52df147d9528a0d6ff89b72..8475a3e137becb20c2beecf5f6f2721e867da2af 100644
--- a/app/code/Magento/Ui/view/frontend/web/templates/group/group.html
+++ b/app/code/Magento/Ui/view/frontend/web/templates/group/group.html
@@ -6,7 +6,7 @@
 -->
 <fieldset class="field" data-bind="css: additionalClasses">
     <legend class="label">
-        <span data-bind="text: element.label"></span>
+        <span translate="element.label"></span>
     </legend>
     <div class="control">
         <!-- ko foreach: { data: elems, as: 'element' } -->
diff --git a/app/code/Magento/Ups/Model/Carrier.php b/app/code/Magento/Ups/Model/Carrier.php
index 17c313af9704fa28f82f08a4971aef503f5ba4c8..ec14e9db90ceccb4d9827d3b2fee921993afae9f 100644
--- a/app/code/Magento/Ups/Model/Carrier.php
+++ b/app/code/Magento/Ups/Model/Carrier.php
@@ -325,13 +325,13 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface
             $destCountry = self::GUAM_COUNTRY_ID;
         }
 
-        $rowRequest->setDestCountry($this->_countryFactory->create()->load($destCountry)->getData('iso2_code'));
+        $country = $this->_countryFactory->create()->load($destCountry);
+        $rowRequest->setDestCountry($country->getData('iso2_code') ?: $destCountry);
 
         $rowRequest->setDestRegionCode($request->getDestRegionCode());
 
         if ($request->getDestPostcode()) {
             $rowRequest->setDestPostal($request->getDestPostcode());
-        } else {
         }
 
         $weight = $this->getTotalNumOfBoxes($request->getPackageWeight());
diff --git a/app/code/Magento/Ups/Test/Unit/Model/CarrierTest.php b/app/code/Magento/Ups/Test/Unit/Model/CarrierTest.php
index 8f42ea1c8040c3107611b18c725bcb4b08ec0969..ea46e534ae890d2f80bfb8a9120c03b43724aeec 100644
--- a/app/code/Magento/Ups/Test/Unit/Model/CarrierTest.php
+++ b/app/code/Magento/Ups/Test/Unit/Model/CarrierTest.php
@@ -7,6 +7,8 @@ namespace Magento\Ups\Test\Unit\Model;
 
 use Magento\Quote\Model\Quote\Address\RateRequest;
 use Magento\Ups\Model\Carrier;
+use Magento\Directory\Model\Country;
+use PHPUnit_Framework_MockObject_MockObject as MockObject;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -57,7 +59,7 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
     protected $countryFactory;
 
     /**
-     * @var \Magento\Directory\Model\Country
+     * @var Country|MockObject
      */
     protected $country;
 
@@ -309,4 +311,47 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
             ]
         ];
     }
+
+    /**
+     * @covers \Magento\Ups\Model\Carrier::setRequest
+     * @param string $countryCode
+     * @param string $foundCountryCode
+     * @dataProvider countryDataProvider
+     */
+    public function testSetRequest($countryCode, $foundCountryCode)
+    {
+        /** @var RateRequest $request */
+        $request = $this->helper->getObject(RateRequest::class);
+        $request->setData([
+            'orig_country' => 'USA',
+            'orig_region_code' => 'CA',
+            'orig_post_code' => 90230,
+            'orig_city' => 'Culver City',
+            'dest_country_id' => $countryCode,
+        ]);
+
+        $this->country->expects(static::at(1))
+            ->method('load')
+            ->with($countryCode)
+            ->willReturnSelf();
+
+        $this->country->expects(static::any())
+            ->method('getData')
+            ->with('iso2_code')
+            ->willReturn($foundCountryCode);
+
+        $this->model->setRequest($request);
+    }
+
+    /**
+     * Get list of country variations
+     * @return array
+     */
+    public function countryDataProvider()
+    {
+        return [
+            ['countryCode' => 'PR', 'foundCountryCode' => null],
+            ['countryCode' => 'US', 'foundCountryCode' => 'US'],
+        ];
+    }
 }
diff --git a/app/code/Magento/Ups/etc/adminhtml/system.xml b/app/code/Magento/Ups/etc/adminhtml/system.xml
index dd83ab7c4ed964ed0ec73c265fa95d61dcf64077..39bd613974d5ef80a28748929ffd4ff725bb253f 100644
--- a/app/code/Magento/Ups/etc/adminhtml/system.xml
+++ b/app/code/Magento/Ups/etc/adminhtml/system.xml
@@ -32,12 +32,15 @@
                     <source_model>Magento\Ups\Model\Config\Source\Container</source_model>
                 </field>
                 <field id="free_shipping_enable" translate="label" type="select" sortOrder="210" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Free Shipping Amount Threshold</label>
+                    <label>Enable Free Shipping Threshold</label>
                     <source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
                 </field>
                 <field id="free_shipping_subtotal" translate="label" type="text" sortOrder="220" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Free Shipping Amount Threshold</label>
                     <validate>validate-number validate-zero-or-greater</validate>
+                    <depends>
+                        <field id="free_shipping_enable">1</field>
+                    </depends>
                 </field>
                 <field id="dest_type" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                     <label>Destination Type</label>
diff --git a/app/code/Magento/UrlRewrite/Block/Selector.php b/app/code/Magento/UrlRewrite/Block/Selector.php
index 85ec1ea46e7e34610256d27ef9579e038ffe43bf..90ec4a6a688da0621f5c3f27910dd121073cc7df 100644
--- a/app/code/Magento/UrlRewrite/Block/Selector.php
+++ b/app/code/Magento/UrlRewrite/Block/Selector.php
@@ -76,4 +76,15 @@ class Selector extends \Magento\Backend\Block\Template
         $keys = array_keys($this->_modes);
         return array_shift($keys);
     }
+
+    /**
+     * Get mode Url
+     *
+     * @param string $mode
+     * @return string
+     */
+    public function getModeUrl($mode)
+    {
+        return $this->getUrl('adminhtml/*/*') . $mode;
+    }
 }
diff --git a/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml b/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml
index 84a070e2cd25ea0b7cafc1909ca9f015ab2b03ad..7aa02ab019c46b9ad7094764118a9f5d07519293 100644
--- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml
+++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/categories.phtml
@@ -6,21 +6,21 @@
 
 // @codingStandardsIgnoreFile
 
-/** @var $block \Magento\UrlRewrite\Block\Catalog\Category\Tree */
+/** @var \Magento\UrlRewrite\Block\Catalog\Category\Tree $block */
 ?>
 <fieldset class="admin__fieldset" data-ui-id="category-selector">
     <legend class="admin__legend"><span><?php /* @escapeNotVerified */ echo __('Select Category') ?></span></legend>
     <div class="content content-category-tree">
         <input type="hidden" name="categories" id="product_categories" value="" />
         <?php if ($block->getRoot()): ?>
-        <div data-mage-init="<?php
-            echo $block->escapeHtml($this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode([
+        <div data-mage-init='<?php /* @noEscape */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode(
+            [
                 'categoryTree' => [
-                    'data' => $block->getTreeArray(null),
-                    'url' => $block->getLoadTreeUrl(),
+                    'data' => $block->getTreeArray(),
+                    'url' => $block->escapeUrl($block->getLoadTreeUrl()),
                 ],
-            ]));
-        ?>" class="jstree-default"></div>
+            ]
+        ); ?>' class="jstree-default"></div>
         <?php endif; ?>
     </div>
 </fieldset>
diff --git a/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml b/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml
index 150b6fc6075fa907263eed9e6d7986dbdd992988..1ab8cf9191ea0847485cc9aca1f5670a46b63c26 100644
--- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml
+++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml
@@ -6,12 +6,9 @@
 
 // @codingStandardsIgnoreFile
 
-/**
- * @var $block \Magento\UrlRewrite\Block\Edit
- */
+/** @var \Magento\UrlRewrite\Block\Edit $block */
 ?>
 <?php echo $block->getChildHtml() ?>
-
 <?php if ($block->getChildBlock('form')): ?>
 <script>
 require([
@@ -19,10 +16,8 @@ require([
     'mage/backend/form',
     'mage/backend/validation'
 ], function($){
-
     $('#edit_form').form()
-        .validation({validationUrl: '<?php /* @escapeNotVerified */ echo $block->getValidationUrl() ?>'});
-
+        .validation({validationUrl: '<?php echo $block->escapeUrl($block->getValidationUrl()) ?>'});
 });
 </script>
 <?php endif; ?>
diff --git a/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml b/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml
index bdde86bc66647aa14c1442e0035a02b9eedf0035..fa32232c4c7b9936fa5db540e695f93d0bd3d0c0 100644
--- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml
+++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml
@@ -6,19 +6,18 @@
 
 // @codingStandardsIgnoreFile
 
-/** @var $block \Magento\UrlRewrite\Block\Selector */
+/** @var \Magento\UrlRewrite\Block\Selector $block */
 ?>
 <div class="form-inline">
     <fieldset class="admin__fieldset fieldset" data-container-for="entity-type-selector">
         <div class="admin__field field field-entity-type-selector">
             <label for="entity-type-selector" class="admin__field-label label">
-                <span><?php /* @escapeNotVerified */ echo $block->getSelectorLabel() ?></span>
+                <span><?php echo $block->escapeHtml($block->getSelectorLabel()) ?></span>
             </label>
             <div class="admin__field-control control">
-                <?php $url = $this->helper('Magento\Backend\Helper\Data')->getUrl('adminhtml/*/*')?>
                 <select data-role="entity-type-selector" class="admin__control-select select" onchange="window.location = this.value;" id="entity-type-selector">
                 <?php foreach ($block->getModes() as $mode => $label): ?>
-                    <option <?php echo($block->isMode($mode) ? 'selected="selected" ' : '') ?>value="<?php /* @escapeNotVerified */ echo $url . $mode ?>"><?php /* @escapeNotVerified */ echo $label ?></option>
+                    <option <?php /* noEscape */ echo $block->isMode($mode) ? 'selected="selected" ' : '' ?>value="<?php echo $block->escapeUrl($block->getModeUrl($mode)) ?>"><?php echo $block->escapeHtml($label) ?></option>
                 <?php endforeach; ?>
                 </select>
             </div>
diff --git a/app/code/Magento/User/Block/Role/Tab/Edit.php b/app/code/Magento/User/Block/Role/Tab/Edit.php
index 7fdc8a4e5b1232f80339c9cdc4b158ebe9b958cb..29b171df0cd115496e9dcccf86a6796d2caa310c 100644
--- a/app/code/Magento/User/Block/Role/Tab/Edit.php
+++ b/app/code/Magento/User/Block/Role/Tab/Edit.php
@@ -6,7 +6,6 @@
 
 namespace Magento\User\Block\Role\Tab;
 
-use Magento\Framework\App\ObjectManager;
 use Magento\User\Controller\Adminhtml\User\Role\SaveRole;
 
 /**
@@ -93,7 +92,6 @@ class Edit extends \Magento\Backend\Block\Widget\Form implements \Magento\Backen
      */
     public function setCoreRegistry(\Magento\Framework\Registry $coreRegistry)
     {
-
         $this->coreRegistry = $coreRegistry;
     }
 
@@ -105,7 +103,6 @@ class Edit extends \Magento\Backend\Block\Widget\Form implements \Magento\Backen
      */
     public function getCoreRegistry()
     {
-
         if (!($this->coreRegistry instanceof \Magento\Framework\Registry)) {
             return \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\Registry::class);
         } else {
@@ -197,11 +194,25 @@ class Edit extends \Magento\Backend\Block\Widget\Form implements \Magento\Backen
      * @return array
      */
     public function getTree()
+    {
+        return $this->_integrationData->mapResources($this->getAclResources());
+    }
+
+    /**
+     * Get lit of all ACL resources declared in the system.
+     *
+     * @return array
+     */
+    private function getAclResources()
     {
         $resources = $this->_aclResourceProvider->getAclResources();
-        $rootArray = $this->_integrationData->mapResources(
-            isset($resources[1]['children']) ? $resources[1]['children'] : []
+        $configResource = array_filter(
+            $resources,
+            function ($node) {
+                return $node['id'] == 'Magento_Backend::admin';
+            }
         );
-        return $rootArray;
+        $configResource = reset($configResource);
+        return isset($configResource['children']) ? $configResource['children'] : [];
     }
 }
diff --git a/app/code/Magento/User/Block/User/Edit/Tab/Roles.php b/app/code/Magento/User/Block/User/Edit/Tab/Roles.php
index 9049b644cc0685352f3e44497976f99d82114938..4c47e07033354207fc3a00cb6ba7b98b42b37abe 100644
--- a/app/code/Magento/User/Block/User/Edit/Tab/Roles.php
+++ b/app/code/Magento/User/Block/User/Edit/Tab/Roles.php
@@ -144,19 +144,19 @@ class Roles extends \Magento\Backend\Block\Widget\Grid\Extended
         //checking if we have this data and we
         //don't need load it through resource model
         if ($user->hasData('roles')) {
-            $uRoles = $user->getData('roles');
+            $userRoles = $user->getData('roles');
         } else {
-            $uRoles = $user->getRoles();
+            $userRoles = $user->getRoles();
         }
 
         if ($json) {
             $jsonRoles = [];
-            foreach ($uRoles as $urid) {
-                $jsonRoles[$urid] = 0;
+            foreach ($userRoles as $roleId) {
+                $jsonRoles[$roleId] = 0;
             }
             return $this->_jsonEncoder->encode((object)$jsonRoles);
         } else {
-            return $uRoles;
+            return $userRoles;
         }
     }
 }
diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Save.php b/app/code/Magento/User/Controller/Adminhtml/User/Save.php
index e7c453c7fc6d3a3fdefebfdc9a88449d276edfd7..cb4260609768873556986630da6bb32aa71f45f7 100644
--- a/app/code/Magento/User/Controller/Adminhtml/User/Save.php
+++ b/app/code/Magento/User/Controller/Adminhtml/User/Save.php
@@ -55,9 +55,9 @@ class Save extends \Magento\User\Controller\Adminhtml\User
             return;
         }
         $model->setData($this->_getAdminUserData($data));
-        $uRoles = $this->getRequest()->getParam('roles', []);
-        if (count($uRoles)) {
-            $model->setRoleId($uRoles[0]);
+        $userRoles = $this->getRequest()->getParam('roles', []);
+        if (count($userRoles)) {
+            $model->setRoleId($userRoles[0]);
         }
 
         /** @var $currentUser \Magento\User\Model\User */
diff --git a/app/code/Magento/User/Test/Unit/Block/Role/Tab/EditTest.php b/app/code/Magento/User/Test/Unit/Block/Role/Tab/EditTest.php
index 271e0973e13da96557e34861c4513f358b226447..666bb2bc832a3f2dc8fb9f240d08c58d63d3aee4 100644
--- a/app/code/Magento/User/Test/Unit/Block/Role/Tab/EditTest.php
+++ b/app/code/Magento/User/Test/Unit/Block/Role/Tab/EditTest.php
@@ -86,7 +86,10 @@ class EditTest extends \PHPUnit_Framework_TestCase
 
     public function testGetTree()
     {
-        $resources = ['resource1', 'resource2', 'resource3'];
+        $resources = [
+            ['id' => 'Magento_Backend::admin', 'children' => ['resource1', 'resource2', 'resource3']],
+            ['id' => 'Invalid_Node', 'children' => ['resource4', 'resource5', 'resource6']]
+        ];
         $mappedResources = ['mapped1', 'mapped2', 'mapped3'];
         $this->aclResourceProviderMock->expects($this->once())->method('getAclResources')->willReturn($resources);
         $this->integrationDataMock->expects($this->once())->method('mapResources')->willReturn($mappedResources);
diff --git a/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php b/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php
deleted file mode 100644
index b0a91da7a07bca6a1349661694edf9fb043cef98..0000000000000000000000000000000000000000
--- a/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-/**
- * Copyright © 2016 Magento. All rights reserved.
- * See COPYING.txt for license details.
- */
-namespace Magento\Usps\Block\Rma\Adminhtml\Rma\Edit\Tab\General\Shipping\Packaging;
-
-use Magento\Framework\App\RequestInterface;
-use Magento\Usps\Helper\Data as UspsHelper;
-use Magento\Usps\Model\Carrier;
-
-/**
- * Rma block plugin
- */
-class Plugin
-{
-    /**
-     * Usps helper
-     *
-     * @var \Magento\Usps\Helper\Data
-     */
-    protected $uspsHelper;
-
-    /**
-     * Request
-     *
-     * @var \Magento\Framework\App\RequestInterface
-     */
-    protected $request;
-
-    /**
-     * Construct
-     *
-     * @param \Magento\Usps\Helper\Data $uspsHelper
-     * @param \Magento\Framework\App\RequestInterface $request
-     */
-    public function __construct(UspsHelper $uspsHelper, RequestInterface $request)
-    {
-        $this->uspsHelper = $uspsHelper;
-        $this->request = $request;
-    }
-
-    /**
-     * Add rule to isGirthAllowed() method
-     *
-     * @param \Magento\Framework\DataObject $subject $subject
-     * @param bool $result
-     * @return bool
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    public function afterIsGirthAllowed(\Magento\Framework\DataObject $subject, $result)
-    {
-        return $result && $this->uspsHelper->displayGirthValue($this->request->getParam('method'));
-    }
-
-    /**
-     * Add rule to isGirthAllowed() method
-     *
-     * @param \Magento\Framework\DataObject $subject
-     * @param \Closure $proceed
-     * @return array
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    public function aroundCheckSizeAndGirthParameter(\Magento\Framework\DataObject $subject, \Closure $proceed)
-    {
-        $carrier = $subject->getCarrier();
-        $size = $subject->getSourceSizeModel();
-
-        $girthEnabled = false;
-        $sizeEnabled = false;
-        if ($carrier && isset($size[0]['value'])) {
-            if (in_array(
-                key($subject->getContainers()),
-                [Carrier::CONTAINER_NONRECTANGULAR, Carrier::CONTAINER_VARIABLE]
-            )
-            ) {
-                $girthEnabled = true;
-            }
-
-            if (in_array(
-                key($subject->getContainers()),
-                [Carrier::CONTAINER_NONRECTANGULAR, Carrier::CONTAINER_RECTANGULAR, Carrier::CONTAINER_VARIABLE]
-            )
-            ) {
-                $sizeEnabled = true;
-            }
-        }
-
-        return [$girthEnabled, $sizeEnabled];
-    }
-}
diff --git a/app/code/Magento/Usps/Model/Carrier.php b/app/code/Magento/Usps/Model/Carrier.php
index 3040d18ad8041d56ba66d231e55f9bb505702b88..d12341659cb6d8ad1fc4acabe0b8052e346ca102 100644
--- a/app/code/Magento/Usps/Model/Carrier.php
+++ b/app/code/Magento/Usps/Model/Carrier.php
@@ -8,11 +8,13 @@
 
 namespace Magento\Usps\Model;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Quote\Model\Quote\Address\RateRequest;
 use Magento\Shipping\Helper\Carrier as CarrierHelper;
 use Magento\Shipping\Model\Carrier\AbstractCarrierOnline;
 use Magento\Shipping\Model\Rate\Result;
 use Magento\Framework\Xml\Security;
+use Magento\Usps\Helper\Data as DataHelper;
 
 /**
  * USPS shipping
@@ -21,17 +23,19 @@ use Magento\Framework\Xml\Security;
  */
 class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\Carrier\CarrierInterface
 {
-    /**
-     * USPS containers
-     */
+    /** @deprecated */
     const CONTAINER_VARIABLE = 'VARIABLE';
 
+    /** @deprecated */
     const CONTAINER_FLAT_RATE_BOX = 'FLAT RATE BOX';
 
+    /** @deprecated */
     const CONTAINER_FLAT_RATE_ENVELOPE = 'FLAT RATE ENVELOPE';
 
+    /** @deprecated */
     const CONTAINER_RECTANGULAR = 'RECTANGULAR';
 
+    /** @deprecated */
     const CONTAINER_NONRECTANGULAR = 'NONRECTANGULAR';
 
     /**
@@ -126,6 +130,11 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
         'USERID'
     ];
 
+    /**
+     * @var DataHelper
+     */
+    private $dataHelper;
+
     /**
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
@@ -1980,11 +1989,13 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
      * Check whether girth is allowed for the USPS
      *
      * @param null|string $countyDest
+     * @param null|string $carrierMethodCode
      * @return bool
      */
-    public function isGirthAllowed($countyDest = null)
+    public function isGirthAllowed($countyDest = null, $carrierMethodCode = null)
     {
-        return $this->_isUSCountry($countyDest) ? false : true;
+        return $this->_isUSCountry($countyDest)
+            && $this->getDataHelper()->displayGirthValue($carrierMethodCode) ? false : true;
     }
 
     /**
@@ -2089,4 +2100,19 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C
 
         return $data;
     }
+
+    /**
+     * Gets Data helper object
+     *
+     * @return DataHelper
+     * @deprecated
+     */
+    private function getDataHelper()
+    {
+        if (!$this->dataHelper) {
+            $this->dataHelper = ObjectManager::getInstance()->get(DataHelper::class);
+        }
+
+        return $this->dataHelper;
+    }
 }
diff --git a/app/code/Magento/Usps/Test/Unit/Model/CarrierTest.php b/app/code/Magento/Usps/Test/Unit/Model/CarrierTest.php
index 1e2e9fd797b05281100488532f6f451d85cef43c..a79206553c5bc7fb66fa64b728593727422d2626 100644
--- a/app/code/Magento/Usps/Test/Unit/Model/CarrierTest.php
+++ b/app/code/Magento/Usps/Test/Unit/Model/CarrierTest.php
@@ -6,6 +6,7 @@
 namespace Magento\Usps\Test\Unit\Model;
 
 use Magento\Quote\Model\Quote\Address\RateRequest;
+use Magento\Usps\Helper\Data as DataHelper;
 use Magento\Usps\Model\Carrier;
 
 /**
@@ -43,6 +44,11 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
      */
     protected $scope;
 
+    /**
+     * @var DataHelper|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $dataHelper;
+
     /**
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
@@ -154,7 +160,14 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
 
         ];
 
+        $this->dataHelper = $this->getMockBuilder(DataHelper::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['displayGirthValue'])
+            ->getMock();
+
         $this->carrier = $this->helper->getObject(\Magento\Usps\Model\Carrier::class, $arguments);
+
+        $this->helper->setBackwardCompatibleProperty($this->carrier, 'dataHelper', $this->dataHelper);
     }
 
     /**
@@ -324,4 +337,33 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
             ],
         ];
     }
+
+    /**
+     * @param string $countyCode
+     * @param string $carrierMethodCode
+     * @param bool $displayGirthValueResult
+     * @param bool $result
+     * @dataProvider isGirthAllowedDataProvider
+     */
+    public function testIsGirthAllowed($countyCode, $carrierMethodCode, $displayGirthValueResult, $result)
+    {
+        $this->dataHelper->expects(static::any())
+            ->method('displayGirthValue')
+            ->with($carrierMethodCode)
+            ->willReturn($displayGirthValueResult);
+
+        self::assertEquals($result, $this->carrier->isGirthAllowed($countyCode, $carrierMethodCode));
+    }
+
+    /**
+     * @return array
+     */
+    public function isGirthAllowedDataProvider()
+    {
+        return [
+            ['US', 'usps_1', true, false],
+            ['UK', 'usps_1', true, true],
+            ['US', 'usps_0', false, true],
+        ];
+    }
 }
diff --git a/app/code/Magento/Usps/etc/adminhtml/di.xml b/app/code/Magento/Usps/etc/adminhtml/di.xml
index f098306c6e99b5488c07a6aa152a1f4e74878087..f60c4d8eb58683f203e1aba6db8a01384101e2f4 100644
--- a/app/code/Magento/Usps/etc/adminhtml/di.xml
+++ b/app/code/Magento/Usps/etc/adminhtml/di.xml
@@ -6,12 +6,6 @@
  */
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
-    <type name="Magento\Rma\Block\Adminhtml\Rma\Edit\Tab\General\Shipping\Packaging">
-        <arguments>
-            <argument name="sourceSizeModel" xsi:type="object">Magento\Usps\Model\Source\Size</argument>
-        </arguments>
-        <plugin name="usps" type="Magento\Usps\Block\Rma\Adminhtml\Rma\Edit\Tab\General\Shipping\Packaging\Plugin"/>
-    </type>
     <type name="Magento\Shipping\Block\Adminhtml\Order\Packaging">
         <arguments>
             <argument name="sourceSizeModel" xsi:type="object">Magento\Usps\Model\Source\Size</argument>
diff --git a/app/code/Magento/Vault/Model/PaymentTokenManagement.php b/app/code/Magento/Vault/Model/PaymentTokenManagement.php
index 510dc4cea3162c3823d6ff980f59b3f7407c1db2..f4a445b35fb34c8e6ae44b066db94cef0414f7ce 100644
--- a/app/code/Magento/Vault/Model/PaymentTokenManagement.php
+++ b/app/code/Magento/Vault/Model/PaymentTokenManagement.php
@@ -128,26 +128,37 @@ class PaymentTokenManagement implements PaymentTokenManagementInterface
      */
     public function getVisibleAvailableTokens($customerId)
     {
-        $filters[] = $this->filterBuilder->setField(PaymentTokenInterface::CUSTOMER_ID)
-            ->setValue($customerId)
-            ->create();
-        $filters[] = $this->filterBuilder->setField(PaymentTokenInterface::IS_VISIBLE)
-            ->setValue(1)
-            ->create();
-        $filters[] = $this->filterBuilder->setField(PaymentTokenInterface::IS_ACTIVE)
-            ->setValue(1)
-            ->create();
-        $filters[] = $this->filterBuilder->setField(PaymentTokenInterface::EXPIRES_AT)
-            ->setConditionType('gt')
-            ->setValue(
-                $this->dateTimeFactory->create(
-                    'now',
-                    new \DateTimeZone('UTC')
-                )->format('Y-m-d 00:00:00')
-            )
-            ->create();
-        $searchCriteria = $this->searchCriteriaBuilder->addFilters($filters)
-            ->create();
+        $customerFilter = [
+            $this->filterBuilder->setField(PaymentTokenInterface::CUSTOMER_ID)
+                ->setValue($customerId)
+                ->create()
+            ];
+        $visibleFilter = [
+            $this->filterBuilder->setField(PaymentTokenInterface::IS_VISIBLE)
+                ->setValue(1)
+                ->create()
+            ];
+        $isActiveFilter = [
+            $this->filterBuilder->setField(PaymentTokenInterface::IS_ACTIVE)
+                ->setValue(1)
+                ->create()
+            ];
+        $expiresAtFilter = [
+            $this->filterBuilder->setField(PaymentTokenInterface::EXPIRES_AT)
+                ->setConditionType('gt')
+                ->setValue(
+                    $this->dateTimeFactory->create(
+                        'now',
+                        new \DateTimeZone('UTC')
+                    )->format('Y-m-d 00:00:00')
+                )
+                ->create()
+            ];
+        $this->searchCriteriaBuilder->addFilters($customerFilter);
+        $this->searchCriteriaBuilder->addFilters($visibleFilter);
+        $this->searchCriteriaBuilder->addFilters($isActiveFilter);
+        // add filters to different filter groups in order to filter by AND expression
+        $searchCriteria = $this->searchCriteriaBuilder->addFilters($expiresAtFilter)->create();
 
         return $this->paymentTokenRepository->getList($searchCriteria)->getItems();
     }
diff --git a/app/code/Magento/Vault/Model/PaymentTokenRepository.php b/app/code/Magento/Vault/Model/PaymentTokenRepository.php
index 38bc9608147aa0c6f5a553d5f6e235a4f318501b..0cc17c3011efcadfc65b6f2d84902641d8def0ef 100644
--- a/app/code/Magento/Vault/Model/PaymentTokenRepository.php
+++ b/app/code/Magento/Vault/Model/PaymentTokenRepository.php
@@ -7,6 +7,7 @@ namespace Magento\Vault\Model;
 
 use Magento\Framework\Api\FilterBuilder;
 use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
 use Magento\Framework\Api\SearchCriteriaBuilder;
 use Magento\Vault\Api\Data;
 use Magento\Vault\Api\Data\PaymentTokenSearchResultsInterfaceFactory;
@@ -51,6 +52,9 @@ class PaymentTokenRepository implements PaymentTokenRepositoryInterface
      */
     protected $collectionFactory;
 
+    /** @var  CollectionProcessorInterface */
+    private $collectionProcessor;
+
     /**
      * @param \Magento\Vault\Model\ResourceModel\PaymentToken $resourceModel
      * @param PaymentTokenFactory $paymentTokenFactory
@@ -58,6 +62,7 @@ class PaymentTokenRepository implements PaymentTokenRepositoryInterface
      * @param SearchCriteriaBuilder $searchCriteriaBuilder
      * @param PaymentTokenSearchResultsInterfaceFactory $searchResultsFactory
      * @param CollectionFactory $collectionFactory
+     * @param CollectionProcessorInterface | null $collectionProcessor
      */
     public function __construct(
         PaymentTokenResourceModel $resourceModel,
@@ -65,7 +70,8 @@ class PaymentTokenRepository implements PaymentTokenRepositoryInterface
         FilterBuilder $filterBuilder,
         SearchCriteriaBuilder $searchCriteriaBuilder,
         PaymentTokenSearchResultsInterfaceFactory $searchResultsFactory,
-        CollectionFactory $collectionFactory
+        CollectionFactory $collectionFactory,
+        CollectionProcessorInterface $collectionProcessor = null
     ) {
         $this->resourceModel = $resourceModel;
         $this->paymentTokenFactory = $paymentTokenFactory;
@@ -73,6 +79,7 @@ class PaymentTokenRepository implements PaymentTokenRepositoryInterface
         $this->searchCriteriaBuilder = $searchCriteriaBuilder;
         $this->searchResultsFactory = $searchResultsFactory;
         $this->collectionFactory = $collectionFactory;
+        $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
     }
 
     /**
@@ -85,11 +92,7 @@ class PaymentTokenRepository implements PaymentTokenRepositoryInterface
     {
         /** @var \Magento\Vault\Model\ResourceModel\PaymentToken\Collection $collection */
         $collection = $this->collectionFactory->create();
-        /** @var FilterGroup $group */
-        foreach ($searchCriteria->getFilterGroups() as $group) {
-            $this->addFilterGroupToCollection($group, $collection);
-        }
-
+        $this->collectionProcessor->process($searchCriteria, $collection);
         /** @var \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterface $searchResults */
         $searchResults = $this->searchResultsFactory->create();
         $searchResults->setSearchCriteria($searchCriteria);
@@ -150,6 +153,7 @@ class PaymentTokenRepository implements PaymentTokenRepositoryInterface
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
+     * @deprecated
      * @throws \Magento\Framework\Exception\InputException
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection)
@@ -159,4 +163,20 @@ class PaymentTokenRepository implements PaymentTokenRepositoryInterface
             $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
         }
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/app/code/Magento/Vault/Model/ResourceModel/PaymentToken.php b/app/code/Magento/Vault/Model/ResourceModel/PaymentToken.php
index e7644080abb7defd380e24a8362f1774505dc4e7..b9ffc69cf7fe804175318d3715741ef7cafc5a26 100644
--- a/app/code/Magento/Vault/Model/ResourceModel/PaymentToken.php
+++ b/app/code/Magento/Vault/Model/ResourceModel/PaymentToken.php
@@ -104,7 +104,7 @@ class PaymentToken extends AbstractDb
         $connection = $this->getConnection();
 
         $select = $connection->select()
-            ->from(InstallSchema::ORDER_PAYMENT_TO_PAYMENT_TOKEN_TABLE)
+            ->from($this->getTable(InstallSchema::ORDER_PAYMENT_TO_PAYMENT_TOKEN_TABLE))
             ->where('order_payment_id = ?', (int) $orderPaymentId)
             ->where('payment_token_id =?', (int) $paymentTokenId);
 
diff --git a/app/code/Magento/Vault/Model/Ui/Adminhtml/TokensConfigProvider.php b/app/code/Magento/Vault/Model/Ui/Adminhtml/TokensConfigProvider.php
index c4f31a771c70668d6dabae591de8019df9061755..98e7728f732fe51bcea79e555c5333a9cbd86684 100644
--- a/app/code/Magento/Vault/Model/Ui/Adminhtml/TokensConfigProvider.php
+++ b/app/code/Magento/Vault/Model/Ui/Adminhtml/TokensConfigProvider.php
@@ -130,38 +130,57 @@ final class TokensConfigProvider
         }
 
         if ($customerId) {
-            $filters[] = $this->filterBuilder->setField(PaymentTokenInterface::CUSTOMER_ID)
-                ->setValue($customerId)
-                ->create();
+            $this->searchCriteriaBuilder->addFilters(
+                [
+                    $this->filterBuilder->setField(PaymentTokenInterface::CUSTOMER_ID)
+                    ->setValue($customerId)
+                    ->create(),
+                ]
+            );
         } else {
             try {
-                $filters[] = $this->filterBuilder->setField(PaymentTokenInterface::ENTITY_ID)
-                    ->setValue($this->getPaymentTokenEntityId())
-                    ->create();
+                $this->searchCriteriaBuilder->addFilters(
+                    [
+                        $this->filterBuilder->setField(PaymentTokenInterface::ENTITY_ID)
+                            ->setValue($this->getPaymentTokenEntityId())
+                            ->create(),
+                    ]
+                );
             } catch (InputException $e) {
                 return $result;
             } catch (NoSuchEntityException $e) {
                 return $result;
             }
         }
-        $filters[] = $this->filterBuilder->setField(PaymentTokenInterface::PAYMENT_METHOD_CODE)
-            ->setValue($vaultProviderCode)
-            ->create();
-        $filters[] = $this->filterBuilder->setField(PaymentTokenInterface::IS_ACTIVE)
-            ->setValue(1)
-            ->create();
-        $filters[] = $this->filterBuilder->setField(PaymentTokenInterface::EXPIRES_AT)
-            ->setConditionType('gt')
-            ->setValue(
-                $this->dateTimeFactory->create(
-                    'now',
-                    new \DateTimeZone('UTC')
-                )->format('Y-m-d 00:00:00')
-            )
-            ->create();
+        $this->searchCriteriaBuilder->addFilters(
+            [
+                $this->filterBuilder->setField(PaymentTokenInterface::PAYMENT_METHOD_CODE)
+                    ->setValue($vaultProviderCode)
+                    ->create(),
+                ]
+        );
+        $this->searchCriteriaBuilder->addFilters(
+            [
+                $this->filterBuilder->setField(PaymentTokenInterface::IS_ACTIVE)
+                    ->setValue(1)
+                    ->create(),
+                ]
+        );
+        $this->searchCriteriaBuilder->addFilters(
+            [
+                $this->filterBuilder->setField(PaymentTokenInterface::EXPIRES_AT)
+                    ->setConditionType('gt')
+                    ->setValue(
+                        $this->dateTimeFactory->create(
+                            'now',
+                            new \DateTimeZone('UTC')
+                        )->format('Y-m-d 00:00:00')
+                    )
+                    ->create(),
+                ]
+        );
 
-        $searchCriteria = $this->searchCriteriaBuilder->addFilters($filters)
-            ->create();
+        $searchCriteria = $this->searchCriteriaBuilder->create();
 
         foreach ($this->paymentTokenRepository->getList($searchCriteria)->getItems() as $token) {
             $result[] = $componentProvider->getComponentForToken($token);
@@ -186,7 +205,7 @@ final class TokensConfigProvider
 
     /**
      * Get active vault payment by code
-     * @param $vaultPaymentCode
+     * @param string $vaultPaymentCode
      * @return VaultPaymentInterface|null
      */
     private function getVaultPayment($vaultPaymentCode)
diff --git a/app/code/Magento/Vault/Plugin/PaymentVaultAttributesLoad.php b/app/code/Magento/Vault/Plugin/PaymentVaultAttributesLoad.php
index 810a8c5242da8ce24cbbb5ac15d63260f3853687..710b765d11effb155d17c02986ec561e0d54207d 100644
--- a/app/code/Magento/Vault/Plugin/PaymentVaultAttributesLoad.php
+++ b/app/code/Magento/Vault/Plugin/PaymentVaultAttributesLoad.php
@@ -10,6 +10,8 @@ namespace Magento\Vault\Plugin;
 use Magento\Sales\Api\Data\OrderPaymentExtensionInterface;
 use Magento\Sales\Api\Data\OrderPaymentInterface;
 use Magento\Vault\Api\PaymentTokenManagementInterface;
+use Magento\Sales\Api\Data\OrderPaymentExtensionFactory;
+use Magento\Vault\Api\Data\PaymentTokenInterface;
 
 /**
  * Plugin for loading vault payment extension attribute to order/payment entity
@@ -17,7 +19,7 @@ use Magento\Vault\Api\PaymentTokenManagementInterface;
 class PaymentVaultAttributesLoad
 {
     /**
-     * @var \Magento\Sales\Api\Data\OrderPaymentExtensionFactory
+     * @var OrderPaymentExtensionFactory
      */
     protected $paymentExtensionFactory;
 
@@ -27,11 +29,11 @@ class PaymentVaultAttributesLoad
     protected $paymentTokenManagement;
 
     /**
-     * @param \Magento\Sales\Api\Data\OrderPaymentExtensionFactory $paymentExtensionFactory
+     * @param OrderPaymentExtensionFactory $paymentExtensionFactory
      * @param PaymentTokenManagement|PaymentTokenManagementInterface $paymentTokenManagement
      */
     public function __construct(
-        \Magento\Sales\Api\Data\OrderPaymentExtensionFactory $paymentExtensionFactory,
+        OrderPaymentExtensionFactory $paymentExtensionFactory,
         PaymentTokenManagementInterface $paymentTokenManagement
     ) {
         $this->paymentExtensionFactory = $paymentExtensionFactory;
@@ -42,16 +44,13 @@ class PaymentVaultAttributesLoad
      * Load vault payment extension attribute to order/payment entity
      *
      * @param OrderPaymentInterface $payment
-     * @param \Closure $proceed
+     * @param OrderPaymentExtensionInterface|null $paymentExtension
      * @return OrderPaymentExtensionInterface
      */
-    public function aroundGetExtensionAttributes(
+    public function afterGetExtensionAttributes(
         OrderPaymentInterface $payment,
-        \Closure $proceed
+        OrderPaymentExtensionInterface $paymentExtension = null
     ) {
-        /** @var OrderPaymentExtensionInterface $paymentExtension */
-        $paymentExtension = $proceed();
-
         if ($paymentExtension === null) {
             $paymentExtension = $this->paymentExtensionFactory->create();
         }
@@ -59,7 +58,7 @@ class PaymentVaultAttributesLoad
         $paymentToken = $paymentExtension->getVaultPaymentToken();
         if ($paymentToken === null) {
             $paymentToken = $this->paymentTokenManagement->getByPaymentId($payment->getEntityId());
-            if ($paymentToken instanceof \Magento\Vault\Api\Data\PaymentTokenInterface) {
+            if ($paymentToken instanceof PaymentTokenInterface) {
                 $paymentExtension->setVaultPaymentToken($paymentToken);
             }
             $payment->setExtensionAttributes($paymentExtension);
diff --git a/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenManagementTest.php b/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenManagementTest.php
index 4672ebac40c297fc0968e58127933016c3b56d9e..8784522a80f7aaa74dd2607941a6fbee9efc2238 100644
--- a/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenManagementTest.php
+++ b/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenManagementTest.php
@@ -486,9 +486,9 @@ class PaymentTokenManagementTest extends \PHPUnit_Framework_TestCase
             ->with('Y-m-d 00:00:00')
             ->willReturn('2015-01-01 00:00:00');
 
-        $this->searchCriteriaBuilder->expects(self::once())
+        $this->searchCriteriaBuilder->expects(self::exactly(4))
             ->method('addFilters')
-            ->with([$customerFilter, $visibilityFilter, $isActiveFilter, $expiresAtFilter])
+            ->withConsecutive($customerFilter, $visibilityFilter, $isActiveFilter, $expiresAtFilter)
             ->willReturnSelf();
 
         $this->searchCriteriaBuilder->expects(self::once())
diff --git a/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenRepositoryTest.php b/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenRepositoryTest.php
index 6ee6108f062d810fcfd5487e4c1aa362cf779875..dd0644dc46d106b436248cefb5fda353be87b1d6 100644
--- a/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenRepositoryTest.php
+++ b/app/code/Magento/Vault/Test/Unit/Model/PaymentTokenRepositoryTest.php
@@ -18,9 +18,15 @@ use Magento\Vault\Model\ResourceModel\PaymentToken\CollectionFactory;
 use PHPUnit_Framework_MockObject_MockObject as MockObject;
 use Magento\Vault\Model\ResourceModel\PaymentToken as PaymentTokenResourceModel;
 
+/**
+ * Class PaymentTokenRepositoryTest
+ * @package Magento\Vault\Test\Unit\Model
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class PaymentTokenRepositoryTest extends \PHPUnit_Framework_TestCase
 {
     const PUBLIC_HASH = 'hash';
+
     /**
      * @var \Magento\Vault\Model\PaymentTokenRepository|MockObject resourceModelMock
      */
@@ -76,6 +82,11 @@ class PaymentTokenRepositoryTest extends \PHPUnit_Framework_TestCase
      */
     protected $collectionMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $collectionProcessor;
+
     /**
      * @return void
      */
@@ -123,7 +134,13 @@ class PaymentTokenRepositoryTest extends \PHPUnit_Framework_TestCase
             ->setMethods(['create'])
             ->disableOriginalConstructor()
             ->getMock();
-
+        $this->collectionProcessor = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class,
+            [],
+            [],
+            '',
+            false
+        );
         $this->repositoryModel = $this->getMockBuilder(PaymentTokenRepository::class)
             ->setConstructorArgs([
                 'resourceModel' => $this->resourceModelMock,
@@ -131,7 +148,8 @@ class PaymentTokenRepositoryTest extends \PHPUnit_Framework_TestCase
                 'filterBuilder' => $this->filterBuilderMock,
                 'searchCriteriaBuilder' => $this->searchCriteriaBuilderMock,
                 'searchResultsFactory' => $this->searchResultsFactoryMock,
-                'collectionFactory' => $this->collectionFactoryMock
+                'collectionFactory' => $this->collectionFactoryMock,
+                'collectionProcessor' => $this->collectionProcessor
             ])
             ->setMethods(null)
             ->getMock();
@@ -148,18 +166,15 @@ class PaymentTokenRepositoryTest extends \PHPUnit_Framework_TestCase
         $this->collectionFactoryMock->expects($this->once())
             ->method('create')
             ->willReturn($this->collectionMock);
-
-        $this->searchCriteriaMock->expects($this->once())
-            ->method('getFilterGroups')
-            ->willReturn([]);
-
+        
         $this->searchResultsFactoryMock->expects($this->once())
             ->method('create')
             ->willReturn($this->searchResults);
-
+        $this->collectionProcessor->expects($this->once())
+            ->method('process')
+            ->with($this->searchCriteriaMock, $this->collectionMock);
         $list = $this->repositoryModel->getList($this->searchCriteriaMock);
         $this->assertSame($this->searchResults, $list);
-
         $this->assertSame(
             $this->paymentTokenMock,
             $list->getItems()[0]
diff --git a/app/code/Magento/Vault/Test/Unit/Model/Ui/Adminhtml/TokensConfigProviderTest.php b/app/code/Magento/Vault/Test/Unit/Model/Ui/Adminhtml/TokensConfigProviderTest.php
index ab825de32c91e8e8e190bbbe99c2f7e2e7168a96..38948b004eebc358ce82eddf8bf2af88e1685c8c 100644
--- a/app/code/Magento/Vault/Test/Unit/Model/Ui/Adminhtml/TokensConfigProviderTest.php
+++ b/app/code/Magento/Vault/Test/Unit/Model/Ui/Adminhtml/TokensConfigProviderTest.php
@@ -572,10 +572,16 @@ class TokensConfigProviderTest extends \PHPUnit_Framework_TestCase
             ->with('gt')
             ->willReturnSelf();
 
-        $this->searchCriteriaBuilder->expects(self::once())
+        $this->searchCriteriaBuilder->expects(self::exactly(4))
             ->method('addFilters')
-            ->with([$customerFilter, $codeFilter, $expiresAtFilter, $isActiveFilter])
-            ->willReturnSelf();
+            ->willReturnMap(
+                [
+                    [$customerFilter, $this->searchCriteriaBuilder],
+                    [$codeFilter, $this->searchCriteriaBuilder],
+                    [$expiresAtFilter, $this->searchCriteriaBuilder],
+                    [$isActiveFilter, $this->searchCriteriaBuilder],
+                ]
+            );
 
         $this->searchCriteriaBuilder->expects(self::once())
             ->method('create')
diff --git a/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php b/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php
index c00f2f3491e03b16628d49ea34e5990e705c13e5..43344c196ec524e053842854db76c86951f70ad0 100644
--- a/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php
+++ b/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php
@@ -92,29 +92,27 @@ class ContextPlugin
 
     /**
      * @param \Magento\Framework\App\ActionInterface $subject
-     * @param callable $proceed
      * @param \Magento\Framework\App\RequestInterface $request
-     * @return mixed
+     * @return void
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.NPathComplexity)
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
-    public function aroundDispatch(
+    public function beforeDispatch(
         \Magento\Framework\App\ActionInterface $subject,
-        \Closure $proceed,
         \Magento\Framework\App\RequestInterface $request
     ) {
         if (!$this->weeeHelper->isEnabled() ||
             !$this->customerSession->isLoggedIn() ||
             !$this->moduleManager->isEnabled('Magento_PageCache') ||
             !$this->cacheConfig->isEnabled()) {
-            return $proceed($request);
+            return;
         }
 
         $basedOn = $this->taxHelper->getTaxBasedOn();
         if ($basedOn != 'shipping' && $basedOn != 'billing') {
-            return $proceed($request);
+            return;
         }
 
         $weeeTaxRegion = $this->getWeeeTaxRegion($basedOn);
@@ -124,7 +122,7 @@ class ContextPlugin
 
         if (!$countryId && !$regionId) {
             // country and region does not exist
-            return $proceed($request);
+            return;
         } else if ($countryId && !$regionId) {
             // country exist and region does not exist
             $regionId = 0;
@@ -158,7 +156,6 @@ class ContextPlugin
                 0
             );
         }
-        return $proceed($request);
     }
 
     /**
diff --git a/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php b/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php
index ebb0837d3c14474f27951a1158927d75cace4ed3..77c8070ca44eb51ff546a71a85545393657f6f94 100644
--- a/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php
+++ b/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php
@@ -123,7 +123,7 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testAroundDispatchBasedOnDefault()
+    public function testBeforeDispatchBasedOnDefault()
     {
         $this->customerSessionMock->expects($this->once())
             ->method('isLoggedIn')
@@ -187,14 +187,11 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
 
         $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class);
         $request = $this->getMock(\Magento\Framework\App\Request\Http::class, ['getActionName'], [], '', false);
-        $expectedResult = 'expectedResult';
-        $proceed = function ($request) use ($expectedResult) {
-            return $expectedResult;
-        };
-        $this->contextPlugin->aroundDispatch($action, $proceed, $request);
+
+        $this->contextPlugin->beforeDispatch($action, $request);
     }
 
-    public function testAroundDispatchBasedOnOrigin()
+    public function testBeforeDispatchBasedOnOrigin()
     {
         $this->customerSessionMock->expects($this->once())
             ->method('isLoggedIn')
@@ -219,14 +216,11 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
 
         $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class);
         $request = $this->getMock(\Magento\Framework\App\Request\Http::class, ['getActionName'], [], '', false);
-        $expectedResult = 'expectedResult';
-        $proceed = function ($request) use ($expectedResult) {
-            return $expectedResult;
-        };
-        $this->contextPlugin->aroundDispatch($action, $proceed, $request);
+
+        $this->contextPlugin->beforeDispatch($action, $request);
     }
 
-    public function testAroundDispatchBasedOnBilling()
+    public function testBeforeDispatchBasedOnBilling()
     {
         $this->customerSessionMock->expects($this->once())
             ->method('isLoggedIn')
@@ -294,14 +288,11 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
 
         $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class);
         $request = $this->getMock(\Magento\Framework\App\Request\Http::class, ['getActionName'], [], '', false);
-        $expectedResult = 'expectedResult';
-        $proceed = function ($request) use ($expectedResult) {
-            return $expectedResult;
-        };
-        $this->contextPlugin->aroundDispatch($action, $proceed, $request);
+
+        $this->contextPlugin->beforeDispatch($action, $request);
     }
 
-    public function testAroundDispatchBasedOnShipping()
+    public function testBeforeDispatchBasedOnShipping()
     {
         $this->customerSessionMock->expects($this->once())
             ->method('isLoggedIn')
@@ -369,10 +360,7 @@ class ContextPluginTest extends \PHPUnit_Framework_TestCase
 
         $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class);
         $request = $this->getMock(\Magento\Framework\App\Request\Http::class, ['getActionName'], [], '', false);
-        $expectedResult = 'expectedResult';
-        $proceed = function ($request) use ($expectedResult) {
-            return $expectedResult;
-        };
-        $this->contextPlugin->aroundDispatch($action, $proceed, $request);
+
+        $this->contextPlugin->beforeDispatch($action, $request);
     }
 }
diff --git a/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml b/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml
index ad7559e375539e7199b7fe4190a9972a877a56b4..4e240770b04622e4ec6c68bfa796a6a83da006e1 100644
--- a/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml
+++ b/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml
@@ -6,19 +6,20 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser $block */
 ?>
 
 <?php $_divId = 'tree' . $block->getId() ?>
-<div id="<?php /* @escapeNotVerified */ echo $_divId ?>" class="tree"></div>
+<div id="<?php echo $block->escapeHtmlAttr($_divId) ?>" class="tree"></div>
 <script id="ie-deferred-loader" defer="defer" src="//:"></script>
 <script>
 require(['jquery', "prototype", "extjs/ext-tree-checkbox"], function(jQuery){
 
-var tree<?php /* @escapeNotVerified */ echo $block->getId() ?>;
+var tree<?php echo $block->escapeJs($block->getId()) ?>;
 
-var useMassaction = <?php /* @escapeNotVerified */ echo $block->getUseMassaction() ? 1 : 0; ?>;
+var useMassaction = <?php /* @noEscape */ echo $block->getUseMassaction() ? 1 : 0; ?>;
 
-var isAnchorOnly = <?php /* @escapeNotVerified */ echo $block->getIsAnchorOnly() ? 1 : 0; ?>;
+var isAnchorOnly = <?php /* @noEscape */ echo $block->getIsAnchorOnly() ? 1 : 0; ?>;
 
 Ext.tree.TreePanel.Enhanced = function(el, config)
 {
@@ -43,7 +44,7 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
 
         if (firstLoad) {
             <?php if ($block->getNodeClickListener()): ?>
-                this.addListener('click', <?php /* @escapeNotVerified */ echo $block->getNodeClickListener() ?>.createDelegate(this));
+                this.addListener('click', <?php /* @noEscape */ echo $block->getNodeClickListener() ?>.createDelegate(this));
             <?php endif; ?>
         }
 
@@ -56,10 +57,10 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
 
 jQuery(function()
 {
-    var emptyNodeAdded = <?php /* @escapeNotVerified */ echo($block->getWithEmptyNode() ? 'false' : 'true') ?>;
+    var emptyNodeAdded = <?php /* @noEscape */ echo($block->getWithEmptyNode() ? 'false' : 'true') ?>;
 
     var categoryLoader = new Ext.tree.TreeLoader({
-       dataUrl: '<?php /* @escapeNotVerified */ echo $block->getLoadTreeUrl() ?>'
+        dataUrl: '<?php echo $block->escapeUrl($block->getLoadTreeUrl()) ?>'
     });
 
     categoryLoader.buildCategoryTree = function(parent, config)
@@ -149,25 +150,25 @@ jQuery(function()
     };
 
     categoryLoader.on("beforeload", function(treeLoader, node) {
-        $('<?php /* @escapeNotVerified */ echo $_divId; ?>').fire('category:beforeLoad', {treeLoader:treeLoader});
+        $('<?php echo $block->escapeJs($_divId); ?>').fire('category:beforeLoad', {treeLoader:treeLoader});
         treeLoader.baseParams.id = node.attributes.id;
     });
 
-    tree<?php /* @escapeNotVerified */ echo $block->getId() ?> = new Ext.tree.TreePanel.Enhanced('<?php /* @escapeNotVerified */ echo $_divId ?>', {
+    tree<?php echo $block->escapeJs($block->getId()) ?> = new Ext.tree.TreePanel.Enhanced('<?php echo $block->escapeJs($_divId) ?>', {
         animate:          false,
         loader:           categoryLoader,
         enableDD:         false,
         containerScroll:  true,
-        rootVisible:      '<?php /* @escapeNotVerified */ echo $block->getRoot()->getIsVisible() ?>',
+        rootVisible:      '<?php echo (bool) $block->getRoot()->getIsVisible() ?>',
         useAjax:          true,
         currentNodeId:    <?php echo (int) $block->getCategoryId() ?>,
         addNodeTo:        false
     });
 
     if (useMassaction) {
-        tree<?php /* @escapeNotVerified */ echo $block->getId() ?>.on('check', function(node) {
-            $('<?php /* @escapeNotVerified */ echo $_divId; ?>').fire('node:changed', {node:node});
-        }, tree<?php /* @escapeNotVerified */ echo $block->getId() ?>);
+        tree<?php echo $block->escapeJs($block->getId()) ?>.on('check', function(node) {
+            $('<?php echo $block->escapeJs($_divId); ?>').fire('node:changed', {node:node});
+        }, tree<?php echo $block->escapeJs($block->getId()) ?>);
     }
 
     // set the root node
@@ -179,7 +180,7 @@ jQuery(function()
         category_id: <?php echo (int) $block->getCategoryId() ?>
     };
 
-    tree<?php /* @escapeNotVerified */ echo $block->getId() ?>.loadTree({parameters:parameters, data:<?php /* @escapeNotVerified */ echo $block->getTreeJson() ?>},true);
+    tree<?php echo $block->escapeJs($block->getId()) ?>.loadTree({parameters:parameters, data:<?php /* @noEscape */ echo $block->getTreeJson() ?>},true);
 
 });
 
diff --git a/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml
index 418e3975d2aa25eb0a8232257b543d8eb621ad9b..62d92ac38aecdbc22f13de959eba3f419b47c431 100644
--- a/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml
+++ b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml
@@ -6,6 +6,8 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main\Layout $block */
+
 ?>
 <fieldset class="fieldset">
     <legend class="legend"><span><?php /* @escapeNotVerified */ echo __('Layout Updates') ?></span></legend>
@@ -32,15 +34,15 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
         '<label for="widget_instance[<%- data.id %>][page_group]">Display on <span class="required">*</span></label>'+
         '<?php echo $block->getDisplayOnSelectHtml(); ?>'+
         '<div class="actions">'+
-        <?php /* @escapeNotVerified */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getRemoveLayoutButtonHtml()) ?> +
+        <?php /* @noEscape */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getRemoveLayoutButtonHtml()) ?> +
         '</div>'+
     '</div>'+
     '<div class="fieldset-wrapper-content">'+
 <?php foreach ($block->getDisplayOnContainers() as $container): ?>
-    '<div class="no-display <?php /* @escapeNotVerified */ echo $container['code'] ?> group_container" id="<?php /* @escapeNotVerified */ echo $container['name'] ?>_<%- data.id %>">'+
-        '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][<?php /* @escapeNotVerified */ echo $container['name'] ?>]" />'+
-        '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][<?php /* @escapeNotVerified */ echo $container['name'] ?>][page_id]" value="<%- data.page_id %>" />'+
-        '<input disabled="disabled" type="hidden" class="layout_handle_pattern" name="widget_instance[<%- data.id %>][<?php /* @escapeNotVerified */ echo $container['name'] ?>][layout_handle]" value="<?php /* @escapeNotVerified */ echo $container['layout_handle'] ?>" />'+
+    '<div class="no-display <?php echo $block->escapeJs($container['code']) ?> group_container" id="<?php echo $block->escapeJs($container['name']) ?>_<%- data.id %>">'+
+        '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][<?php echo $block->escapeJs($container['name']) ?>]" />'+
+        '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][<?php echo $block->escapeJs($container['name']) ?>][page_id]" value="<%- data.page_id %>" />'+
+        '<input disabled="disabled" type="hidden" class="layout_handle_pattern" name="widget_instance[<%- data.id %>][<?php echo $block->escapeJs($container['name']) ?>][layout_handle]" value="<?php echo $block->escapeJs($container['layout_handle']) ?>" />'+
         '<table class="data-table">'+
             '<col width="200" />'+
             '<thead>'+
@@ -53,10 +55,10 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
             '<tbody>'+
                 '<tr>'+
                     '<td>'+
-                        '<input disabled="disabled" type="radio" class="radio for_all" id="all_<?php /* @escapeNotVerified */ echo $container['name'] ?>_<%- data.id %>" name="widget_instance[<%- data.id %>][<?php /* @escapeNotVerified */ echo $container['name'] ?>][for]" value="all" onclick="WidgetInstance.togglePageGroupChooser(this)" checked="checked" />&nbsp;'+
-                        '<label for="all_<?php /* @escapeNotVerified */ echo $container['name'] ?>_<%- data.id %>"><?php echo $block->escapeJs(__('All')) ?></label><br />'+
-                        '<input disabled="disabled" type="radio" class="radio for_specific" id="specific_<?php /* @escapeNotVerified */ echo $container['name'] ?>_<%- data.id %>" name="widget_instance[<%- data.id %>][<?php /* @escapeNotVerified */ echo $container['name'] ?>][for]" value="specific" onclick="WidgetInstance.togglePageGroupChooser(this)" />&nbsp;'+
-                        '<label for="specific_<?php /* @escapeNotVerified */ echo $container['name'] ?>_<%- data.id %>"><?php echo $block->escapeJs(__('Specific %1', $container['label'])) ?></label>'+
+                        '<input disabled="disabled" type="radio" class="radio for_all" id="all_<?php echo $block->escapeJs($container['name']) ?>_<%- data.id %>" name="widget_instance[<%- data.id %>][<?php echo $block->escapeJs($container['name']) ?>][for]" value="all" onclick="WidgetInstance.togglePageGroupChooser(this)" checked="checked" />&nbsp;'+
+                        '<label for="all_<?php echo $block->escapeJs($container['name']) ?>_<%- data.id %>"><?php echo $block->escapeJs(__('All')) ?></label><br />'+
+                        '<input disabled="disabled" type="radio" class="radio for_specific" id="specific_<?php echo $block->escapeJs($container['name']) ?>_<%- data.id %>" name="widget_instance[<%- data.id %>][<?php echo $block->escapeJs($container['name']) ?>][for]" value="specific" onclick="WidgetInstance.togglePageGroupChooser(this)" />&nbsp;'+
+                        '<label for="specific_<?php echo $block->escapeJs($container['name']) ?>_<%- data.id %>"><?php echo $block->escapeJs(__('Specific %1', $container['label'])) ?></label>'+
                     '</td>'+
                     '<td>'+
                         '<div class="block_reference_container">'+
@@ -71,16 +73,16 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
                 '</tr>'+
             '</tbody>'+
         '</table>'+
-        '<div class="no-display chooser_container" id="<?php /* @escapeNotVerified */ echo $container['name'] ?>_ids_<%- data.id %>">'+
-            '<input disabled="disabled" type="hidden" class="is_anchor_only" name="widget_instance[<%- data.id %>][<?php /* @escapeNotVerified */ echo $container['name'] ?>][is_anchor_only]" value="<?php /* @escapeNotVerified */ echo $container['is_anchor_only'] ?>" />'+
-            '<input disabled="disabled" type="hidden" class="product_type_id" name="widget_instance[<%- data.id %>][<?php /* @escapeNotVerified */ echo $container['name'] ?>][product_type_id]" value="<?php /* @escapeNotVerified */ echo $container['product_type_id'] ?>" />'+
+        '<div class="no-display chooser_container" id="<?php echo $block->escapeJs($container['name']) ?>_ids_<%- data.id %>">'+
+            '<input disabled="disabled" type="hidden" class="is_anchor_only" name="widget_instance[<%- data.id %>][<?php echo $block->escapeJs($container['name']) ?>][is_anchor_only]" value="<?php echo $block->escapeJs($container['is_anchor_only']) ?>" />'+
+            '<input disabled="disabled" type="hidden" class="product_type_id" name="widget_instance[<%- data.id %>][<?php echo $block->escapeJs($container['name']) ?>][product_type_id]" value="<?php echo $block->escapeJs($container['product_type_id']) ?>" />'+
             '<p>' +
-                '<input disabled="disabled" type="text" class="input-text entities" name="widget_instance[<%- data.id %>][<?php /* @escapeNotVerified */ echo $container['name'] ?>][entities]" value="<%- data.<?php /* @escapeNotVerified */ echo $container['name'] ?>_entities %>" readonly="readonly" />&nbsp;' +
-                '<a class="widget-option-chooser" href="javascript:void(0)" onclick="WidgetInstance.displayEntityChooser(\'<?php /* @escapeNotVerified */ echo $container['code'] ?>\', \'<?php /* @escapeNotVerified */ echo $container['name'] ?>_ids_<%- data.id %>\')"  title="<?php /* @escapeNotVerified */ echo $block->escapeJs(__('Open Chooser')) ?>">' +
-                    '<img src="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/rule_chooser_trigger.gif') ?>" alt="<?php /* @escapeNotVerified */ echo $block->escapeJs(__('Open Chooser')); ?>" />' +
+                '<input disabled="disabled" type="text" class="input-text entities" name="widget_instance[<%- data.id %>][<?php echo $block->escapeJs($container['name']) ?>][entities]" value="<%- data.<?php echo $block->escapeJs($container['name']) ?>_entities %>" readonly="readonly" />&nbsp;' +
+                '<a class="widget-option-chooser" href="javascript:void(0)" onclick="WidgetInstance.displayEntityChooser(\'<?php echo $block->escapeJs($container['code']) ?>\', \'<?php echo $block->escapeJs($container['name']) ?>_ids_<%- data.id %>\')"  title="<?php echo $block->escapeJs(__('Open Chooser')) ?>">' +
+                    '<img src="<?php echo $block->escapeUrl($block->getViewFileUrl('images/rule_chooser_trigger.gif')) ?>" alt="<?php echo $block->escapeJs(__('Open Chooser')); ?>" />' +
                 '</a>&nbsp;' +
-                '<a href="javascript:void(0)" onclick="WidgetInstance.hideEntityChooser(\'<?php /* @escapeNotVerified */ echo $container['name'] ?>_ids_<%- data.id %>\')" title="<?php /* @escapeNotVerified */ echo $block->escapeJs(__('Apply')); ?>">' +
-                    '<img src="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/rule_component_apply.gif') ?>" alt="<?php /* @escapeNotVerified */ echo $block->escapeJs(__('Apply')); ?>" />' +
+                '<a href="javascript:void(0)" onclick="WidgetInstance.hideEntityChooser(\'<?php echo $block->escapeJs($container['name']) ?>_ids_<%- data.id %>\')" title="<?php echo $block->escapeJs(__('Apply')); ?>">' +
+                    '<img src="<?php echo $block->escapeUrl($block->getViewFileUrl('images/rule_component_apply.gif')) ?>" alt="<?php echo $block->escapeJs(__('Apply')); ?>" />' +
                 '</a>' +
             '</p>'+
             '<div class="chooser"></div>'+
@@ -96,8 +98,8 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
         '<col width="200" />'+
         '<thead>'+
             '<tr>'+
-                '<th><label><?php /* @escapeNotVerified */ echo $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?php /* @escapeNotVerified */ echo $block->escapeJs(__('Template')) ?></label></th>'+
+                '<th><label><?php echo $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
+                '<th><label><?php echo $block->escapeJs(__('Template')) ?></label></th>'+
                 '<th>&nbsp;</th>'+
             '</tr>'+
         '</thead>'+
@@ -126,14 +128,14 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
         '<col width="200" />'+
         '<thead>'+
             '<tr>'+
-                '<th><label><?php /* @escapeNotVerified */ echo $block->escapeJs(__('Page')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?php /* @escapeNotVerified */ echo $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?php /* @escapeNotVerified */ echo $block->escapeJs(__('Template')) ?></label></th>'+
+                '<th><label><?php echo $block->escapeJs(__('Page')) ?> <span class="required">*</span></label></th>'+
+                '<th><label><?php echo $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
+                '<th><label><?php echo $block->escapeJs(__('Template')) ?></label></th>'+
             '</tr>'+
         '</thead>'+
         '<tbody>'+
             '<tr>'+
-                '<td><?php /* @escapeNotVerified */ echo $block->getLayoutsChooser() ?></td>'+
+                '<td><?php /* @noEscape */ echo $block->getLayoutsChooser() ?></td>'+
                 '<td>'+
                     '<div class="block_reference_container">'+
                         '<div class="block_reference"></div>'+
@@ -157,14 +159,14 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
         '<col width="200" />'+
         '<thead>'+
             '<tr>'+
-                '<th><label><?php /* @escapeNotVerified */ echo $block->escapeJs(__('Page')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?php /* @escapeNotVerified */ echo $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?php /* @escapeNotVerified */ echo $block->escapeJs(__('Template')) ?></label></th>'+
+                '<th><label><?php echo $block->escapeJs(__('Page')) ?> <span class="required">*</span></label></th>'+
+                '<th><label><?php echo $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
+                '<th><label><?php echo $block->escapeJs(__('Template')) ?></label></th>'+
             '</tr>'+
         '</thead>'+
         '<tbody>'+
             '<tr>'+
-                '<td><?php /* @escapeNotVerified */ echo $block->getPageLayoutsPageChooser() ?></td>'+
+                '<td><?php /* @noEscape */ echo $block->getPageLayoutsPageChooser() ?></td>'+
                 '<td>'+
                     '<div class="block_reference_container">'+
                         '<div class="block_reference"></div>'+
@@ -246,9 +248,9 @@ var WidgetInstance = {
                 forElm = pageGroup.down('input.for_'+data.for_value);
                 if (forElm) {
                     /**
-                    * IE browsers fix: remove default checked attribute in radio form element
-                    * to check others radio form elements in future
-                    */
+                     * IE browsers fix: remove default checked attribute in radio form element
+                     * to check others radio form elements in future
+                     */
                     pageGroup.down('input.for_all').defaultChecked = false;
                     forElm.defaultChecked = true;
                     forElm.checked = true;
@@ -332,10 +334,10 @@ var WidgetInstance = {
             additional = {};
         }
         if (type == 'categories') {
-            additional.url = '<?php /* @escapeNotVerified */ echo $block->getCategoriesChooserUrl() ?>';
+            additional.url = '<?php echo $block->escapeUrl($block->getCategoriesChooserUrl()) ?>';
             additional.post_parameters = $H({'is_anchor_only':$(chooser).down('input.is_anchor_only').value});
         } else if (type == 'products') {
-            additional.url = '<?php /* @escapeNotVerified */ echo $block->getProductsChooserUrl() ?>';
+            additional.url = '<?php echo $block->escapeUrl($block->getProductsChooserUrl()) ?>';
             additional.post_parameters = $H({'product_type_id':$(chooser).down('input.product_type_id').value});
         }
         if (chooser && additional) {
@@ -441,13 +443,13 @@ var WidgetInstance = {
             selected = '';
             parameters = {};
             if (type == 'block_reference') {
-                url = '<?php /* @escapeNotVerified */ echo $block->getBlockChooserUrl() ?>';
+                url = '<?php echo $block->escapeUrl($block->getBlockChooserUrl()) ?>';
                 if (additional.selectedBlock) {
                     selected = additional.selectedBlock;
                 }
                 parameters.layout = value;
             } else if (type == 'block_template') {
-                url = '<?php /* @escapeNotVerified */ echo $block->getTemplateChooserUrl() ?>';
+                url = '<?php echo $block->escapeUrl($block->getTemplateChooserUrl()) ?>';
                 if (additional.selectedTemplate) {
                     selected = additional.selectedTemplate;
                 }
@@ -485,7 +487,7 @@ window.WidgetInstance = WidgetInstance;
 
 jQuery(function(){
     <?php foreach ($block->getPageGroups() as $pageGroup): ?>
-        WidgetInstance.addPageGroup(<?php /* @escapeNotVerified */ echo Zend_Json::encode($pageGroup) ?>);
+        WidgetInstance.addPageGroup(<?php /* @noEscape */ echo Zend_Json::encode($pageGroup) ?>);
     <?php endforeach; ?>
     Event.observe(document, 'product:changed', function(event){
         WidgetInstance.checkProduct(event);
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php
index a5fa5f1dc5c34b865cd19602e12b780eb1af7d74..850dfa074ca085ba373d7cb2767c5d094d224bdb 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php
@@ -103,7 +103,25 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock
         $data = $this->getOptionsRenderCfg($item->getProduct()->getTypeId());
         $helper = $this->_helperPool->get($data['helper']);
 
-        return $helper->getOptions($item);
+        $options = $helper->getOptions($item);
+        foreach ($options as $index => $option) {
+            if (is_array($option) && array_key_exists('value', $option)) {
+                if (!(array_key_exists('has_html', $option) && $option['has_html'] === true)) {
+                    if (is_array($option['value'])) {
+                        foreach ($option['value'] as $key => $value) {
+                            $option['value'][$key] = $this->escapeHtml($value);
+                        }
+
+                    } else {
+                        $option['value'] = $this->escapeHtml($option['value']);
+                    }
+
+                }
+                $options[$index]['value'] = $option['value'];
+            }
+        }
+
+        return $options;
     }
 
     /**
diff --git a/app/code/Magento/Wishlist/Observer/AddToCart.php b/app/code/Magento/Wishlist/Observer/AddToCart.php
index 12eca7dc80aadaef22feb9b93050eef0a3d344e9..19e784ef369b998e9da4d5c934808370a84d6984 100644
--- a/app/code/Magento/Wishlist/Observer/AddToCart.php
+++ b/app/code/Magento/Wishlist/Observer/AddToCart.php
@@ -15,6 +15,7 @@ use Magento\Wishlist\Model\WishlistFactory;
 
 /**
  * Class AddToCart
+ * @deprecated 
  * @package Magento\Wishlist\Observer
  */
 class AddToCart implements ObserverInterface
diff --git a/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php b/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..3742a0b1dc6b654d7530c80359f90b49facd8e9d
--- /dev/null
+++ b/app/code/Magento/Wishlist/Test/Unit/Block/Customer/Wishlist/Item/OptionsTest.php
@@ -0,0 +1,143 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Wishlist\Test\Unit\Block\Customer\Wishlist\Item;
+
+use Magento\Wishlist\Block\Customer\Wishlist\Item\Options;
+
+class OptionsTest extends \PHPUnit_Framework_TestCase
+{
+    const TEST_PRODUCT_TYPE = 'testProductType';
+    const TEST_HELPER_CLASS_NAME = 'testHelperClass';
+
+    /**
+     * @var \Magento\Framework\Escaper|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $escaperMock;
+
+    /**
+     * @var \Magento\Framework\App\Http\Context|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $httpContextMock;
+
+    /**
+     * @var Options
+     */
+    private $block;
+
+    /**
+     * @var \Magento\Catalog\Helper\Product\ConfigurationPool|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $helperPoolMock;
+
+    /**
+     * @var \Magento\Wishlist\Model\Item|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $itemMock;
+
+    protected function setUp()
+    {
+        $productContextMock = $this->getMockBuilder(\Magento\Catalog\Block\Product\Context::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->escaperMock = $this->getMockBuilder(\Magento\Framework\Escaper::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $eventManagerMock = $this->getMockBuilder(\Magento\Framework\Event\ManagerInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $productContextMock->method('getEscaper')
+            ->willReturn($this->escaperMock);
+        $productContextMock->method('getEventManager')
+            ->willReturn($eventManagerMock);
+
+        $this->httpContextMock = $this->getMockBuilder(\Magento\Framework\App\Http\Context::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->helperPoolMock = $this->getMockBuilder(\Magento\Catalog\Helper\Product\ConfigurationPool::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->itemMock = $this->getMockBuilder(\Magento\Wishlist\Model\Item::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+        $this->block = $objectManager->getObject(
+            Options::class,
+            [
+                'context' => $productContextMock,
+                'httpContext' => $this->httpContextMock,
+                'helperPool' => $this->helperPoolMock,
+            ]
+        );
+        $this->block->setItem($this->itemMock);
+        $this->block->addOptionsRenderCfg(self::TEST_PRODUCT_TYPE, self::TEST_HELPER_CLASS_NAME);
+    }
+
+    /**
+     * @param array $options
+     * @param int $callNum
+     * @param array $expected
+     * @dataProvider getConfiguredOptionsDataProvider
+     */
+    public function testGetConfiguredOptions($options, $callNum, $expected)
+    {
+        $productMock = $this->getMockBuilder(\Magento\Catalog\Model\Product::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $productMock->expects($this->once())
+            ->method('getTypeId')
+            ->willReturn(self::TEST_PRODUCT_TYPE);
+        $this->itemMock->expects($this->once())
+            ->method('getProduct')
+            ->willReturn($productMock);
+
+        $helperMock = $this->getMockBuilder(\Magento\Catalog\Helper\Product\Configuration\ConfigurationInterface::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $helperMock->expects($this->once())
+            ->method('getOptions')
+            ->willReturn($options);
+        $this->helperPoolMock->expects($this->once())
+            ->method('get')
+            ->with(self::TEST_HELPER_CLASS_NAME)
+            ->willReturn($helperMock);
+
+        $this->escaperMock->expects($this->exactly($callNum))
+            ->method('escapeHtml')
+            ->willReturnArgument(0);
+
+        $this->assertEquals($expected, $this->block->getConfiguredOptions());
+    }
+
+    public function getConfiguredOptionsDataProvider()
+    {
+        return [
+            [
+                [
+                    [
+                        'label' => 'title',
+                        'value' => ['1 x name <span class="price">$15.00</span>'],
+                        'has_html' => true,
+                    ],
+                    ['label' => 'title', 'value' => 'value'],
+                    ['label' => 'title', 'value' => ['value']],
+                ],
+                2,
+                [
+                    [
+                        'label' => 'title',
+                        'value' => ['1 x name <span class="price">$15.00</span>'],
+                        'has_html' => true,
+                    ],
+                    ['label' => 'title', 'value' => 'value'],
+                    ['label' => 'title', 'value' => ['value']],
+                ],
+            ]
+        ];
+    }
+}
diff --git a/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml b/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml
index f075b5a2c33bdc6fec2e261a272302758b8ce71d..63377fcbbbea4b68c5d40467806e3abc53a86882 100644
--- a/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml
+++ b/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml
@@ -6,9 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
-/**
- * @var $block \Magento\Framework\View\Element\Template
- */
+/** @var \Magento\Framework\View\Element\Template $block */
 ?>
 <script>
     require([
@@ -23,13 +21,13 @@
                     if (!urlParams) {
                         urlParams = '';
                     }
-                    var url = <?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.url + '?ajax=true' + urlParams;
+                    var url = <?php echo $block->escapeJs($block->getJsObjectName()) ?>.url + '?ajax=true' + urlParams;
                     new Ajax.Updater(
-                        <?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.containerId,
+                        <?php echo $block->escapeJs($block->getJsObjectName()) ?>.containerId,
                         url,
                         {
                             parameters: {form_key: FORM_KEY},
-                            onComplete: <?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.initGrid.bind(<?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>),
+                            onComplete: <?php echo $block->escapeJs($block->getJsObjectName()) ?>.initGrid.bind(<?php echo $block->escapeJs($block->getJsObjectName()) ?>),
                         evalScripts:true
                 }
             );
@@ -65,8 +63,8 @@
     productConfigure.addListType(
         'wishlist',
         {
-            urlFetch: '<?php /* @escapeNotVerified */ echo $block->getUrl('customer/wishlist_product_composite_wishlist/configure') ?>',
-            urlConfirm: '<?php /* @escapeNotVerified */ echo $block->getUrl('customer/wishlist_product_composite_wishlist/update') ?>'
+            urlFetch: '<?php echo $block->escapeUrl($block->getUrl('customer/wishlist_product_composite_wishlist/configure')) ?>',
+            urlConfirm: '<?php echo $block->escapeUrl($block->getUrl('customer/wishlist_product_composite_wishlist/update')) ?>'
         }
     );
     //-->
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml
index bace2114dab856506c504a39ab899072a849c069..51dc0d7b3dbb9752c084d7284a7e34f73dea8d77 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/button/share.phtml
@@ -6,7 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
-/** @var $block \Magento\Wishlist\Block\Customer\Wishlist\Button */
+/** @var \Magento\Wishlist\Block\Customer\Wishlist\Button $block */
 ?>
 <?php if ($block->getWishlist()->getItemsCount() && $block->getWishlist()->getShared() < $block->getConfig()->getSharingEmailLimit()): ?>
     <button type="submit" name="save_and_share" title="<?php /* @escapeNotVerified */ echo __('Share Wish List') ?>" class="action share">
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml
index 3ae19be0339158c4d80c3811c85990f73ef86b75..3f2984eac3f080430d27d693a38b461bcc6c11b4 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/button/tocart.phtml
@@ -6,6 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Wishlist\Block\Customer\Wishlist\Button $block */
 ?>
 
 <?php if ($block->getWishlist()->getItemsCount() && $block->getWishlist()->isSalable()): ?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml b/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml
index 1d4125c486bcfdd52eef502070f754f181bd54a6..dfb24bde08b6387119443218122e3bae9657c0ee 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/button/update.phtml
@@ -6,6 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Wishlist\Block\Customer\Wishlist\Button $block */
 ?>
 
 <?php if ($block->getWishlist()->getItemsCount()): ?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/cart/item/renderer/actions/move_to_wishlist.phtml b/app/code/Magento/Wishlist/view/frontend/templates/cart/item/renderer/actions/move_to_wishlist.phtml
index 5c3c6e63e09792fda4a489f90827035b9b3f56d4..26d35fd8cfc4bdbcc01984b8991a76e988080bc4 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/cart/item/renderer/actions/move_to_wishlist.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/cart/item/renderer/actions/move_to_wishlist.phtml
@@ -6,11 +6,11 @@
 
 // @codingStandardsIgnoreFile
 
-/** @var $block \Magento\Wishlist\Block\Cart\Item\Renderer\Actions\MoveToWishlist */
+/** @var \Magento\Wishlist\Block\Cart\Item\Renderer\Actions\MoveToWishlist $block */
 ?>
 <?php if ($block->isAllowInCart() && $block->isProductVisibleInSiteVisibility()): ?>
     <a href="#"
-       data-post='<?php /* @escapeNotVerified */ echo $block->getMoveFromCartParams(); ?>'
+       data-post='<?php /* @noEscape */ echo $block->getMoveFromCartParams(); ?>'
        class="use-ajax action action-towishlist">
         <span><?php /* @escapeNotVerified */ echo __('Move to Wishlist'); ?></span>
     </a>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/list/addto/wishlist.phtml b/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/list/addto/wishlist.phtml
index 8e4f09645f14a4cef2ea244d086a9bb4a4d22691..4534fdc565321d9954b9d8e914b2d4bbd1322498 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/list/addto/wishlist.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/list/addto/wishlist.phtml
@@ -5,14 +5,15 @@
  */
 
 // @codingStandardsIgnoreFile
-/** @var $block Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo\Wishlist */
+
+/** @var Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo\Wishlist $block */
 ?>
 <?php if ($block->getWishlistHelper()->isAllow()): ?>
     <a href="#"
        class="action towishlist"
        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
-       data-post='<?php /* @escapeNotVerified */ echo $block->getAddToWishlistParams($block->getProduct()); ?>'
+       data-post='<?php /* @noEscape */ echo $block->getAddToWishlistParams($block->getProduct()); ?>'
        data-action="add-to-wishlist"
        role="button">
         <span><?php /* @escapeNotVerified */ echo __('Add to Wish List') ?></span>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/view/addto/wishlist.phtml b/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/view/addto/wishlist.phtml
index eebd6070ad86b01f413cf4b851b1e32e96986bf8..104d56f72dd93824890a8ef2a8e83044d5003b56 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/view/addto/wishlist.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/catalog/product/view/addto/wishlist.phtml
@@ -6,18 +6,18 @@
 
 // @codingStandardsIgnoreFile
 
-/** @var $block \Magento\Wishlist\Block\Catalog\Product\View\Addto\Wishlist */
+/** @var \Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist $block */
 ?>
 <?php if ($block->isWishListAllowed()) : ?>
     <a href="#"
        class="action towishlist"
-       data-post='<?php /* @escapeNotVerified */ echo $block->getWishlistParams(); ?>'
+       data-post='<?php /* @noEscape */ echo $block->getWishlistParams(); ?>'
        data-action="add-to-wishlist"><span><?php /* @escapeNotVerified */ echo __('Add to Wish List') ?></span></a>
 <?php endif; ?>
 <script type="text/x-magento-init">
     {
         "body": {
-            "addToWishlist": <?php /* @escapeNotVerified */ echo $block->getWishlistOptionsJson() ?>
+            "addToWishlist": <?php /* @noEscape */ echo $block->getWishlistOptionsJson() ?>
         }
     }
 </script>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml b/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml
index 8622a9ba50c40c3a2f203b127d41a80dd583ff98..003aa4db62da16414e3db6831707f3ab732c79a0 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/email/items.phtml
@@ -6,7 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var $block \Magento\Wishlist\Block\Share\Email\Items */
+/* @var \Magento\Wishlist\Block\Share\Email\Items $block */
 ?>
 <?php $l = $block->getWishlistItemsCount() ?>
 <div>
@@ -19,24 +19,24 @@
             <?php $_product = $item->getProduct(); ?>
             <td class="col product">
                 <p>
-                    <a href="<?= /* @escapeNotVerified */  $block->getProductUrl($_product) ?>">
-                        <?php echo $block->getImage($_product, 'product_small_image')->toHtml(); ?>
+                    <a href="<?= $block->escapeUrl($block->getProductUrl($_product)) ?>">
+                        <?php /* @noEscape */ echo $block->getImage($_product, 'product_small_image')->toHtml(); ?>
                     </a>
                 </p>
 
                 <p>
-                    <a href="<?= /* @escapeNotVerified */  $block->getProductUrl($_product) ?>">
+                    <a href="<?= $block->escapeUrl($block->getProductUrl($_product)) ?>">
                         <strong><?= $block->escapeHtml($_product->getName()) ?></strong>
                     </a>
                 </p>
                 <?php if ($block->hasDescription($item)): ?>
                     <p>
                         <strong><?= /* @escapeNotVerified */  __('Comment') ?>:</strong>
-                        <br/><?= /* @escapeNotVerified */  $block->getEscapedDescription($item) ?>
+                        <br/><?= /* @noEscape */  $block->getEscapedDescription($item) ?>
                     </p>
                 <?php endif; ?>
                 <p>
-                    <a href="<?= /* @escapeNotVerified */  $block->getProductUrl($_product) ?>">
+                    <a href="<?= $block->escapeUrl($block->getProductUrl($_product)) ?>">
                         <?= /* @escapeNotVerified */  __('View Product') ?>
                     </a>
                 </p>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml
index 2b92553811ed45e998a14064ebc3cbdda2b3d935..e9316c8a12e7ffaf7dd3060d0e493e159c2f5fe2 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/actions.phtml
@@ -6,14 +6,13 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var \Magento\Wishlist\Model\Item $item */
+/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Actions $block */
 ?>
-
 <?php $children = $block->getChildNames(); ?>
 <?php if ($children): ?>
-    <div class="<?php /* @escapeNotVerified */ echo $block->getCssClass() ?>">
+    <div class="<?php echo $block->escapeHtmlAttr($block->getCssClass()) ?>">
         <?php foreach ($children as $childName):?>
-            <?php /* @escapeNotVerified */ echo $block->getLayout()->renderElement($childName, false);?>
+            <?php /* @noEscape */ echo $block->getLayout()->renderElement($childName, false);?>
         <?php endforeach;?>
     </div>
 <?php endif; ?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml
index d4af3e4e7a127fec04869a94e730a92b1ec7fffc..1c041e678220a17f58b0a78d266c9da4c6ebfe72 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml
@@ -6,29 +6,30 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var $block \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Cart */
-/* @var \Magento\Wishlist\Model\Item $item */
+/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Cart $block */
+
+/** @var \Magento\Wishlist\Model\Item $item */
 $item = $block->getItem();
 $product = $item->getProduct();
 ?>
 <?php foreach ($block->getChildNames() as $childName): ?>
-    <?php /* @escapeNotVerified */ echo $block->getLayout()->renderElement($childName, false); ?>
+    <?php /* @noEscape */ echo $block->getLayout()->renderElement($childName, false); ?>
 <?php endforeach;?>
 <div class="box-tocart">
     <fieldset class="fieldset">
     <?php if ($item->canHaveQty() && $product->isVisibleInSiteVisibility()): ?>
         <div class="field qty">
-            <label class="label" for="qty[<?php /* @escapeNotVerified */ echo $item->getId() ?>]"><span><?php /* @escapeNotVerified */ echo __('Qty') ?></span></label>
+            <label class="label" for="qty[<?php echo $block->escapeHtmlAttr($item->getId()) ?>]"><span><?php /* @escapeNotVerified */ echo __('Qty') ?></span></label>
             <div class="control">
-                <input type="number" data-role="qty" id="qty[<?php /* @escapeNotVerified */ echo $item->getId() ?>]" class="input-text qty" data-validate="{'required-number':true,'validate-greater-than-zero':true}"
-               name="qty[<?php /* @escapeNotVerified */ echo $item->getId() ?>]" value="<?php /* @escapeNotVerified */ echo $block->getAddToCartQty($item) * 1 ?>">
+                <input type="number" data-role="qty" id="qty[<?php echo $block->escapeHtmlAttr($item->getId()) ?>]" class="input-text qty" data-validate="{'required-number':true,'validate-greater-than-zero':true}"
+               name="qty[<?php echo $block->escapeHtmlAttr($item->getId()) ?>]" value="<?php /* @noEscape */ echo (int)($block->getAddToCartQty($item) * 1) ?>">
             </div>
         </div>
     <?php endif; ?>
     <?php if ($product->isSaleable()): ?>
     <div class="product-item-actions">
         <div class="actions-primary">
-            <button type="button" data-role="tocart" data-post='<?php /* @escapeNotVerified */ echo $block->getItemAddToCartParams($item)?>' title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>" data-item-id="<?php /* @escapeNotVerified */ echo $item->getId()?>" class="action tocart primary">
+            <button type="button" data-role="tocart" data-post='<?php /* @noEscape */ echo $block->getItemAddToCartParams($item)?>' title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>" data-item-id="<?php echo $block->escapeHtmlAttr($item->getId())?>" class="action tocart primary">
                 <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
             </button>
         </div>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml
index f124a40b6f93a198cf3ab27fd013e6497fdc989d..66f56f66a07ed88c9446040b9b9ddfa2978bdce5 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml
@@ -6,16 +6,17 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var \Magento\Wishlist\Model\Item $item */
+/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Comment $block  */
 
+/* @var \Magento\Wishlist\Model\Item $item */
 $item = $block->getItem();
 ?>
 
 <div class="field comment-box">
-    <label class="label" for="product-item-comment-<?php /* @escapeNotVerified */ echo $item->getWishlistItemId() ?>">
+    <label class="label" for="product-item-comment-<?php echo $block->escapeHtmlAttr($item->getWishlistItemId()) ?>">
         <span><?php /* @escapeNotVerified */ echo __('Comment') ?></span>
     </label>
     <div class="control">
-        <textarea id="product-item-comment-<?php /* @escapeNotVerified */ echo $item->getWishlistItemId() ?>" placeholder="<?php /* @escapeNotVerified */ echo $this->helper('Magento\Wishlist\Helper\Data')->defaultCommentString() ?>" name="description[<?php /* @escapeNotVerified */ echo $item->getWishlistItemId() ?>]" title="<?php /* @escapeNotVerified */ echo __('Comment') ?>" class="product-item-comment"><?php echo($block->escapeHtml($item->getDescription())) ?></textarea>
+        <textarea id="product-item-comment-<?php echo $block->escapeHtmlAttr($item->getWishlistItemId()) ?>" placeholder="<?php /* @noEscape */ echo $this->helper('Magento\Wishlist\Helper\Data')->defaultCommentString() ?>" name="description[<?php echo $block->escapeHtmlAttr($item->getWishlistItemId()) ?>]" title="<?php /* @escapeNotVerified */ echo __('Comment') ?>" class="product-item-comment"><?php echo($block->escapeHtml($item->getDescription())) ?></textarea>
     </div>
 </div>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml
index 7a8a1bd20c5e9e607e6551217167249f5a03ffb8..d7e523931c064a4f4215b9adf9bf8df5619bf103 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/edit.phtml
@@ -6,13 +6,15 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var \Magento\Wishlist\Model\Item $item */
+/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Edit $block */
+
+/** @var \Magento\Wishlist\Model\Item $item */
 $item = $block->getItem();
 $product = $item->getProduct();
 ?>
 
 <?php if ($product->isVisibleInSiteVisibility()): ?>
-    <a class="action edit" href="<?php /* @escapeNotVerified */ echo $block->getItemConfigureUrl($item) ?>">
+    <a class="action edit" href="<?php echo $block->escapeUrl($block->getItemConfigureUrl($item)) ?>">
         <span><?php /* @escapeNotVerified */ echo __('Edit') ?></span>
     </a>
 <?php endif ?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml
index 77a6122499c89e26667d8d4a44ce39d6def05934..3aa663f30de092ba96c100b8ae0fe6e402dc867c 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/image.phtml
@@ -6,10 +6,12 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var \Magento\Wishlist\Model\Item $item */
+/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Image $block */
+
+/** @var \Magento\Wishlist\Model\Item $item */
 $item = $block->getItem();
 $product = $item->getProduct();
 ?>
-<a class="product-item-photo" href="<?php /* @escapeNotVerified */ echo $block->getProductUrl($item) ?>" title="<?php echo $block->escapeHtml($product->getName()) ?>">
+<a class="product-item-photo" href="<?php echo $block->escapeUrl($block->getProductUrl($item)) ?>" title="<?php echo $block->escapeHtmlAttr($product->getName()) ?>">
     <?php echo $block->getImage($product, 'wishlist_thumbnail')->toHtml(); ?>
 </a>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml
index 5a8cf4ba5b62b2b9e69561651214a82b15b3d380..6c8092383fe494bae7625e59c16d0e1e46e13b65 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/name.phtml
@@ -6,12 +6,14 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var \Magento\Wishlist\Model\Item $item */
+/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Info $block */
+
+/** @var \Magento\Wishlist\Model\Item $item */
 $item = $block->getItem();
 $product = $item->getProduct();
 ?>
 <strong class="product-item-name">
-    <a href="<?php /* @escapeNotVerified */ echo $block->getProductUrl($item) ?>" title="<?php echo $block->escapeHtml($product->getName()) ?>" class="product-item-link">
+    <a href="<?php echo $block->escapeUrl($block->getProductUrl($item)) ?>" title="<?php echo $block->escapeHtmlAttr($product->getName()) ?>" class="product-item-link">
         <?php echo $block->escapeHtml($product->getName()) ?>
     </a>
 </strong>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/price.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/price.phtml
index 860fae9fa09721dc1cb2302bb1bafcc658cd071c..94dfab4b34852f77f1ddae51e12dfe365bc7563a 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/price.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/price.phtml
@@ -6,9 +6,9 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var \Magento\Wishlist\Model\Item $item */
+/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Cart $block */
 ?>
 
 <?php foreach ($block->getChildNames() as $childName): ?>
-    <?php /* @escapeNotVerified */ echo $block->getLayout()->renderElement($childName, false); ?>
+    <?php /* @noEscape */ echo $block->getLayout()->renderElement($childName, false); ?>
 <?php endforeach;?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml
index 52e97260420cd050f71559affaa8a944cc58edad..50b61d614572f7175567c88bd0de8ffa74db8192 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/remove.phtml
@@ -6,8 +6,9 @@
 
 // @codingStandardsIgnoreFile
 
+/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Remove $block */
 ?>
 
-<a href="#" data-role="remove" data-post-remove='<?php /* @escapeNotVerified */ echo $block->getItemRemoveParams($block->getItem()); ?>' title="<?php /* @escapeNotVerified */ echo __('Remove Item') ?>" class="btn-remove action delete">
+<a href="#" data-role="remove" data-post-remove='<?php /* @noEscape */ echo $block->getItemRemoveParams($block->getItem()); ?>' title="<?php /* @escapeNotVerified */ echo __('Remove Item') ?>" class="btn-remove action delete">
     <span><?php /* @escapeNotVerified */ echo __('Remove item');?></span>
 </a>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml
index 53205b47f9758c01943340e5bf5b251b4f773627..26a28b2c3bd23f0b45ac0c368f05a8d1af8d36ea 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml
@@ -6,18 +6,19 @@
 
 // @codingStandardsIgnoreFile
 
+/** @var \Magento\Wishlist\Block\Item\configure $block */
 ?>
 
 <div class="product-addto-links" data-role="add-to-links">
     <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()) : ?>
-        <a href="#" data-post='<?php /* @escapeNotVerified */ echo $block->getUpdateParams(); ?>' class="action towishlist updated" data-action="add-to-wishlist">
+        <a href="#" data-post='<?php /* @noEscape */ echo $block->getUpdateParams(); ?>' class="action towishlist updated" data-action="add-to-wishlist">
             <span><?php /* @escapeNotVerified */ echo __('Update Wish List') ?></span>
         </a>
     <?php endif; ?>
     <?php $_product = $block->getProduct(); ?>
     <?php $_compareUrl = $this->helper('Magento\Catalog\Helper\Product\Compare')->getAddUrl($_product); ?>
     <?php if ($_compareUrl) : ?>
-        <a href="<?php /* @escapeNotVerified */ echo $_compareUrl ?>" class="action tocompare">
+        <a href="<?php echo $block->escapeUrl($_compareUrl) ?>" class="action tocompare">
             <span><?php /* @escapeNotVerified */ echo __('Add to Compare') ?></span>
         </a>
     <?php endif; ?>
@@ -25,7 +26,7 @@
 <script type="text/x-magento-init">
     {
         "body": {
-            "addToWishlist": <?php /* @escapeNotVerified */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWishlistOptions())?>
+            "addToWishlist": <?php /* @noEscape */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWishlistOptions())?>
         }
     }
 </script>
\ No newline at end of file
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto/wishlist.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto/wishlist.phtml
index 97f6987b194a91f14952175ac0d20983e4502c0a..9d721e9a50cfd50004bbbfca3988659a2856d76c 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto/wishlist.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto/wishlist.phtml
@@ -6,17 +6,17 @@
 
 // @codingStandardsIgnoreFile
 
-/** @var $block \Magento\Wishlist\Block\Catalog\Product\View\Addto\Wishlist */
+/** @var \Magento\Wishlist\Block\Item\Configure $block */
 ?>
 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()) : ?>
-    <a href="#" data-post='<?php /* @escapeNotVerified */ echo $block->getUpdateParams(); ?>' class="action towishlist updated" data-action="add-to-wishlist">
+    <a href="#" data-post='<?php /* @noEscape */ echo $block->getUpdateParams(); ?>' class="action towishlist updated" data-action="add-to-wishlist">
         <span><?php /* @escapeNotVerified */ echo __('Update Wish List') ?></span>
     </a>
 <?php endif; ?>
 <script type="text/x-magento-init">
     {
         "body": {
-            "addToWishlist": <?php /* @escapeNotVerified */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWishlistOptions())?>
+            "addToWishlist": <?php /* @noEscape */ echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWishlistOptions())?>
         }
     }
 </script>
\ No newline at end of file
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml
index fbb75c0f00a5609ffd5a5eaead607dc81c0dedfd..9850f8fa7ea21cbbb02acaff2ffb3a50c23b9514 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml
@@ -17,7 +17,7 @@ $columns = $block->getColumns();
     <?php if (count($block->getItems())): ?>
     <ol class="product-items">
         <?php foreach ($block->getItems() as $item): ?>
-        <?php /* @escapeNotVerified */ echo($iterator++ == 1) ? '<li data-row="product-item" class="product-item" id="item_' . $item->getId() . '">' : '</li><li class="product-item" id="item_' . $item->getId() . '">' ?>
+        <?php /* @noEscape */ echo($iterator++ == 1) ? '<li data-row="product-item" class="product-item" id="item_' . $block->escapeHtmlAttr($item->getId()) . '">' : '</li><li class="product-item" id="item_' . $block->escapeHtmlAttr($item->getId()) . '">' ?>
             <div class="product-item-info">
                 <?php foreach ($columns as $column): ?>
                     <?php $column->setItem($item); echo $column->toHtml($item);?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/link.phtml b/app/code/Magento/Wishlist/view/frontend/templates/link.phtml
index 5cfe81e6765ba89272813c680f469abd22f9e773..cc1e69980c2b92aa956b2bae0333507b6f57fa9a 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/link.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/link.phtml
@@ -6,10 +6,10 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var $block \Magento\Wishlist\Block\Link */
+/* @var \Magento\Wishlist\Block\Link $block */
 ?>
 <li class="link wishlist" data-bind="scope: 'wishlist'">
-    <a <?php /* @escapeNotVerified */ echo $block->getLinkAttributes() ?>><?php echo $block->escapeHtml($block->getLabel()) ?>
+    <a <?php /* @noEscape */ echo $block->getLinkAttributes() ?>><?php echo $block->escapeHtml($block->getLabel()) ?>
         <!-- ko if: wishlist().counter -->
         <span data-bind="text: wishlist().counter" class="counter qty"></span>
         <!-- /ko -->
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/messages/addProductSuccessMessage.phtml b/app/code/Magento/Wishlist/view/frontend/templates/messages/addProductSuccessMessage.phtml
index 254a1eb33feb4022740c88e7c0cdb25aa87a8be5..a040c2c8ca7953d558f9b9b2a6836d7250b3231f 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/messages/addProductSuccessMessage.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/messages/addProductSuccessMessage.phtml
@@ -7,4 +7,4 @@
 /** @var \Magento\Framework\View\Element\Template $block */
 ?>
 
-<?php /* @escapeVerified */ echo __('%1 has been added to your Wish List.', $block->escapeHtml($block->getData('product_name'))) ?> <?php /* @escapeNotVerified */ echo __('Click <a href="%1">here</a> to continue shopping.', $block->escapeUrl($block->getData('referer')));
+<?php /* @escapeNotVerified */ echo __('%1 has been added to your Wish List.', $block->escapeHtml($block->getData('product_name'))) ?> <?php /* @escapeNotVerified */ echo __('Click <a href="%1">here</a> to continue shopping.', $block->escapeUrl($block->getData('referer')));
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml b/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml
index a0e4c7342c0e3a3fc587e3e155cec9e209904083..8f1b5b3898d22e5c5fb357a8254527cc0c847fc3 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/options_list.phtml
@@ -6,7 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var $block \Magento\Wishlist\Block\Customer\Wishlist\Item\Options */
+/* @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Options $block */
 ?>
 
 <?php $options = $block->getOptionList(); ?>
@@ -20,9 +20,9 @@
           <dt class="label"><?php echo $block->escapeHtml($option['label']) ?></dt>
           <dd class="values">
               <?php if (is_array($option['value'])): ?>
-              <?php /* @escapeNotVerified */ echo nl2br(implode("\n", $option['value'])) ?>
+              <?php /* @noEscape */ echo nl2br(implode("\n", $option['value'])) ?>
               <?php else: ?>
-              <?php /* @escapeNotVerified */ echo $option['value'] ?>
+              <?php /* @noEscape */ echo $option['value'] ?>
               <?php endif; ?>
           </dd>
           <?php endforeach; ?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml b/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml
index f7290fe43f1ecc5a4386cd93308b548acacdda74..13685949a2971c8bdf5eeb12d7fbae637114f045 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml
@@ -6,12 +6,12 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var $block \Magento\Wishlist\Block\Rss\EmailLink */
+/* @var \Magento\Wishlist\Block\Rss\EmailLink $block */
 ?>
 <?php if ($block->getLink()): ?>
 <p style="font-size:12px; line-height:16px; margin:0 0 16px;">
     <?php echo __("RSS link to %1's wishlist", $block->escapeHtml($this->helper('Magento\Wishlist\Helper\Data')->getCustomerName())) ?>
     <br />
-    <a href="<?php /* @escapeNotVerified */ echo $block->getLink(); ?>"><?php /* @escapeNotVerified */ echo $block->getLink(); ?></a>
+    <a href="<?php echo $block->escapeUrl($block->getLink()); ?>"><?php echo $block->escapeUrl($block->getLink()); ?></a>
 </p>
 <?php endif; ?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml b/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml
index 30ef4edc393f7ecc3dc1a4c8d86e4921840d570c..1e297c4673d7005bf60c8bcabbb3f3f8a00d70c2 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/rss/wishlist.phtml
@@ -6,10 +6,10 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var $block \Magento\Wishlist\Block\Rss\Link */
+/** @var \Magento\Wishlist\Block\Rss\Link $block */
 ?>
 <?php if ($block->isRssAllowed() && $block->getLink() && $this->helper('Magento\Wishlist\Helper\Data')->getWishlist()->getItemsCount()): ?>
-    <a href="<?php /* @escapeNotVerified */ echo $block->getLink(); ?>" class="action rss wishlist">
+    <a href="<?php echo $block->escapeUrl($block->getLink()); ?>" class="action rss wishlist">
         <span><?php /* @escapeNotVerified */ echo __('RSS Feed') ?></span>
     </a>
 <?php endif; ?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml
index 3f6fc322b0e266a5de5154f12d73bdc32f53302e..201a5ef3722101b3978bb1f0ccbe1b8f6e6e9b63 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml
@@ -6,11 +6,11 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var $block \Magento\Wishlist\Block\Share\Wishlist */
+/** @var \Magento\Wishlist\Block\Share\Wishlist $block */
 ?>
 
 <?php if ($block->hasWishlistItems()): ?>
-    <form class="form shared wishlist" action="<?php /* @escapeNotVerified */ echo $block->getUrl('wishlist/index/update') ?>" method="post">
+    <form class="form shared wishlist" action="<?php echo $block->escapeUrl($block->getUrl('wishlist/index/update')) ?>" method="post">
         <div class="wishlist table-wrapper">
             <table class="table data wishlist" id="wishlist-table">
                 <caption class="table-caption"><?php /* @escapeNotVerified */ echo __('Wish List'); ?></caption>
@@ -29,11 +29,11 @@
                     ?>
                     <tr>
                         <td data-th="<?php echo $block->escapeHtml(__('Product')) ?>" class="col product">
-                            <a class="product photo" href="<?php /* @escapeNotVerified */ echo $block->getProductUrl($item) ?>" title="<?php echo $block->escapeHtml($product->getName()) ?>">
+                            <a class="product photo" href="<?php echo $block->escapeUrl($block->getProductUrl($item)) ?>" title="<?php echo $block->escapeHtmlAttr($product->getName()) ?>">
                                 <?php echo $block->getImage($product, 'customer_shared_wishlist')->toHtml(); ?>
                             </a>
                             <strong class="product name">
-                                <a href="<?php /* @escapeNotVerified */ echo $block->getProductUrl($item) ?>">
+                                <a href="<?php echo $block->escapeUrl($block->getProductUrl($item)) ?>">
                                     <?php echo $block->escapeHtml($product->getName()) ?>
                                 </a>
                             </strong>
@@ -47,19 +47,19 @@
                             ?>
                             <?php echo $block->getDetailsHtml($item) ?>
                         </td>
-                        <td data-th="<?php echo $block->escapeHtml(__('Comment')) ?>" class="col comment"><?php /* @escapeNotVerified */ echo $block->getEscapedDescription($item) ?></td>
+                        <td data-th="<?php echo $block->escapeHtml(__('Comment')) ?>" class="col comment"><?php /* @noEscape */ echo $block->getEscapedDescription($item) ?></td>
                         <td data-th="<?php echo $block->escapeHtml(__('Add to Cart')) ?>" class="col actions" data-role="add-to-links">
                             <?php if ($product->isSaleable()): ?>
                                 <?php if ($isVisibleProduct): ?>
                                     <button type="button"
                                             title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>"
-                                            data-post='<?php /* @escapeNotVerified */ echo $block->getSharedItemAddToCartUrl($item); ?>'
+                                            data-post='<?php /* @noEscape */ echo $block->getSharedItemAddToCartUrl($item); ?>'
                                             class="action tocart">
                                         <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
                                     </button>
                                 <?php endif ?>
                             <?php endif; ?>
-                            <a href="#" data-post='<?php /* @escapeNotVerified */ echo $block->getAddToWishlistParams($item); ?>'  onclick="location.assign(this.href); return false;" class="action towishlist" data-action="add-to-wishlist">
+                            <a href="#" data-post='<?php /* @noEscape */ echo $block->getAddToWishlistParams($item); ?>'  onclick="location.assign(this.href); return false;" class="action towishlist" data-action="add-to-wishlist">
                                 <span><?php /* @escapeNotVerified */ echo __('Add to Wish List') ?></span>
                             </a>
                         </td>
@@ -74,7 +74,7 @@
                 <div class="primary">
                     <button type="button"
                             title="<?php /* @escapeNotVerified */ echo __('Add All to Cart') ?>"
-                            data-post='<?php /* @escapeNotVerified */ echo $block->getSharedAddAllToCartUrl(); ?>'
+                            data-post='<?php echo $block->escapeUrl($block->getSharedAddAllToCartUrl()); ?>'
                             class="action tocart primary">
                         <span><?php /* @escapeNotVerified */ echo __('Add All to Cart') ?></span>
                     </button>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml b/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml
index 6ddf8974e220c3c50d8b34e3cadb3598129b1ce3..a21811b384f5b1fd8e9802038d28e99a2af6e29e 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/sharing.phtml
@@ -6,10 +6,10 @@
 
 // @codingStandardsIgnoreFile
 
-/** @var $block \Magento\Wishlist\Block\Customer\Sharing */
+/** @var \Magento\Wishlist\Block\Customer\Sharing $block */
 ?>
 <form class="form wishlist share"
-      action="<?php /* @escapeNotVerified */ echo $block->getSendUrl() ?>"
+      action="<?php echo $block->escapeUrl($block->getSendUrl()) ?>"
       id="form-validate"
       method="post"
       data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>"
@@ -20,13 +20,13 @@
         <div class="field emails required">
             <label class="label" for="email_address"><span><?php /* @escapeNotVerified */ echo __('Email addresses, separated by commas') ?></span></label>
             <div class="control">
-                <textarea name="emails" cols="60" rows="5" id="email_address" data-validate="{required:true,'validate-emails':true}"><?php /* @escapeNotVerified */ echo $block->getEnteredData('emails') ?></textarea>
+                <textarea name="emails" cols="60" rows="5" id="email_address" data-validate="{required:true,'validate-emails':true}"><?php /* @noEscape */ echo $block->getEnteredData('emails') ?></textarea>
             </div>
         </div>
         <div class="field text">
             <label class="label" for="message"><span><?php /* @escapeNotVerified */ echo __('Message') ?></span></label>
             <div class="control">
-                <textarea id="message" name="message" cols="60" rows="5"><?php /* @escapeNotVerified */ echo $block->getEnteredData('message') ?></textarea>
+                <textarea id="message" name="message" cols="60" rows="5"><?php /* @noEscape */ echo $block->getEnteredData('message') ?></textarea>
             </div>
         </div>
         <?php if ($this->helper('Magento\Wishlist\Helper\Rss')->isRssAllow()): ?>
@@ -47,7 +47,7 @@
             </button>
         </div>
         <div class="secondary">
-            <a class="action back" href="<?php /* @escapeNotVerified */ echo $block->getBackUrl(); ?>"><span><?php /* @escapeNotVerified */ echo __('Back')?></span></a>
+            <a class="action back" href="<?php echo $block->escapeUrl($block->getBackUrl()); ?>"><span><?php /* @escapeNotVerified */ echo __('Back')?></span></a>
         </div>
     </div>
 </form>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml b/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml
index 022c61ce8a2079e3ecfac8cf43bc6cd44ff533db..28e339162d5dece5639decfac6113d884b7bb3de 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml
@@ -6,7 +6,7 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var $block \Magento\Wishlist\Block\Customer\Sidebar */
+/** @var \Magento\Wishlist\Block\Customer\Sidebar $block */
 ?>
 <?php
 $wishlistHelper = $this->helper('Magento\Wishlist\Helper\Data');
@@ -14,7 +14,7 @@ $wishlistHelper = $this->helper('Magento\Wishlist\Helper\Data');
 <?php if ($wishlistHelper->isAllow()) : ?>
     <div class="block block-wishlist" data-bind="scope: 'wishlist'">
         <div class="block-title">
-            <strong role="heading" aria-level="2"><?php /* @escapeNotVerified */ echo $block->getTitle(); ?></strong>
+            <strong role="heading" aria-level="2"><?php echo $block->escapeHtml($block->getTitle()); ?></strong>
             <!-- ko if: wishlist().counter -->
             <span data-bind="text: wishlist().counter" class="counter"></span>
             <!-- /ko -->
@@ -61,7 +61,7 @@ $wishlistHelper = $this->helper('Magento\Wishlist\Helper\Data');
                 <div class="actions-toolbar no-display" data-bind="css: {'no-display': null}">
                     <div class="primary">
                         <a class="action details"
-                           href="<?php /* @escapeNotVerified */ echo $this->helper('Magento\Wishlist\Helper\Data')->getListUrl() ?>"
+                           href="<?php echo $block->escapeUrl($this->helper('Magento\Wishlist\Helper\Data')->getListUrl()) ?>"
                            title="<?php /* @escapeNotVerified */ echo __('Go to Wish List') ?>"><span><?php /* @escapeNotVerified */ echo __('Go to Wish List') ?></span></a>
                     </div>
                 </div>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/view.phtml b/app/code/Magento/Wishlist/view/frontend/templates/view.phtml
index 31217431a4ea44cda01b3ad3d0dc8d20b866a27c..748e1e4386cb80a7d05e81f67f35f82a5ea92025 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/view.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/view.phtml
@@ -6,17 +6,17 @@
 
 // @codingStandardsIgnoreFile
 
-/* @var $block \Magento\Wishlist\Block\Customer\Wishlist */
+/** @var \Magento\Wishlist\Block\Customer\Wishlist $block */
 ?>
 
 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()) : ?>
     <?php echo($block->getChildHtml('wishlist.rss.link'));?>
     <form class="form-wishlist-items" id="wishlist-view-form"
           data-mage-init='{"wishlist":{
-          "addToCartUrl":<?php /* @escapeNotVerified */ echo $block->getItemAddToCartParams("%item%");?>,
-          "addAllToCartUrl":<?php /* @escapeNotVerified */ echo $block->getAddAllToCartParams(); ?>,
+          "addToCartUrl":<?php /* @noEscape */ echo $block->getItemAddToCartParams("%item%");?>,
+          "addAllToCartUrl":<?php /* @noEscape */ echo $block->getAddAllToCartParams(); ?>,
           "commentString":""},
-          "validation": {}}' action="<?php /* @escapeNotVerified */ echo $block->getUrl('wishlist/index/update', ['wishlist_id' => $block->getWishlistInstance()->getId()]) ?>" method="post">
+          "validation": {}}' action="<?php echo $block->escapeUrl($block->getUrl('wishlist/index/update', ['wishlist_id' => $block->getWishlistInstance()->getId()])) ?>" method="post">
         <?php echo $block->getChildHtml('top'); ?>
         <?php if ($block->hasWishlistItems()): ?>
             <?php echo $block->getBlockHtml('formkey');?>
diff --git a/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/_setup.less b/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/_setup.less
index 6392ef60be9e6079a717d6735acf7de6d9e80081..23154cdb878757a88d8b6eceeb057e0e68f7cb0f 100644
--- a/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/_setup.less
+++ b/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/_setup.less
@@ -98,7 +98,7 @@
 //  Updater pages
 //@import '../../../updater/styles/less/pages/_common.less';
 //@import '../../../updater/styles/less/pages/_home.less';
-//@import '../../../updater/styles/less/pages/_component-manager.less';
+//@import '../../../updater/styles/less/pages/_extension-manager.less';
 //@import '../../../updater/styles/less/pages/_login.less';
 
 //
diff --git a/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/pages/_readiness-check.less b/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/pages/_readiness-check.less
index 6adc7eddae40b492dd80595f89d7468d305992bf..a52fb94cbbd2207d3737eea005b8c37b6020751f 100644
--- a/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/pages/_readiness-check.less
+++ b/app/design/adminhtml/Magento/backend/web/app/setup/styles/less/pages/_readiness-check.less
@@ -66,6 +66,64 @@
     margin-top: .3rem;
 }
 
+.extensions-information {
+    margin-bottom: 5rem;
+
+    h3 {
+        font-size: @base__font-size;
+        margin-bottom: 1.3rem;
+    }
+
+    .message {
+        margin-bottom: @indent__m;
+
+        &:before {
+            margin-top: 0;
+            top: 1.8rem;
+        }
+    }
+
+    .extensions-container {
+        padding: 0 @indent__base;
+    }
+
+    .list {
+        margin-bottom: @indent__s;
+
+        select {
+            cursor: pointer;
+
+            &:disabled {
+                background: @color-gray80;
+                cursor: default;
+            }
+        }
+
+        .extension-delete {
+            &:extend(.abs-action-delete all);
+            font-size: 1.7rem;
+            padding-top: 0;
+        }
+    }
+}
+
+.delete-modal-wrap {
+    padding: 0 4% @indent__xl;
+
+    h3 {
+        .lib-font-size(34);
+        display: inline-block;
+        font-weight: @font-weight__light;
+        margin: 0 0 @indent__base;
+        padding: .9rem 0 0;
+        vertical-align: top;
+    }
+
+    .actions {
+        padding: @indent__l 0 0;
+    }
+}
+
 //
 //  Mobile
 //  _____________________________________________
diff --git a/app/design/adminhtml/Magento/backend/web/app/updater/styles/less/components/_data-grid.less b/app/design/adminhtml/Magento/backend/web/app/updater/styles/less/components/_data-grid.less
index d8d63f09bd1a1161576b82abb37c044ca04aae79..9e2e7037b0e0ecc7bc8619b50eee5193bea874dd 100644
--- a/app/design/adminhtml/Magento/backend/web/app/updater/styles/less/components/_data-grid.less
+++ b/app/design/adminhtml/Magento/backend/web/app/updater/styles/less/components/_data-grid.less
@@ -112,6 +112,26 @@
             }
         }
     }
+
+    &._tooltip {
+        background: transparent;
+        margin: 0px 0px 8px 5px;
+
+        a {
+            width: 21px;
+
+            &:hover {
+                text-decoration: none;
+            }
+
+            &:before {
+                color: @color-tertiary;
+                content: @icon-help__content;
+                font-family: @icons__font-family;
+                font-size: @component-indicator__size;
+            }
+        }
+    }
 }
 
 .col-manager-item-name {
diff --git a/app/etc/di.xml b/app/etc/di.xml
index 8d7c4f4b71486cf2b2fb47ddcb0a7a3b070438cd..28f0d024c3ae234583e19b31800c10c950a5b42d 100755
--- a/app/etc/di.xml
+++ b/app/etc/di.xml
@@ -1209,4 +1209,14 @@
             </argument>
         </arguments>
     </type>
+    <preference for="Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor" />
+    <type name="Magento\Framework\Api\SearchCriteria\CollectionProcessor">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="filters" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor</item>
+                <item name="sorting" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor</item>
+                <item name="pagination" xsi:type="object">Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor</item>
+            </argument>
+        </arguments>
+    </type>
 </config>
diff --git a/auth.json.sample b/auth.json.sample
new file mode 100644
index 0000000000000000000000000000000000000000..81c8fd220eae218bf93712ea1b93cc3c4d8c872c
--- /dev/null
+++ b/auth.json.sample
@@ -0,0 +1,8 @@
+{
+   "http-basic": {
+      "repo.magento.com": {
+         "username": "<public-key>",
+         "password": "<private-key>"
+      }
+   }
+}
diff --git a/composer.lock b/composer.lock
index 77553a16419e85258357d8b76c9aaea8302d7e37..6fd73ef405c822bcb049709ec1150c6e51254e35 100644
--- a/composer.lock
+++ b/composer.lock
@@ -922,16 +922,16 @@
         },
         {
             "name": "phpseclib/phpseclib",
-            "version": "2.0.2",
+            "version": "2.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpseclib/phpseclib.git",
-                "reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb"
+                "reference": "41f85e9c2582b3f6d1b7d20395fb40c687ad5370"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/3d265f7c079f5b37d33475f996d7a383c5fc8aeb",
-                "reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb",
+                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/41f85e9c2582b3f6d1b7d20395fb40c687ad5370",
+                "reference": "41f85e9c2582b3f6d1b7d20395fb40c687ad5370",
                 "shasum": ""
             },
             "require": {
@@ -1010,7 +1010,7 @@
                 "x.509",
                 "x509"
             ],
-            "time": "2016-05-13 01:15:21"
+            "time": "2016-08-18 18:49:14"
         },
         {
             "name": "psr/log",
@@ -1381,16 +1381,16 @@
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v2.8.8",
+            "version": "v2.8.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher.git",
-                "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9"
+                "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b180b70439dca70049b6b9b7e21d75e6e5d7aca9",
-                "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/889983a79a043dfda68f38c38b6dba092dd49cd8",
+                "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8",
                 "shasum": ""
             },
             "require": {
@@ -1437,20 +1437,20 @@
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:29:29"
+            "time": "2016-07-28 16:56:28"
         },
         {
             "name": "symfony/filesystem",
-            "version": "v2.8.8",
+            "version": "v2.8.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
-                "reference": "7258ddd6f987053f21fa43d03430580ba54e6096"
+                "reference": "ab4c3f085c8f5a56536845bf985c4cef30bf75fd"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/filesystem/zipball/7258ddd6f987053f21fa43d03430580ba54e6096",
-                "reference": "7258ddd6f987053f21fa43d03430580ba54e6096",
+                "url": "https://api.github.com/repos/symfony/filesystem/zipball/ab4c3f085c8f5a56536845bf985c4cef30bf75fd",
+                "reference": "ab4c3f085c8f5a56536845bf985c4cef30bf75fd",
                 "shasum": ""
             },
             "require": {
@@ -1486,11 +1486,11 @@
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:31:50"
+            "time": "2016-07-20 05:41:28"
         },
         {
             "name": "symfony/finder",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/finder.git",
@@ -1539,16 +1539,16 @@
         },
         {
             "name": "symfony/process",
-            "version": "v2.8.8",
+            "version": "v2.8.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
-                "reference": "89f33c16796415ccfd8bb3cf8d520cbb79899bfe"
+                "reference": "d20332e43e8774ff8870b394f3dd6020cc7f8e0c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/process/zipball/89f33c16796415ccfd8bb3cf8d520cbb79899bfe",
-                "reference": "89f33c16796415ccfd8bb3cf8d520cbb79899bfe",
+                "url": "https://api.github.com/repos/symfony/process/zipball/d20332e43e8774ff8870b394f3dd6020cc7f8e0c",
+                "reference": "d20332e43e8774ff8870b394f3dd6020cc7f8e0c",
                 "shasum": ""
             },
             "require": {
@@ -1584,7 +1584,7 @@
             ],
             "description": "Symfony Process Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:29:29"
+            "time": "2016-07-28 11:13:19"
         },
         {
             "name": "tedivm/jshrink",
@@ -3233,35 +3233,35 @@
         },
         {
             "name": "fabpot/php-cs-fixer",
-            "version": "v1.11.5",
+            "version": "v1.12.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
-                "reference": "d3d08b76753092a232a4d8c3b94095ac06898719"
+                "reference": "ddac737e1c06a310a0bb4b3da755a094a31a916a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/d3d08b76753092a232a4d8c3b94095ac06898719",
-                "reference": "d3d08b76753092a232a4d8c3b94095ac06898719",
+                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/ddac737e1c06a310a0bb4b3da755a094a31a916a",
+                "reference": "ddac737e1c06a310a0bb4b3da755a094a31a916a",
                 "shasum": ""
             },
             "require": {
                 "ext-tokenizer": "*",
-                "php": ">=5.3.6",
-                "sebastian/diff": "~1.1",
-                "symfony/console": "~2.3|~3.0",
-                "symfony/event-dispatcher": "~2.1|~3.0",
-                "symfony/filesystem": "~2.1|~3.0",
-                "symfony/finder": "~2.1|~3.0",
-                "symfony/process": "~2.3|~3.0",
-                "symfony/stopwatch": "~2.5|~3.0"
+                "php": "^5.3.6 || >=7.0 <7.2",
+                "sebastian/diff": "^1.1",
+                "symfony/console": "^2.3 || ^3.0",
+                "symfony/event-dispatcher": "^2.1 || ^3.0",
+                "symfony/filesystem": "^2.1 || ^3.0",
+                "symfony/finder": "^2.1 || ^3.0",
+                "symfony/process": "^2.3 || ^3.0",
+                "symfony/stopwatch": "^2.5 || ^3.0"
             },
             "conflict": {
                 "hhvm": "<3.9"
             },
             "require-dev": {
                 "phpunit/phpunit": "^4.5|^5",
-                "satooshi/php-coveralls": "^0.7.1"
+                "satooshi/php-coveralls": "^1.0"
             },
             "bin": [
                 "php-cs-fixer"
@@ -3288,7 +3288,7 @@
             ],
             "description": "A tool to automatically fix PHP code style",
             "abandoned": "friendsofphp/php-cs-fixer",
-            "time": "2016-07-06 22:49:35"
+            "time": "2016-08-17 00:17:27"
         },
         {
             "name": "lusitanian/oauth",
@@ -3951,23 +3951,23 @@
         },
         {
             "name": "sebastian/environment",
-            "version": "1.3.7",
+            "version": "1.3.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/environment.git",
-                "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716"
+                "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716",
-                "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
+                "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.3.3"
+                "php": "^5.3.3 || ^7.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "~4.4"
+                "phpunit/phpunit": "^4.8 || ^5.0"
             },
             "type": "library",
             "extra": {
@@ -3997,7 +3997,7 @@
                 "environment",
                 "hhvm"
             ],
-            "time": "2016-05-17 03:18:57"
+            "time": "2016-08-18 05:49:44"
         },
         {
             "name": "sebastian/exporter",
@@ -4321,16 +4321,16 @@
         },
         {
             "name": "symfony/config",
-            "version": "v2.8.8",
+            "version": "v2.8.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/config.git",
-                "reference": "0926e69411eba491803dbafb9f1f233e2ced58d0"
+                "reference": "4275ef5b59f18959df0eee3991e9ca0cc208ffd4"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/config/zipball/0926e69411eba491803dbafb9f1f233e2ced58d0",
-                "reference": "0926e69411eba491803dbafb9f1f233e2ced58d0",
+                "url": "https://api.github.com/repos/symfony/config/zipball/4275ef5b59f18959df0eee3991e9ca0cc208ffd4",
+                "reference": "4275ef5b59f18959df0eee3991e9ca0cc208ffd4",
                 "shasum": ""
             },
             "require": {
@@ -4370,20 +4370,20 @@
             ],
             "description": "Symfony Config Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:31:50"
+            "time": "2016-07-26 08:02:44"
         },
         {
             "name": "symfony/dependency-injection",
-            "version": "v2.8.8",
+            "version": "v2.8.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/dependency-injection.git",
-                "reference": "2dd85de8216079d1360b2b14988cd5cdbbb49063"
+                "reference": "f2b5a00d176f6a201dc430375c0ef37706ea3d12"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/2dd85de8216079d1360b2b14988cd5cdbbb49063",
-                "reference": "2dd85de8216079d1360b2b14988cd5cdbbb49063",
+                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f2b5a00d176f6a201dc430375c0ef37706ea3d12",
+                "reference": "f2b5a00d176f6a201dc430375c0ef37706ea3d12",
                 "shasum": ""
             },
             "require": {
@@ -4395,7 +4395,7 @@
             "require-dev": {
                 "symfony/config": "~2.2|~3.0.0",
                 "symfony/expression-language": "~2.6|~3.0.0",
-                "symfony/yaml": "~2.1|~3.0.0"
+                "symfony/yaml": "~2.3.42|~2.7.14|~2.8.7|~3.0.7"
             },
             "suggest": {
                 "symfony/config": "",
@@ -4433,11 +4433,11 @@
             ],
             "description": "Symfony DependencyInjection Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:31:50"
+            "time": "2016-07-30 07:20:35"
         },
         {
             "name": "symfony/stopwatch",
-            "version": "v3.1.2",
+            "version": "v3.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/stopwatch.git",
@@ -4486,16 +4486,16 @@
         },
         {
             "name": "symfony/yaml",
-            "version": "v2.8.8",
+            "version": "v2.8.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
-                "reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8"
+                "reference": "0ceab136f43ed9d3e97b3eea32a7855dc50c121d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/yaml/zipball/dba4bb5846798cd12f32e2d8f3f35d77045773c8",
-                "reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/0ceab136f43ed9d3e97b3eea32a7855dc50c121d",
+                "reference": "0ceab136f43ed9d3e97b3eea32a7855dc50c121d",
                 "shasum": ""
             },
             "require": {
@@ -4531,7 +4531,7 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "https://symfony.com",
-            "time": "2016-06-29 05:29:29"
+            "time": "2016-07-17 09:06:15"
         },
         {
             "name": "theseer/fdomdocument",
diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryListTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryListTest.php
index e7d53148d8454bea5dceb33949eb6443f8c84a85..872ab5e6f7c19537c05e8ad701116494c213dac5 100644
--- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryListTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/CategoryListTest.php
@@ -28,6 +28,20 @@ class CategoryListTest extends WebapiAbstract
                                 'value' => 'Category 1',
                                 'condition_type' => 'eq',
                             ],
+                            [
+                                'field' => 'name',
+                                'value' => 'Category 1.1',
+                                'condition_type' => 'eq',
+                            ],
+                        ],
+                    ],
+                    [
+                        'filters' => [
+                            [
+                                'field' => 'level',
+                                'value' => 2,
+                                'condition_type' => 'eq',
+                            ],
                         ],
                     ],
                 ],
diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php
index ae6a0361abd0eefc798db2539d6ae30c56b5377c..f30c1bffa007546866cfd5c23ea24a3eefed42b7 100644
--- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php
@@ -6,15 +6,20 @@
 namespace Magento\Catalog\Api;
 
 use Magento\Catalog\Api\Data\ProductInterface;
-use Magento\Catalog\Helper\Product;
 use Magento\Store\Model\Store;
 use Magento\CatalogInventory\Api\Data\StockItemInterface;
 use Magento\Store\Model\Website;
+use Magento\TestFramework\Helper\Bootstrap;
 use Magento\TestFramework\TestCase\WebapiAbstract;
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
 use Magento\Framework\Webapi\Exception as HTTPExceptionCodes;
 
 /**
  * @magentoAppIsolation enabled
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class ProductRepositoryInterfaceTest extends WebapiAbstract
 {
@@ -299,7 +304,7 @@ class ProductRepositoryInterfaceTest extends WebapiAbstract
         $this->setExpectedException('Exception', 'Requested product doesn\'t exist');
 
         // Delete all with 'all' store code
-        $this->deleteProduct($sku, 'all');
+        $this->deleteProduct($sku);
         $this->getProduct($sku);
     }
 
@@ -681,6 +686,72 @@ class ProductRepositoryInterfaceTest extends WebapiAbstract
         $this->assertEquals('simple', $response['items'][0]['sku']);
     }
 
+    /**
+     * @magentoApiDataFixture Magento/Catalog/_files/products_for_search.php
+     */
+    public function testGetListWithMultipleFilterGroupsAndSortingAndPagination()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(ProductInterface::NAME)
+            ->setValue('search product 2')
+            ->create();
+        $filter2 = $filterBuilder->setField(ProductInterface::NAME)
+            ->setValue('search product 3')
+            ->create();
+        $filter3 = $filterBuilder->setField(ProductInterface::NAME)
+            ->setValue('search product 4')
+            ->create();
+        $filter4 = $filterBuilder->setField(ProductInterface::NAME)
+            ->setValue('search product 5')
+            ->create();
+        $filter5 = $filterBuilder->setField(ProductInterface::PRICE)
+            ->setValue(35)
+            ->setConditionType('lt')
+            ->create();
+        $filter6 = $filterBuilder->setField('category_id')
+            ->setValue(333)
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField('meta_title')->setDirection(SortOrder::SORT_DESC)->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3, $filter4]);
+        $searchCriteriaBuilder->addFilters([$filter5]);
+        $searchCriteriaBuilder->addFilters([$filter6]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchData = $searchCriteriaBuilder->create()->__toArray();
+        $requestData = ['searchCriteria' => $searchData];
+        $serviceInfo = [
+            'rest' => [
+                'resourcePath' => self::RESOURCE_PATH . '?' . http_build_query($requestData),
+                'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET,
+            ],
+            'soap' => [
+                'service' => self::SERVICE_NAME,
+                'serviceVersion' => self::SERVICE_VERSION,
+                'operation' => self::SERVICE_NAME . 'GetList',
+            ],
+        ];
+
+        $searchResult = $this->_webApiCall($serviceInfo, $requestData);
+
+        $this->assertEquals(3, $searchResult['total_count']);
+        $this->assertEquals(1, count($searchResult['items']));
+        $this->assertEquals('search_product_4', $searchResult['items'][0][ProductInterface::SKU]);
+    }
+
     /**
      * @param $customAttributes
      * @return array
diff --git a/dev/tests/api-functional/testsuite/Magento/Cms/Api/BlockRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Cms/Api/BlockRepositoryTest.php
index 5dadcf92feef33e990dfec5ef824f430e3a90bfe..dafb3746d8d631b4b1da70efd3ee8e3696218206 100644
--- a/dev/tests/api-functional/testsuite/Magento/Cms/Api/BlockRepositoryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Cms/Api/BlockRepositoryTest.php
@@ -6,6 +6,10 @@
 namespace Magento\Cms\Api;
 
 use Magento\Cms\Api\Data\BlockInterface;
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
 use Magento\TestFramework\Helper\Bootstrap;
 use Magento\TestFramework\TestCase\WebapiAbstract;
 
@@ -216,24 +220,45 @@ class BlockRepositoryTest extends WebapiAbstract
     {
         $cmsBlocks = $this->prepareCmsBlocks();
 
-        $filterBuilder = Bootstrap::getObjectManager()->create(\Magento\Framework\Api\FilterBuilder::class);
-        /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder */
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
         $searchCriteriaBuilder = Bootstrap::getObjectManager()
-            ->create(\Magento\Framework\Api\SearchCriteriaBuilder::class);
-        $filterIdentifier = $filterBuilder
+            ->create(SearchCriteriaBuilder::class);
+
+        $filter1 = $filterBuilder
             ->setField(BlockInterface::IDENTIFIER)
             ->setValue($cmsBlocks['first']->getIdentifier())
             ->create();
-        $searchCriteriaBuilder->addFilters([$filterIdentifier]);
-        $filterTitle = $filterBuilder
+        $filter2 = $filterBuilder
+            ->setField(BlockInterface::IDENTIFIER)
+            ->setValue($cmsBlocks['third']->getIdentifier())
+            ->create();
+        $filter3 = $filterBuilder
             ->setField(BlockInterface::TITLE)
             ->setValue($cmsBlocks['second']->getTitle())
             ->create();
-        $filterStatus = $filterBuilder
+        $filter4 = $filterBuilder
             ->setField(BlockInterface::IS_ACTIVE)
-            ->setValue($cmsBlocks['first']->isActive())
+            ->setValue(true)
             ->create();
-        $searchCriteriaBuilder->addFilters([$filterTitle, $filterStatus]);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $searchCriteriaBuilder->addFilters([$filter3, $filter4]);
+
+        /** @var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(BlockInterface::IDENTIFIER)
+            ->setDirection(SortOrder::SORT_ASC)
+            ->create();
+
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(1);
+        $searchCriteriaBuilder->setCurrentPage(2);
 
         $searchData = $searchCriteriaBuilder->create()->__toArray();
         $requestData = ['searchCriteria' => $searchData];
@@ -250,10 +275,11 @@ class BlockRepositoryTest extends WebapiAbstract
         ];
 
         $searchResult = $this->_webApiCall($serviceInfo, $requestData);
-        $this->assertEquals(1, $searchResult['total_count']);
+        $this->assertEquals(2, $searchResult['total_count']);
+        $this->assertEquals(1, count($searchResult['items']));
         $this->assertEquals(
             $searchResult['items'][0][BlockInterface::IDENTIFIER],
-            $cmsBlocks['first']->getIdentifier()
+            $cmsBlocks['third']->getIdentifier()
         );
     }
 
@@ -263,13 +289,19 @@ class BlockRepositoryTest extends WebapiAbstract
     private function prepareCmsBlocks()
     {
         $result = [];
+
         $blocksData['first'][BlockInterface::TITLE] = 'Block title 1';
         $blocksData['first'][BlockInterface::IDENTIFIER] = 'block-title-1' . uniqid();
         $blocksData['first'][BlockInterface::IS_ACTIVE] = true;
+
         $blocksData['second'][BlockInterface::TITLE] = 'Block title 2';
         $blocksData['second'][BlockInterface::IDENTIFIER] = 'block-title-2' . uniqid();
         $blocksData['second'][BlockInterface::IS_ACTIVE] = false;
 
+        $blocksData['third'][BlockInterface::TITLE] = 'Block title 3';
+        $blocksData['third'][BlockInterface::IDENTIFIER] = 'block-title-3' . uniqid();
+        $blocksData['third'][BlockInterface::IS_ACTIVE] = true;
+
         foreach ($blocksData as $key => $blockData) {
             /** @var  \Magento\Cms\Api\Data\BlockInterface $blockDataObject */
             $blockDataObject = $this->blockFactory->create();
diff --git a/dev/tests/api-functional/testsuite/Magento/Cms/Api/PageRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Cms/Api/PageRepositoryTest.php
index 26c7a907b507a52dcbd2c3df04fb63b25888b9ef..98c1b91c265ea2b72a72f5efd3f1ffbece611eea 100644
--- a/dev/tests/api-functional/testsuite/Magento/Cms/Api/PageRepositoryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Cms/Api/PageRepositoryTest.php
@@ -6,6 +6,10 @@
 namespace Magento\Cms\Api;
 
 use Magento\Cms\Api\Data\PageInterface;
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
 use Magento\TestFramework\Helper\Bootstrap;
 use Magento\TestFramework\TestCase\WebapiAbstract;
 
@@ -215,24 +219,47 @@ class PageRepositoryTest extends WebapiAbstract
     {
         $cmsPages = $this->prepareCmsPages();
 
-        $filterBuilder = Bootstrap::getObjectManager()->create(\Magento\Framework\Api\FilterBuilder::class);
-        /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder */
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
         $searchCriteriaBuilder = Bootstrap::getObjectManager()
-            ->create(\Magento\Framework\Api\SearchCriteriaBuilder::class);
-        $filterIdentifier = $filterBuilder
+            ->create(SearchCriteriaBuilder::class);
+
+        $filter1 = $filterBuilder
             ->setField(PageInterface::IDENTIFIER)
             ->setValue($cmsPages['first']->getIdentifier())
             ->create();
-        $searchCriteriaBuilder->addFilters([$filterIdentifier]);
-        $filterTitle = $filterBuilder
+        $filter2 = $filterBuilder
+            ->setField(PageInterface::IDENTIFIER)
+            ->setValue($cmsPages['third']->getIdentifier())
+            ->create();
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+
+        $filter3 = $filterBuilder
             ->setField(PageInterface::TITLE)
             ->setValue($cmsPages['second']->getTitle())
             ->create();
-        $filterStatus = $filterBuilder
+        $filter4 = $filterBuilder
             ->setField(PageInterface::IS_ACTIVE)
-            ->setValue($cmsPages['first']->isActive())
+            ->setValue(true)
+            ->create();
+
+        $searchCriteriaBuilder->addFilters([$filter3, $filter4]);
+
+        /** @var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(PageInterface::IDENTIFIER)
+            ->setDirection(SortOrder::SORT_ASC)
             ->create();
-        $searchCriteriaBuilder->addFilters([$filterTitle, $filterStatus]);
+
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(1);
+        $searchCriteriaBuilder->setCurrentPage(2);
 
         $searchData = $searchCriteriaBuilder->create()->__toArray();
         $requestData = ['searchCriteria' => $searchData];
@@ -249,8 +276,12 @@ class PageRepositoryTest extends WebapiAbstract
         ];
 
         $searchResult = $this->_webApiCall($serviceInfo, $requestData);
-        $this->assertEquals(1, $searchResult['total_count']);
-        $this->assertEquals($searchResult['items'][0][PageInterface::IDENTIFIER], $cmsPages['first']->getIdentifier());
+        $this->assertEquals(2, $searchResult['total_count']);
+        $this->assertEquals(1, count($searchResult['items']));
+        $this->assertEquals(
+            $searchResult['items'][0][PageInterface::IDENTIFIER],
+            $cmsPages['third']->getIdentifier()
+        );
     }
 
     /**
@@ -259,13 +290,19 @@ class PageRepositoryTest extends WebapiAbstract
     private function prepareCmsPages()
     {
         $result = [];
+
         $pagesData['first'][PageInterface::TITLE] = 'Page title 1';
         $pagesData['first'][PageInterface::IDENTIFIER] = 'page-title-1' . uniqid();
         $pagesData['first'][PageInterface::IS_ACTIVE] = true;
+
         $pagesData['second'][PageInterface::TITLE] = 'Page title 2';
         $pagesData['second'][PageInterface::IDENTIFIER] = 'page-title-2' . uniqid();
         $pagesData['second'][PageInterface::IS_ACTIVE] = false;
 
+        $pagesData['third'][PageInterface::TITLE] = 'Page title 3';
+        $pagesData['third'][PageInterface::IDENTIFIER] = 'page-title-3' . uniqid();
+        $pagesData['third'][PageInterface::IS_ACTIVE] = true;
+
         foreach ($pagesData as $key => $pageData) {
             /** @var  \Magento\Cms\Api\Data\PageInterface $pageDataObject */
             $pageDataObject = $this->pageFactory->create();
diff --git a/dev/tests/api-functional/testsuite/Magento/Customer/Api/GroupRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Customer/Api/GroupRepositoryTest.php
index ff23f0db249095236783496302e9d31f66139994..43b63dc97f26f5339e0682a06db472f002384856 100644
--- a/dev/tests/api-functional/testsuite/Magento/Customer/Api/GroupRepositoryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Customer/Api/GroupRepositoryTest.php
@@ -6,15 +6,22 @@
 
 namespace Magento\Customer\Api;
 
+use Magento\Customer\Api\Data\GroupInterface;
 use Magento\Customer\Model\Data\Group as CustomerGroup;
 use Magento\Customer\Model\GroupRegistry;
 use Magento\Customer\Model\ResourceModel\GroupRepository;
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\TestFramework\Helper\Bootstrap;
 use Magento\TestFramework\TestCase\WebapiAbstract;
 
 /**
  * Class GroupRepositoryTest
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class GroupRepositoryTest extends WebapiAbstract
 {
@@ -923,7 +930,7 @@ class GroupRepositoryTest extends WebapiAbstract
     public function testSearchGroups($filterField, $filterValue, $expectedResult)
     {
         $filterBuilder = Bootstrap::getObjectManager()->create(\Magento\Framework\Api\FilterBuilder::class);
-        /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder */
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
         $searchCriteriaBuilder =  Bootstrap::getObjectManager()
             ->create(\Magento\Framework\Api\SearchCriteriaBuilder::class);
         $filter = $filterBuilder
@@ -958,6 +965,59 @@ class GroupRepositoryTest extends WebapiAbstract
         }
     }
 
+    public function testSearchGroupsWithMultipleFilterGroupsAndSorting()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(GroupInterface::CODE)
+            ->setValue('General')
+            ->create();
+        $filter2 = $filterBuilder->setField(GroupInterface::CODE)
+            ->setValue('Retailer')
+            ->create();
+        $filter3 = $filterBuilder->setField(GroupInterface::CODE)
+            ->setValue('Wholesale')
+            ->create();
+        $filter4 = $filterBuilder->setField(GroupInterface::ID)
+            ->setValue(1)
+            ->setConditionType('gt')
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(GroupInterface::CODE)->setDirection(SortOrder::SORT_ASC)->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3]);
+        $searchCriteriaBuilder->addFilters([$filter4]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchData = $searchCriteriaBuilder->create()->__toArray();
+        $requestData = ['searchCriteria' => $searchData];
+        $serviceInfo = [
+            'rest' => [
+                'resourcePath' => self::RESOURCE_PATH . "/search" . '?' . http_build_query($requestData),
+                'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET,
+            ],
+            'soap' => [
+                'service' => self::SERVICE_NAME,
+                'serviceVersion' => self::SERVICE_VERSION,
+                'operation' => 'customerGroupRepositoryV1GetList',
+            ],
+        ];
+
+        $searchResult = $this->_webApiCall($serviceInfo, $requestData);
+
+        $this->assertEquals(2, $searchResult['total_count']);
+        $this->assertEquals(3, $searchResult['items'][0][GroupInterface::ID]);
+        $this->assertEquals(2, $searchResult['items'][1][GroupInterface::ID]);
+    }
+
     /**
      * Test search customer group using GET
      *
@@ -971,7 +1031,7 @@ class GroupRepositoryTest extends WebapiAbstract
     {
         $this->_markTestAsRestOnly('SOAP is covered in ');
         $filterBuilder = Bootstrap::getObjectManager()->create(\Magento\Framework\Api\FilterBuilder::class);
-        /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder */
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
         $searchCriteriaBuilder =  Bootstrap::getObjectManager()
             ->create(\Magento\Framework\Api\SearchCriteriaBuilder::class);
         $filter = $filterBuilder
diff --git a/dev/tests/api-functional/testsuite/Magento/Eav/Api/AttributeSetRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Eav/Api/AttributeSetRepositoryTest.php
index 4de337a1f5747aa7b00bbec8d2d7c80de3abfd29..69f3b0d5f810cf2b9fce228120de26efc64238b7 100644
--- a/dev/tests/api-functional/testsuite/Magento/Eav/Api/AttributeSetRepositoryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Eav/Api/AttributeSetRepositoryTest.php
@@ -5,6 +5,11 @@
  */
 namespace Magento\Eav\Api;
 
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\TestFramework\Helper\Bootstrap;
 use Magento\TestFramework\TestCase\WebapiAbstract;
 
 class AttributeSetRepositoryTest extends WebapiAbstract
@@ -139,7 +144,7 @@ class AttributeSetRepositoryTest extends WebapiAbstract
      */
     public function testDeleteByIdDefaultAttributeSet()
     {
-        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $objectManager = Bootstrap::getObjectManager();
         /** @var \Magento\Eav\Model\Config */
         $eavConfig = $objectManager->create(\Magento\Eav\Model\Config::class);
 
@@ -191,31 +196,54 @@ class AttributeSetRepositoryTest extends WebapiAbstract
     }
 
     /**
-     * @magentoApiDataFixture Magento/Eav/_files/empty_attribute_set.php
+     * @magentoApiDataFixture Magento/Eav/_files/attribute_set_for_search.php
      */
     public function testGetList()
     {
-        $searchCriteria = [
-            'searchCriteria' => [
-                'filter_groups' => [
-                    [
-                        'filters' => [
-                            [
-                                'field' => 'entity_type_code',
-                                'value' => 'catalog_product',
-                                'condition_type' => 'eq',
-                            ],
-                        ],
-                    ],
-                ],
-                'current_page' => 1,
-                'page_size' => 2,
-            ],
-        ];
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder = Bootstrap::getObjectManager()
+            ->create(SearchCriteriaBuilder::class);
+
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder
+            ->setField('entity_type_code')
+            ->setValue('catalog_product')
+            ->create();
+        $filter2 = $filterBuilder
+            ->setField('sort_order')
+            ->setValue(200)
+            ->setConditionType('gteq')
+            ->create();
+        $filter3 = $filterBuilder
+            ->setField('sort_order')
+            ->setValue(300)
+            ->setConditionType('lteq')
+            ->create();
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $searchCriteriaBuilder->addFilters([$filter3]);
+
+        /** @var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField('sort_order')
+            ->setDirection(SortOrder::SORT_ASC)
+            ->create();
+
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(1);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchData = $searchCriteriaBuilder->create()->__toArray();
+        $requestData = ['searchCriteria' => $searchData];
 
         $serviceInfo = [
             'rest' => [
-                'resourcePath' => '/V1/eav/attribute-sets/list' . '?' . http_build_query($searchCriteria),
+                'resourcePath' => '/V1/eav/attribute-sets/list' . '?' . http_build_query($requestData),
                 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET,
             ],
             'soap' => [
@@ -225,18 +253,14 @@ class AttributeSetRepositoryTest extends WebapiAbstract
             ],
         ];
 
-        $response = $this->_webApiCall($serviceInfo, $searchCriteria);
-
-        $this->assertArrayHasKey('search_criteria', $response);
-        $this->assertArrayHasKey('total_count', $response);
-        $this->assertArrayHasKey('items', $response);
-
-        $this->assertEquals($searchCriteria['searchCriteria'], $response['search_criteria']);
-        $this->assertTrue($response['total_count'] > 0);
-        $this->assertTrue(count($response['items']) > 0);
+        $searchResult = $this->_webApiCall($serviceInfo, $requestData);
 
-        $this->assertNotNull($response['items'][0]['attribute_set_id']);
-        $this->assertNotNull($response['items'][0]['attribute_set_name']);
+        $this->assertEquals(2, $searchResult['total_count']);
+        $this->assertEquals(1, count($searchResult['items']));
+        $this->assertEquals(
+            $searchResult['items'][0]['attribute_set_name'],
+            'attribute_set_3_for_search'
+        );
     }
 
     /**
@@ -248,7 +272,7 @@ class AttributeSetRepositoryTest extends WebapiAbstract
      */
     protected function getAttributeSetByName($attributeSetName)
     {
-        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $objectManager = Bootstrap::getObjectManager();
         /** @var \Magento\Eav\Model\Entity\Attribute\Set $attributeSet */
         $attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
             ->load($attributeSetName, 'attribute_set_name');
diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoListTest.php
index fdf72821de07d125c2184a4d0075c54f7cd04333..6c2a6567db8b46a687d8251bec8b1dc7e2b8e67b 100644
--- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoListTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoListTest.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Sales\Service\V1;
 
+use Magento\Framework\Api\SortOrderBuilder;
 use Magento\TestFramework\Helper\Bootstrap;
 use Magento\TestFramework\TestCase\WebapiAbstract;
 
@@ -44,10 +45,14 @@ class CreditmemoListTest extends WebapiAbstract
     /**
      * Test creditmemo list service
      *
-     * @magentoApiDataFixture Magento/Sales/_files/creditmemo_with_list.php
+     * @magentoApiDataFixture Magento/Sales/_files/creditmemo_list.php
      */
     public function testCreditmemoList()
     {
+        /** @var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = $this->objectManager->get(
+            SortOrderBuilder::class
+        );
         /** @var $searchCriteriaBuilder  \Magento\Framework\Api\SearchCriteriaBuilder */
         $searchCriteriaBuilder = $this->objectManager->create(
             \Magento\Framework\Api\SearchCriteriaBuilder::class
@@ -57,16 +62,29 @@ class CreditmemoListTest extends WebapiAbstract
         $filterBuilder = $this->objectManager->create(
             \Magento\Framework\Api\FilterBuilder::class
         );
+        $stateFilter = $filterBuilder
+            ->setField('state')
+            ->setValue((string)\Magento\Sales\Model\Order\Creditmemo::STATE_OPEN)
+            ->setConditionType('eq')
+            ->create();
+        $incrementFilter = $filterBuilder
+            ->setField('increment_id')
+            ->setValue('456')
+            ->setConditionType('eq')
+            ->create();
+        $zeroStatusFilter = $filterBuilder
+            ->setField('creditmemo_status')
+            ->setValue('0')
+            ->setConditionType('eq')
+            ->create();
+        $sortOrder = $sortOrderBuilder
+            ->setField('grand_total')
+            ->setDirection('ASC')
+            ->create();
+        $searchCriteriaBuilder->addFilters([$stateFilter]);
+        $searchCriteriaBuilder->addFilters([$incrementFilter, $zeroStatusFilter]);
+        $searchCriteriaBuilder->addSortOrder($sortOrder);
 
-        $searchCriteriaBuilder->addFilters(
-            [
-                $filterBuilder
-                    ->setField('state')
-                    ->setValue((string)\Magento\Sales\Model\Order\Creditmemo::STATE_OPEN)
-                    ->setConditionType('eq')
-                    ->create(),
-            ]
-        );
         $searchData = $searchCriteriaBuilder->create()->__toArray();
 
         $requestData = ['searchCriteria' => $searchData];
@@ -85,8 +103,10 @@ class CreditmemoListTest extends WebapiAbstract
         $result = $this->_webApiCall($serviceInfo, $requestData);
         // TODO Test fails, due to the inability of the framework API to handle data collection
         $this->assertArrayHasKey('items', $result);
-        $this->assertCount(1, $result['items']);
+        $this->assertCount(2, $result['items']);
         $this->assertArrayHasKey('search_criteria', $result);
+        $this->assertEquals('789', $result['items'][0]['increment_id']);
+        $this->assertEquals('456', $result['items'][1]['increment_id']);
         $this->assertEquals($searchData, $result['search_criteria']);
     }
 }
diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceListTest.php
index 3624029740f89211cb4d78e2440e35f79e25fa68..f9e6006ebe273279bd77238a6cc500e0898815cd 100644
--- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceListTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceListTest.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Sales\Service\V1;
 
+use Magento\Framework\Api\SortOrderBuilder;
 use Magento\TestFramework\TestCase\WebapiAbstract;
 
 /**
@@ -29,10 +30,14 @@ class InvoiceListTest extends WebapiAbstract
     }
 
     /**
-     * @magentoApiDataFixture Magento/Sales/_files/invoice.php
+     * @magentoApiDataFixture Magento/Sales/_files/invoice_list.php
      */
     public function testInvoiceList()
     {
+        /** @var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = $this->objectManager->get(
+            SortOrderBuilder::class
+        );
         /** @var $searchCriteriaBuilder  \Magento\Framework\Api\SearchCriteriaBuilder */
         $searchCriteriaBuilder = $this->objectManager->create(
             \Magento\Framework\Api\SearchCriteriaBuilder::class
@@ -43,15 +48,29 @@ class InvoiceListTest extends WebapiAbstract
             \Magento\Framework\Api\FilterBuilder::class
         );
 
-        $searchCriteriaBuilder->addFilters(
-            [
-                $filterBuilder
-                    ->setField('state')
-                    ->setValue((string)\Magento\Sales\Model\Order\Invoice::STATE_PAID)
-                    ->setConditionType('eq')
-                    ->create(),
-            ]
-        );
+        $stateFilter = $filterBuilder
+            ->setField('state')
+            ->setValue((string)\Magento\Sales\Model\Order\Creditmemo::STATE_OPEN)
+            ->setConditionType('eq')
+            ->create();
+        $incrementFilter = $filterBuilder
+            ->setField('increment_id')
+            ->setValue('456')
+            ->setConditionType('eq')
+            ->create();
+        $zeroStatusFilter = $filterBuilder
+            ->setField('can_void_flag')
+            ->setValue('0')
+            ->setConditionType('eq')
+            ->create();
+        $sortOrder = $sortOrderBuilder
+            ->setField('grand_total')
+            ->setDirection('ASC')
+            ->create();
+
+        $searchCriteriaBuilder->addFilters([$stateFilter]);
+        $searchCriteriaBuilder->addFilters([$incrementFilter, $zeroStatusFilter]);
+        $searchCriteriaBuilder->addSortOrder($sortOrder);
         $searchData = $searchCriteriaBuilder->create()->__toArray();
 
         $requestData = ['searchCriteria' => $searchData];
@@ -70,8 +89,10 @@ class InvoiceListTest extends WebapiAbstract
         $result = $this->_webApiCall($serviceInfo, $requestData);
         // TODO Test fails, due to the inability of the framework API to handle data collection
         $this->assertArrayHasKey('items', $result);
-        $this->assertCount(1, $result['items']);
+        $this->assertCount(2, $result['items']);
         $this->assertArrayHasKey('search_criteria', $result);
+        $this->assertEquals('789', $result['items'][0]['increment_id']);
+        $this->assertEquals('456', $result['items'][1]['increment_id']);
         $this->assertEquals($searchData, $result['search_criteria']);
     }
 }
diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderInvoiceCreateTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderInvoiceCreateTest.php
index cb384134a7c68c63955a0d97ab27aaa6c4f4f002..60c9f54ea132c5a0af3970ac58b87710b7b1688c 100644
--- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderInvoiceCreateTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderInvoiceCreateTest.php
@@ -10,7 +10,7 @@ namespace Magento\Sales\Service\V1;
  */
 class OrderInvoiceCreateTest extends \Magento\TestFramework\TestCase\WebapiAbstract
 {
-    const SERVICE_READ_NAME = 'salesOrderInvoiceV1';
+    const SERVICE_READ_NAME = 'salesInvoiceOrderV1';
     const SERVICE_VERSION = 'V1';
 
     /**
diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetListTest.php
index 25af17f6bb1ab442a47311b32bb61716623820d3..08b7ecfa97958df9c960f234aaf90007b0fef102 100644
--- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetListTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetListTest.php
@@ -27,26 +27,40 @@ class OrderItemGetListTest extends WebapiAbstract
     }
 
     /**
-     * @magentoApiDataFixture Magento/Sales/_files/order.php
+     * @magentoApiDataFixture Magento/Sales/_files/order_item_list.php
      */
     public function testGetList()
     {
+        $expectedRowTotals = [112, 102, 92];
+        /** @var \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = $this->objectManager->get(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
         /** @var \Magento\Sales\Model\Order $order */
         $order = $this->objectManager->create(\Magento\Sales\Model\Order::class);
         $order->loadByIncrementId(self::ORDER_INCREMENT_ID);
-
         /** @var $searchCriteriaBuilder  \Magento\Framework\Api\SearchCriteriaBuilder */
         $searchCriteriaBuilder = $this->objectManager->create(\Magento\Framework\Api\SearchCriteriaBuilder::class);
         /** @var $filterBuilder  \Magento\Framework\Api\FilterBuilder */
         $filterBuilder = $this->objectManager->create(\Magento\Framework\Api\FilterBuilder::class);
 
-        $searchCriteriaBuilder->addFilters(
-            [
-                $filterBuilder->setField('order_id')
-                    ->setValue($order->getId())
-                    ->create(),
-            ]
-        );
+        $filter2 = $filterBuilder->setField('product_type')
+            ->setValue('configurable')
+            ->create();
+        $filter3 = $filterBuilder->setField('base_price')
+            ->setValue(110)
+            ->setConditionType('gteq')
+            ->create();
+        $filter4 = $filterBuilder->setField('product_type')
+            ->setValue('simple')
+            ->setConditionType('neq')
+            ->create();
+        $sortOrder = $sortOrderBuilder->setField('row_total')
+            ->setDirection('DESC')
+            ->create();
+        $searchCriteriaBuilder->addFilters([$filter4]);
+        $searchCriteriaBuilder->addFilters([$filter2, $filter3]);
+        $searchCriteriaBuilder->addSortOrder($sortOrder);
 
         $requestData = ['searchCriteria' => $searchCriteriaBuilder->create()->__toArray()];
 
@@ -66,9 +80,15 @@ class OrderItemGetListTest extends WebapiAbstract
 
         $this->assertTrue(is_array($response));
         $this->assertArrayHasKey('items', $response);
-        $this->assertCount(1, $response['items']);
+        $this->assertCount(3, $response['items']);
         $this->assertTrue(is_array($response['items'][0]));
-        $this->assertOrderItem(current($order->getItems()), $response['items'][0]);
+        $rowTotals = [];
+
+        foreach ($response['items'] as $item) {
+            $rowTotals[] = $item['row_total'];
+        }
+
+        $this->assertEquals($expectedRowTotals, $rowTotals);
     }
 
     /**
diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderListTest.php
index 13a7de4201914269b992623a93ad4c89f99f7afd..85cc726ef695aa25373e433776538aaff06a422d 100644
--- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderListTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderListTest.php
@@ -30,10 +30,14 @@ class OrderListTest extends WebapiAbstract
     }
 
     /**
-     * @magentoApiDataFixture Magento/Sales/_files/order.php
+     * @magentoApiDataFixture Magento/Sales/_files/order_list.php
      */
     public function testOrderList()
     {
+        /** @var \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = $this->objectManager->get(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
         /** @var $searchCriteriaBuilder  \Magento\Framework\Api\SearchCriteriaBuilder */
         $searchCriteriaBuilder = $this->objectManager->create(
             \Magento\Framework\Api\SearchCriteriaBuilder::class
@@ -43,16 +47,27 @@ class OrderListTest extends WebapiAbstract
         $filterBuilder = $this->objectManager->create(
             \Magento\Framework\Api\FilterBuilder::class
         );
-
-        $searchCriteriaBuilder->addFilters(
-            [
-                $filterBuilder
-                    ->setField('status')
-                    ->setValue('processing')
-                    ->setConditionType('eq')
-                    ->create(),
-            ]
-        );
+        $filter1 = $filterBuilder
+            ->setField('status')
+            ->setValue('processing')
+            ->setConditionType('eq')
+            ->create();
+        $filter2 = $filterBuilder
+            ->setField('state')
+            ->setValue(\Magento\Sales\Model\Order::STATE_NEW)
+            ->setConditionType('eq')
+            ->create();
+        $filter3 = $filterBuilder
+            ->setField('increment_id')
+            ->setValue('100000001')
+            ->setConditionType('eq')
+            ->create();
+        $sortOrder = $sortOrderBuilder->setField('grand_total')
+            ->setDirection('DESC')
+            ->create();
+        $searchCriteriaBuilder->addFilters([$filter1]);
+        $searchCriteriaBuilder->addFilters([$filter2, $filter3]);
+        $searchCriteriaBuilder->addSortOrder($sortOrder);
         $searchData = $searchCriteriaBuilder->create()->__toArray();
 
         $requestData = ['searchCriteria' => $searchData];
@@ -70,8 +85,10 @@ class OrderListTest extends WebapiAbstract
 
         $result = $this->_webApiCall($serviceInfo, $requestData);
         $this->assertArrayHasKey('items', $result);
-        $this->assertCount(1, $result['items']);
+        $this->assertCount(2, $result['items']);
         $this->assertArrayHasKey('search_criteria', $result);
         $this->assertEquals($searchData, $result['search_criteria']);
+        $this->assertEquals('100000002', $result['items'][0]['increment_id']);
+        $this->assertEquals('100000001', $result['items'][1]['increment_id']);
     }
 }
diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..8de7c4dc7f65b9318eca04c2656f22aa08cc447f
--- /dev/null
+++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipOrderTest.php
@@ -0,0 +1,100 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Service\V1;
+
+/**
+ * API test for creation of Shipment for certain Order.
+ */
+class ShipOrderTest extends \Magento\TestFramework\TestCase\WebapiAbstract
+{
+    const SERVICE_READ_NAME = 'salesShipOrderV1';
+    const SERVICE_VERSION = 'V1';
+
+    /**
+     * @var \Magento\Framework\ObjectManagerInterface
+     */
+    private $objectManager;
+
+    /**
+     * @var \Magento\Sales\Api\ShipmentRepositoryInterface
+     */
+    private $shipmentRepository;
+
+    protected function setUp()
+    {
+        $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+        $this->shipmentRepository = $this->objectManager->get(
+            \Magento\Sales\Api\ShipmentRepositoryInterface::class
+        );
+    }
+
+    /**
+     * @magentoApiDataFixture Magento/Sales/_files/order_new.php
+     */
+    public function testShipOrder()
+    {
+        /** @var \Magento\Sales\Model\Order $existingOrder */
+        $existingOrder = $this->objectManager->create(\Magento\Sales\Model\Order::class)
+            ->loadByIncrementId('100000001');
+
+        $serviceInfo = [
+            'rest' => [
+                'resourcePath' => '/V1/order/' . $existingOrder->getId() . '/ship',
+                'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_POST,
+            ],
+            'soap' => [
+                'service' => self::SERVICE_READ_NAME,
+                'serviceVersion' => self::SERVICE_VERSION,
+                'operation' => self::SERVICE_READ_NAME . 'execute',
+            ],
+        ];
+
+        $requestData = [
+            'orderId' => $existingOrder->getId(),
+            'items' => [],
+            'comment' => [
+                'comment' => 'Test Comment',
+                'is_visible_on_front' => 1,
+            ],
+            'tracks' => [
+                [
+                    'track_number' => 'TEST_TRACK_0001',
+                    'title' => 'Simple shipment track',
+                    'carrier_code' => 'UPS'
+                ]
+            ]
+        ];
+
+        /** @var \Magento\Sales\Api\Data\OrderItemInterface $item */
+        foreach ($existingOrder->getAllItems() as $item) {
+            $requestData['items'][] = [
+                'order_item_id' => $item->getItemId(),
+                'qty' => $item->getQtyOrdered(),
+            ];
+        }
+
+        $result = $this->_webApiCall($serviceInfo, $requestData);
+
+        $this->assertNotEmpty($result);
+
+        try {
+            $this->shipmentRepository->get($result);
+        } catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
+            $this->fail('Failed asserting that Shipment was created');
+        }
+
+        /** @var \Magento\Sales\Model\Order $updatedOrder */
+        $updatedOrder = $this->objectManager->create(\Magento\Sales\Model\Order::class)
+            ->loadByIncrementId('100000001');
+
+        $this->assertNotEquals(
+            $existingOrder->getStatus(),
+            $updatedOrder->getStatus(),
+            'Failed asserting that Order status was changed'
+        );
+    }
+}
diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentListTest.php
index 3dd721b3b88d1cc89f9bac1d0e5e6f729312455e..3d00dd7948523a5f6984430ba3ae971c7ae84f2e 100644
--- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentListTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentListTest.php
@@ -29,10 +29,14 @@ class ShipmentListTest extends WebapiAbstract
     }
 
     /**
-     * @magentoApiDataFixture Magento/Sales/_files/shipment.php
+     * @magentoApiDataFixture Magento/Sales/_files/shipment_list.php
      */
     public function testShipmentList()
     {
+        /** @var \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = $this->objectManager->get(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
         /** @var $searchCriteriaBuilder  \Magento\Framework\Api\SearchCriteriaBuilder */
         $searchCriteriaBuilder = $this->objectManager->create(
             \Magento\Framework\Api\SearchCriteriaBuilder::class
@@ -42,16 +46,28 @@ class ShipmentListTest extends WebapiAbstract
         $filterBuilder = $this->objectManager->create(
             \Magento\Framework\Api\FilterBuilder::class
         );
+        $filter1 = $filterBuilder
+            ->setField('shipment_status')
+            ->setValue(1)
+            ->setConditionType('eq')
+            ->create();
+        $filter2 = $filterBuilder
+            ->setField('store_id')
+            ->setValue(1)
+            ->setConditionType('eq')
+            ->create();
+        $filter3 = $filterBuilder
+            ->setField('shipping_address_id')
+            ->setValue(3)
+            ->setConditionType('eq')
+            ->create();
+        $sortOrder = $sortOrderBuilder->setField('increment_id')
+            ->setDirection('ASC')
+            ->create();
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $searchCriteriaBuilder->addFilters([$filter3]);
+        $searchCriteriaBuilder->addSortOrder($sortOrder);
 
-        $searchCriteriaBuilder->addFilters(
-            [
-                $filterBuilder
-                    ->setField('shipment_status')
-                    ->setValue((string)\Magento\Sales\Model\Order\Shipment::STATUS_NEW)
-                    ->setConditionType('eq')
-                    ->create()
-            ]
-        );
         $searchData = $searchCriteriaBuilder->create()->__toArray();
 
         $requestData = ['searchCriteria' => $searchData];
@@ -70,8 +86,10 @@ class ShipmentListTest extends WebapiAbstract
         $result = $this->_webApiCall($serviceInfo, $requestData);
         // TODO Test fails, due to the inability of the framework API to handle data collection
         $this->assertArrayHasKey('items', $result);
-        $this->assertCount(1, $result['items']);
+        $this->assertCount(2, $result['items']);
         $this->assertArrayHasKey('search_criteria', $result);
         $this->assertEquals($searchData, $result['search_criteria']);
+        $this->assertEquals('100000002', $result['items'][0]['increment_id']);
+        $this->assertEquals('100000003', $result['items'][1]['increment_id']);
     }
 }
diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/TransactionTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/TransactionTest.php
index d546bdd01ad5dc0ac95014f851a5d30b9f482e29..3a2aab87946708c0b5a4a84cdf759fedda69834a 100644
--- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/TransactionTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/TransactionTest.php
@@ -88,9 +88,9 @@ class TransactionTest extends WebapiAbstract
 
     /**
      * Tests list of order transactions
-     * @dataProvider filtersDataProvider
+     * @magentoApiDataFixture Magento/Sales/_files/transactions_list.php
      */
-    public function testTransactionList($filters)
+    public function testTransactionList()
     {
         /** @var Order $order */
         $order = $this->objectManager->create(\Magento\Sales\Model\Order::class);
@@ -114,8 +114,38 @@ class TransactionTest extends WebapiAbstract
         $searchCriteriaBuilder = $this->objectManager->create(
             \Magento\Framework\Api\SearchCriteriaBuilder::class
         );
+        /** @var $filterBuilder  \Magento\Framework\Api\FilterBuilder */
+        $filterBuilder = $this->objectManager->create(
+            \Magento\Framework\Api\FilterBuilder::class
+        );
+        /** @var \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = $this->objectManager->create(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
+        $filter1 = $filterBuilder->setField('txn_id')
+            ->setValue('%trx_auth%')
+            ->setConditionType('like')
+            ->create();
+        $filter2 = $filterBuilder->setField('txn_id')
+            ->setValue('trx_capture')
+            ->setConditionType('eq')
+            ->create();
+        $filter3 = $filterBuilder->setField('parent_txn_id')
+            ->setValue(null)
+            ->setConditionType('null')
+            ->create();
+        $filter4 = $filterBuilder->setField('is_closed')
+            ->setValue(0)
+            ->setConditionType('eq')
+            ->create();
+        $sortOrder = $sortOrderBuilder->setField('parent_id')
+            ->setDirection('ASC')
+            ->create();
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $searchCriteriaBuilder->addFilters([$filter3, $filter4]);
+        $searchCriteriaBuilder->addSortOrder($sortOrder);
 
-        $searchCriteriaBuilder->addFilters($filters);
         $searchData = $searchCriteriaBuilder->create()->__toArray();
 
         $requestData = ['searchCriteria' => $searchData];
@@ -132,14 +162,12 @@ class TransactionTest extends WebapiAbstract
             ],
         ];
         $result = $this->_webApiCall($serviceInfo, $requestData);
-
         $this->assertArrayHasKey('items', $result);
 
         $transactionData = $this->getPreparedTransactionData($transaction);
         $childTransactionData = $this->getPreparedTransactionData($childTransaction);
         $transactionData['child_transactions'][] = $childTransactionData;
         $expectedData = [$transactionData, $childTransactionData];
-
         $this->assertEquals($expectedData, $result['items']);
         $this->assertArrayHasKey('search_criteria', $result);
         $this->assertEquals($searchData, $result['search_criteria']);
@@ -168,7 +196,7 @@ class TransactionTest extends WebapiAbstract
                 'order_id' => (int)$transaction->getOrderId(),
                 'payment_id' => (int)$transaction->getPaymentId(),
                 'txn_id' => $transaction->getTxnId(),
-                'parent_txn_id' => ($transaction->getParentTxnId() ? (string)$transaction->getParentTxnId() : ''),
+                'parent_txn_id' => ($transaction->getParentTxnId() ? (string)$transaction->getParentTxnId() : null),
                 'txn_type' => $transaction->getTxnType(),
                 'is_closed' => (int)$transaction->getIsClosed(),
                 'additional_information' => ['data'],
@@ -181,6 +209,7 @@ class TransactionTest extends WebapiAbstract
     }
 
     /**
+     * @deprecated
      * @return array
      */
     public function filtersDataProvider()
diff --git a/dev/tests/api-functional/testsuite/Magento/SalesRule/Api/CouponRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/SalesRule/Api/CouponRepositoryTest.php
index 8e4fc715a2de156a89318d3aa96ec947e5a5f0a9..8b4452d44a09bd5c17e26fc631e0ed5d26bed517 100644
--- a/dev/tests/api-functional/testsuite/Magento/SalesRule/Api/CouponRepositoryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/SalesRule/Api/CouponRepositoryTest.php
@@ -15,6 +15,16 @@ class CouponRepositoryTest extends WebapiAbstract
     const RESOURCE_PATH = '/V1/coupons';
     const SERVICE_VERSION = "V1";
 
+    /**
+     * @var \Magento\Framework\ObjectManagerInterface
+     */
+    private $objectManager;
+
+    protected function setUp()
+    {
+        $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+    }
+
     protected function getCouponData()
     {
         $data = [
@@ -88,6 +98,66 @@ class CouponRepositoryTest extends WebapiAbstract
         return $result;
     }
 
+    /**
+     * @magentoApiDataFixture Magento/SalesRule/_files/coupons_advanced.php
+     */
+    public function testGetListWithMultipleFiltersAndSorting()
+    {
+        /** @var $searchCriteriaBuilder  \Magento\Framework\Api\SearchCriteriaBuilder */
+        $searchCriteriaBuilder = $this->objectManager->create(
+            \Magento\Framework\Api\SearchCriteriaBuilder::class
+        );
+        /** @var $filterBuilder  \Magento\Framework\Api\FilterBuilder */
+        $filterBuilder = $this->objectManager->create(
+            \Magento\Framework\Api\FilterBuilder::class
+        );
+        /** @var \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = $this->objectManager->create(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
+
+        $filter1 = $filterBuilder->setField('type')
+            ->setValue(1)
+            ->setConditionType('eq')
+            ->create();
+        $filter2 = $filterBuilder->setField('code')
+            ->setValue('coupon_code_auto')
+            ->setConditionType('eq')
+            ->create();
+        $filter3 = $filterBuilder->setField('is_primary')
+            ->setValue(1)
+            ->setConditionType('eq')
+            ->create();
+        $sortOrder = $sortOrderBuilder->setField('code')
+            ->setDirection('DESC')
+            ->create();
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $searchCriteriaBuilder->addFilters([$filter3]);
+        $searchCriteriaBuilder->addSortOrder($sortOrder);
+        $searchData = $searchCriteriaBuilder->create()->__toArray();
+        $requestData = ['searchCriteria' => $searchData];
+
+        $serviceInfo = [
+            'rest' => [
+                'resourcePath' => self::RESOURCE_PATH . '/search' . '?' . http_build_query($requestData),
+                'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET,
+            ],
+            'soap' => [
+                'service' => self::SERVICE_NAME,
+                'serviceVersion' => self::SERVICE_VERSION,
+                'operation' => self::SERVICE_NAME . 'GetList',
+            ],
+        ];
+
+        $result = $this->_webApiCall($serviceInfo, $requestData);
+        $this->assertArrayHasKey('items', $result);
+        $this->assertArrayHasKey('search_criteria', $result);
+        $this->assertCount(2, $result['items']);
+        $this->assertEquals('autogenerated_3_2', $result['items'][0]['code']);
+        $this->assertEquals('autogenerated_2_1', $result['items'][1]['code']);
+        $this->assertEquals($searchData, $result['search_criteria']);
+    }
+
     public function verifyGetList($couponId)
     {
         $searchCriteria = [
diff --git a/dev/tests/api-functional/testsuite/Magento/SalesRule/Api/RuleRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/SalesRule/Api/RuleRepositoryTest.php
index 6dd9d7319a79c4e52fc235f7d575ffa7e1f5791b..c3299748e0c2185e66ab045f70801b783d0b1b9f 100644
--- a/dev/tests/api-functional/testsuite/Magento/SalesRule/Api/RuleRepositoryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/SalesRule/Api/RuleRepositoryTest.php
@@ -15,6 +15,16 @@ class RuleRepositoryTest extends WebapiAbstract
     const RESOURCE_PATH = '/V1/salesRules';
     const SERVICE_VERSION = "V1";
 
+    /**
+     * @var \Magento\Framework\ObjectManagerInterface
+     */
+    private $objectManager;
+
+    protected function setUp()
+    {
+        $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+    }
+
     protected function getSalesRuleData()
     {
         $data = [
@@ -161,6 +171,68 @@ class RuleRepositoryTest extends WebapiAbstract
         return $response['items'][0];
     }
 
+    /**
+     * @magentoApiDataFixture Magento/SalesRule/_files/rules_advanced.php
+     */
+    public function testGetListWithMultipleFiltersAndSorting()
+    {
+        /** @var $searchCriteriaBuilder  \Magento\Framework\Api\SearchCriteriaBuilder */
+        $searchCriteriaBuilder = $this->objectManager->create(
+            \Magento\Framework\Api\SearchCriteriaBuilder::class
+        );
+        /** @var $filterBuilder  \Magento\Framework\Api\FilterBuilder */
+        $filterBuilder = $this->objectManager->create(
+            \Magento\Framework\Api\FilterBuilder::class
+        );
+        /** @var \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = $this->objectManager->create(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
+
+        $filter1 = $filterBuilder->setField('is_rss')
+            ->setValue(1)
+            ->setConditionType('eq')
+            ->create();
+        $filter2 = $filterBuilder->setField('name')
+            ->setValue('#4')
+            ->setConditionType('eq')
+            ->create();
+        $filter3 = $filterBuilder->setField('uses_per_coupon')
+            ->setValue(1)
+            ->setConditionType('gt')
+            ->create();
+        $sortOrder = $sortOrderBuilder->setField('name')
+            ->setDirection('ASC')
+            ->create();
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $searchCriteriaBuilder->addFilters([$filter3]);
+        $searchCriteriaBuilder->addSortOrder($sortOrder);
+        $searchData = $searchCriteriaBuilder->create()->__toArray();
+
+        $requestData = ['searchCriteria' => $searchData];
+
+        $serviceInfo = [
+            'rest' => [
+                'resourcePath' => self::RESOURCE_PATH . '/search?' . http_build_query($requestData),
+                'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET,
+            ],
+            'soap' => [
+                'service' => self::SERVICE_NAME,
+                'serviceVersion' => self::SERVICE_VERSION,
+                'operation' => self::SERVICE_NAME . 'GetList',
+            ],
+        ];
+
+        $result = $this->_webApiCall($serviceInfo, $requestData);
+        $this->assertArrayHasKey('items', $result);
+        $this->assertArrayHasKey('search_criteria', $result);
+        $this->assertCount(2, $result['items']);
+        $this->assertEquals('#1', $result['items'][0]['name']);
+        $this->assertEquals('#2', $result['items'][1]['name']);
+        $this->assertEquals($searchData, $result['search_criteria']);
+    }
+
     /**
      * Create Sales rule
      *
diff --git a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php
index 8035900a22d58d186a0e893101da27bc7b229d84..0c17ed539564bb72dd3374ed1bee9fa5a29047e8 100644
--- a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxClassRepositoryTest.php
@@ -10,6 +10,7 @@ namespace Magento\Tax\Api;
 
 use Magento\Framework\Api\FilterBuilder;
 use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrderBuilder;
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Tax\Api\Data\TaxClassInterfaceFactory;
 use Magento\Tax\Model\ClassModel;
@@ -19,6 +20,7 @@ use Magento\TestFramework\TestCase\WebapiAbstract;
 
 /**
  * Tests for tax class service.
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class TaxClassRepositoryTest extends WebapiAbstract
 {
@@ -32,6 +34,9 @@ class TaxClassRepositoryTest extends WebapiAbstract
     /** @var FilterBuilder */
     private $filterBuilder;
 
+    /** @var  SortOrderBuilder */
+    private $sortOrderBuilder;
+
     /** @var TaxClassInterfaceFactory */
     private $taxClassFactory;
 
@@ -64,6 +69,9 @@ class TaxClassRepositoryTest extends WebapiAbstract
             \Magento\Tax\Model\TaxClass\Repository::class,
             ['classModelRegistry' => $this->taxClassRegistry]
         );
+        $this->sortOrderBuilder = Bootstrap::getObjectManager()->create(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
     }
 
     /**
@@ -268,6 +276,8 @@ class TaxClassRepositoryTest extends WebapiAbstract
         $filter4 = $this->filterBuilder->setField(ClassModel::KEY_TYPE)
             ->setValue($customerTaxClass[ClassModel::KEY_TYPE])
             ->create();
+        $sortOrder = $this->sortOrderBuilder->setField("class_type")
+            ->setDirection("ASC")->create();
 
         /**
          * (class_name == 'Retail Customer' || class_name == 'Taxable Goods)
@@ -275,6 +285,7 @@ class TaxClassRepositoryTest extends WebapiAbstract
          */
         $this->searchCriteriaBuilder->addFilters([$filter1, $filter2]);
         $this->searchCriteriaBuilder->addFilters([$filter3, $filter4]);
+        $this->searchCriteriaBuilder->addSortOrder($sortOrder);
         $searchCriteria = $this->searchCriteriaBuilder->setCurrentPage(1)->setPageSize(10)->create();
         $searchData = $searchCriteria->__toArray();
         $requestData = ['searchCriteria' => $searchData];
@@ -291,15 +302,15 @@ class TaxClassRepositoryTest extends WebapiAbstract
         ];
         $searchResults = $this->_webApiCall($serviceInfo, $requestData);
         $this->assertEquals(2, $searchResults['total_count']);
+
         $this->assertEquals(
-            $productTaxClass[ClassModel::KEY_NAME],
+            $customerTaxClass[ClassModel::KEY_NAME],
             $searchResults['items'][0][ClassModel::KEY_NAME]
         );
         $this->assertEquals(
-            $customerTaxClass[ClassModel::KEY_NAME],
+            $productTaxClass[ClassModel::KEY_NAME],
             $searchResults['items'][1][ClassModel::KEY_NAME]
         );
-
         /** class_name == 'Retail Customer' && ( class_type == 'CUSTOMER' || class_type == 'PRODUCT') */
         $this->searchCriteriaBuilder->addFilters([$filter2]);
         $this->searchCriteriaBuilder->addFilters([$filter3, $filter4]);
diff --git a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxRateRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxRateRepositoryTest.php
index 4115db42dd880f638250b2860bfbddb6b76543c1..54598a603fd7cf843f4aae9e7ba96b35fb84f5d6 100644
--- a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxRateRepositoryTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxRateRepositoryTest.php
@@ -479,16 +479,26 @@ class TaxRateRepositoryTest extends WebapiAbstract
         $this->_markTestAsRestOnly();
         $rates = $this->setupTaxRatesForSearch();
 
+        $filterBR = $this->filterBuilder->setField(Rate::KEY_COUNTRY_ID)
+            ->setValue('BR')
+            ->create();
+        $filterUS = $this->filterBuilder->setField(Rate::KEY_COUNTRY_ID)
+            ->setValue('US')
+            ->create();
         // Find rates which country id 'CZ'
-        $filter = $this->filterBuilder->setField(Rate::KEY_COUNTRY_ID)
+        $filterCZ = $this->filterBuilder->setField(Rate::KEY_COUNTRY_ID)
             ->setValue('CZ')
             ->create();
         $sortOrder = $this->sortOrderBuilder
             ->setField(Rate::KEY_POSTCODE)
             ->setDirection(SortOrder::SORT_DESC)
             ->create();
+        $filterRate = $this->filterBuilder->setField(Rate::KEY_PERCENTAGE_RATE)
+            ->setValue('2.2000')
+            ->create();
+        $this->searchCriteriaBuilder->addFilters([$filterBR, $filterUS, $filterCZ]);
         // Order them by descending postcode (not the default order)
-        $this->searchCriteriaBuilder->addFilters([$filter])
+        $this->searchCriteriaBuilder->addFilters([$filterCZ, $filterRate])
             ->addSortOrder($sortOrder);
         $searchData = $this->searchCriteriaBuilder->create()->__toArray();
         $requestData = ['searchCriteria' => $searchData];
diff --git a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxRuleRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxRuleRepositoryInterfaceTest.php
index dad1f3c493ef047d43891fc2586e8c5e52cc65f1..7df25a2edba22be819f9d69de20ae56e917cda77 100644
--- a/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxRuleRepositoryInterfaceTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Tax/Api/TaxRuleRepositoryInterfaceTest.php
@@ -8,10 +8,16 @@ namespace Magento\Tax\Api;
 
 use Magento\Framework\Api\FilterBuilder;
 use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrderBuilder;
 use Magento\TestFramework\Helper\Bootstrap;
 use Magento\TestFramework\TestCase\WebapiAbstract;
 use Magento\Webapi\Model\Rest\Config as HttpConstants;
 
+/**
+ * Class TaxRuleRepositoryInterfaceTest
+ * @package Magento\Tax\Api
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class TaxRuleRepositoryInterfaceTest extends WebapiAbstract
 {
     const SERVICE_NAME = "taxTaxRuleRepositoryV1";
@@ -33,6 +39,15 @@ class TaxRuleRepositoryInterfaceTest extends WebapiAbstract
     /** @var SearchCriteriaBuilder */
     private $searchCriteriaBuilder;
 
+    /** @var  \Magento\Tax\Api\Data\TaxClassInterface | \Magento\Tax\Model\ClassModel */
+    private $taxClass;
+
+    /** @var  \Magento\Tax\Api\Data\TaxRateInterface | \Magento\Tax\Model\Calculation\Rate */
+    private $taxRate;
+
+    /** @var  SortOrderBuilder */
+    private $sortOrderBuilder;
+
     /**
      * Execute per test initialization.
      */
@@ -52,6 +67,16 @@ class TaxRuleRepositoryInterfaceTest extends WebapiAbstract
         $this->filterBuilder = $objectManager->create(
             \Magento\Framework\Api\FilterBuilder::class
         );
+        $this->sortOrderBuilder = $objectManager->create(
+            SortOrderBuilder::class
+        );
+        $this->taxClass = $objectManager->create(
+            \Magento\Tax\Api\Data\TaxClassInterface::class
+        );
+
+        $this->taxRate = $objectManager->create(
+            \Magento\Tax\Api\Data\TaxRateInterface::class
+        );
 
         /** Initialize tax classes, tax rates and tax rules defined in fixture Magento/Tax/_files/tax_classes.php */
         $this->getFixtureTaxRates();
@@ -311,21 +336,32 @@ class TaxRuleRepositoryInterfaceTest extends WebapiAbstract
     /**
      * @magentoApiDataFixture Magento/Tax/_files/tax_classes.php
      */
-    public function testSearchTaxRulesCodeLike()
+    public function testSearchTaxRulesCodeWithJoins()
     {
-        // Find rules whose code starts with 'Test Rule'
-        $filter = $this->filterBuilder
-            ->setField('code')
-            ->setValue('Test Rule%')
-            ->setConditionType('like')
-            ->create();
+        $customerTaxClass =  clone $this->taxClass->load('CustomerTaxClass2', 'class_name');
+        $productTaxClass = clone $this->taxClass->load('Taxable Goods', 'class_name');
+        $taxRate = $this->taxRate->load('*', 'code');
 
-        $sortFilter = $this->filterBuilder
-            ->setField('position')
-            ->setValue(0)
+        $filter2 = $this->filterBuilder
+            ->setField('customer_tax_class_ids')
+            ->setValue($customerTaxClass->getClassId())
+            ->create();
+        $filter3 = $this->filterBuilder
+            ->setField('product_tax_class_ids')
+            ->setValue($productTaxClass->getClassId())
+            ->create();
+        $filter4 = $this->filterBuilder
+            ->setField('tax_calculation_rate_id')
+            ->setValue($taxRate->getId())
+            ->create();
+        $sortOrder = $this->sortOrderBuilder
+            ->setField('code')
+            ->setDirection('DESC')
             ->create();
 
-        $this->searchCriteriaBuilder->addFilters([$filter, $sortFilter]);
+        $this->searchCriteriaBuilder->addFilters([$filter2, $filter3]);
+        $this->searchCriteriaBuilder->addFilters([$filter4]);
+        $this->searchCriteriaBuilder->addSortOrder($sortOrder);
 
         $fixtureRule = $this->getFixtureTaxRules()[1];
 
@@ -350,24 +386,24 @@ class TaxRuleRepositoryInterfaceTest extends WebapiAbstract
 
         $expectedRuleData = [
             [
-                'id' => $fixtureRule->getId(),
-                'code' => 'Test Rule',
+                'id' => $this->getFixtureTaxRules()[0]->getId(),
+                'code' => 'Test Rule Duplicate',
                 'priority' => 0,
                 'position' => 0,
                 'calculate_subtotal' => 0,
                 'customer_tax_class_ids' => array_values(array_unique($fixtureRule->getCustomerTaxClasses())),
                 'product_tax_class_ids' => array_values(array_unique($fixtureRule->getProductTaxClasses())),
-                'tax_rate_ids' => array_values(array_unique($fixtureRule->getRates())),
+                'tax_rate_ids' => array_values(array_unique($fixtureRule->getRates()))
             ],
             [
-                'id' => $this->getFixtureTaxRules()[0]->getId(),
-                'code' => 'Test Rule Duplicate',
+                'id' => $fixtureRule->getId(),
+                'code' => 'Test Rule',
                 'priority' => 0,
                 'position' => 0,
                 'calculate_subtotal' => 0,
                 'customer_tax_class_ids' => array_values(array_unique($fixtureRule->getCustomerTaxClasses())),
                 'product_tax_class_ids' => array_values(array_unique($fixtureRule->getProductTaxClasses())),
-                'tax_rate_ids' => array_values(array_unique($fixtureRule->getRates()))
+                'tax_rate_ids' => array_values(array_unique($fixtureRule->getRates())),
             ],
         ];
         $this->assertEquals($expectedRuleData, $searchResults['items']);
diff --git a/dev/tests/api-functional/testsuite/Magento/Webapi/JoinDirectivesTest.php b/dev/tests/api-functional/testsuite/Magento/Webapi/JoinDirectivesTest.php
index 26bfc7af7726653b73d4bcd67aa6ef1ca7fdf000..f951316b606f1e94e8633685543a724da2e27e5e 100644
--- a/dev/tests/api-functional/testsuite/Magento/Webapi/JoinDirectivesTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Webapi/JoinDirectivesTest.php
@@ -44,6 +44,8 @@ class JoinDirectivesTest extends \Magento\TestFramework\TestCase\WebapiAbstract
     }
 
     /**
+     * Rollback rules
+     * @magentoApiDataFixture Magento/SalesRule/_files/rules_rollback.php
      * @magentoApiDataFixture Magento/Sales/_files/quote.php
      */
     public function testGetList()
diff --git a/dev/tests/functional/composer.json b/dev/tests/functional/composer.json
index 4e36f1fa54f2197b79646374dfea39cdede39ec6..936c4b968af3b88ed9f05fb2d21dfe3c8184181f 100644
--- a/dev/tests/functional/composer.json
+++ b/dev/tests/functional/composer.json
@@ -1,6 +1,6 @@
 {
     "require": {
-        "magento/mtf": "1.0.0-rc46",
+        "magento/mtf": "1.0.0-rc47",
         "php": "~5.6.0|7.0.2|~7.0.6",
         "phpunit/phpunit": "4.1.0",
         "phpunit/phpunit-selenium": ">=1.2"
diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/ExpireAdminSessionTest.php b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/ExpireAdminSessionTest.php
index 4511840ccdb4f8960acc7e5c2325f383e02b1293..048f92783b42d730a1d0670d58bcea80f312b928 100644
--- a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/ExpireAdminSessionTest.php
+++ b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/ExpireAdminSessionTest.php
@@ -30,7 +30,6 @@ class ExpireAdminSessionTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     protected $systemConfigEdit;
diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/GlobalSearchEntityTest.php b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/GlobalSearchEntityTest.php
index f0dbb4fbc2a331212bb3175014e87a50171e135b..a75c3f94ccde780815ba0b8554757bab1fb90115 100644
--- a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/GlobalSearchEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/GlobalSearchEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 3. Fill in data according dataset
  * 4. Perform assertions
  *
- * @group Search_Core_(MX)
+ * @group Search_Core
  * @ZephyrId MAGETWO-28457
  */
 class GlobalSearchEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/HttpsHeadersDisableTest.php b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/HttpsHeadersDisableTest.php
index 95e69835435c65513e347f63f9adb703eb305c65..0c2cd138eb1c8b672ce3c893afc908672099ea68 100644
--- a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/HttpsHeadersDisableTest.php
+++ b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/HttpsHeadersDisableTest.php
@@ -25,7 +25,6 @@ class HttpsHeadersDisableTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/HttpsHeadersEnableTest.php b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/HttpsHeadersEnableTest.php
index 412329700ef653248f2ec07c8a91b2e5c4b5c7dd..5dca7fad04e1fcb8e384d0f2ade711bfb1f28a83 100644
--- a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/HttpsHeadersEnableTest.php
+++ b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/HttpsHeadersEnableTest.php
@@ -25,7 +25,6 @@ class HttpsHeadersEnableTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/NavigateMenuTest.php b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/NavigateMenuTest.php
index 4973598ac5959c7e8d3033e2ca17b756912574fe..f75ea3ade05fc990bb3c2242cae9991478a2b61f 100644
--- a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/NavigateMenuTest.php
+++ b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/NavigateMenuTest.php
@@ -21,7 +21,6 @@ class NavigateMenuTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/BraintreeSettlementReportTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/BraintreeSettlementReportTest.php
index 007a6e04a42b0e63cb4c5d06bd4d2018a05d04d8..6601bd44892c93e30573c5342e483eb232573e70 100644
--- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/BraintreeSettlementReportTest.php
+++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/BraintreeSettlementReportTest.php
@@ -30,14 +30,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 12. Find transaction for latest order.
  * 13. Perform assertions.
  *
- * @group Braintree_(CS)
+ * @group Braintree
  * @ZephyrId MAGETWO-48162
  */
 class BraintreeSettlementReportTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CheckoutWithBraintreePaypalCartTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CheckoutWithBraintreePaypalCartTest.php
index 8bad13557c888ad6d15a0428f1378a2b6b833e7c..a0bf482705f552318a7cdd09951aaff14eaf1cb2 100644
--- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CheckoutWithBraintreePaypalCartTest.php
+++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CheckoutWithBraintreePaypalCartTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 8.  Select payment method
  * 12. Perform assertions.
  *
- * @group Braintree_(CS)
+ * @group Braintree
  * @ZephyrId MAGETWO-39363
  */
 class CheckoutWithBraintreePaypalCartTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CheckoutWithBraintreePaypalMinicartTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CheckoutWithBraintreePaypalMinicartTest.php
index d6723c71816f92f10a6a5356fa7a3a7d4ba696b2..f0f0291b33e20428765c110dbb23600ba463bdde 100644
--- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CheckoutWithBraintreePaypalMinicartTest.php
+++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CheckoutWithBraintreePaypalMinicartTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 8.  Select payment method
  * 12. Perform assertions.
  *
- * @group Braintree_(CS)
+ * @group Braintree
  * @ZephyrId MAGETWO-39359
  */
 class CheckoutWithBraintreePaypalMinicartTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CreateOnlineCreditMemoBraintreePaypalTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CreateOnlineCreditMemoBraintreePaypalTest.php
index f45270012dd398e39f1bbf317bdbdd23cddeff7e..6554845d5ff81af96b887a9dbcb8e05761b21463 100644
--- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CreateOnlineCreditMemoBraintreePaypalTest.php
+++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CreateOnlineCreditMemoBraintreePaypalTest.php
@@ -17,14 +17,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 3.  Create credit memo.
  * 4. Perform assertions.
  *
- * @group Braintree_(CS)
+ * @group Braintree
  * @ZephyrId MAGETWO-48689, MAGETWO-48698
  */
 class CreateOnlineCreditMemoBraintreePaypalTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/InvoicePayPalBraintreeTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/InvoicePayPalBraintreeTest.php
index 625c24866e31fe611db315e8e492ce3c53f8486b..7048984886582f7e74ffaa6d5d0597ee4ae5b018 100644
--- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/InvoicePayPalBraintreeTest.php
+++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/InvoicePayPalBraintreeTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 6. Open Invoices tab.
  * 7. Perform assertions.
  *
- * @group Braintree_(CS)
+ * @group Braintree
  * @ZephyrId MAGETWO-48614, MAGETWO-48615
  */
 class InvoicePayPalBraintreeTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutWith3dSecureTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutWith3dSecureTest.php
index f8d9338b528340bbb26e91ced398c4d97271c634..32599aa090651c76f7d9d2663309ea3a219f79f6 100644
--- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutWith3dSecureTest.php
+++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutWith3dSecureTest.php
@@ -31,14 +31,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 12. Click 'Submit' to place order.
  * 13. Perform assertions.
  *
- * @group Braintree_(CS)
+ * @group Braintree
  * @ZephyrId MAGETWO-46479
  */
 class OnePageCheckoutWith3dSecureTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutWithBraintreePaypalTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutWithBraintreePaypalTest.php
index d6a4e4b51b1c66136104ac5c8e089a03998ae49e..9cf0e9c90c1215649e50e0a708bcae5db371d9fd 100644
--- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutWithBraintreePaypalTest.php
+++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutWithBraintreePaypalTest.php
@@ -28,7 +28,7 @@ use Magento\Mtf\TestCase\Scenario;
  * 11. Click 'Proceed purchase' in popup.
  * 12. Perform assertions.
  *
- * @group Braintree_(CS)
+ * @group Braintree
  * @ZephyrId MAGETWO-47805
  * @ZephyrId MAGETWO-47810
  */
@@ -36,7 +36,6 @@ class OnePageCheckoutWithBraintreePaypalTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/SaveUseDeleteVaultForPaypalBraintreeTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/SaveUseDeleteVaultForPaypalBraintreeTest.php
index 107918b973d864e6e86d8fa7df27ba09d010ef4b..f6813b74e40d7b09edf48369f6dc79ca28fefa7d 100644
--- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/SaveUseDeleteVaultForPaypalBraintreeTest.php
+++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/SaveUseDeleteVaultForPaypalBraintreeTest.php
@@ -35,14 +35,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 15. Click *Delete* button on appeared pop up.
  * 16. Perform assertions. *
  *
- * @group Braintree_(CS)
+ * @group Braintree
  * @ZephyrId MAGETWO-54838, MAGETWO-54843, MAGETWO-54844"
  */
 class SaveUseDeleteVaultForPaypalBraintreeTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/UseVaultWith3dSecureOnCheckoutTest.php b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/UseVaultWith3dSecureOnCheckoutTest.php
index a0d850f07e977318968629dff239cc34fbc5eea1..13b8240d4c49ebe4b047e59f6bfdb63102fbcf47 100644
--- a/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/UseVaultWith3dSecureOnCheckoutTest.php
+++ b/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/UseVaultWith3dSecureOnCheckoutTest.php
@@ -35,14 +35,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 16. Click 'Submit' to place order.
  * 17. Perform assertions.
  *
- * @group One_Page_Checkout_(CS)
+ * @group One_Page_Checkout
  * @ZephyrId MAGETWO-55310
  */
 class UseVaultWith3dSecureOnCheckoutTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.php
index 8a24aed55cbe1c800d7ef79fd6639d3b6527359b..ac2c977f88b8308830e43243c2417e42c81a20ba 100644
--- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.php
@@ -21,7 +21,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save product
  * 6. Verify created product
  *
- * @group Bundle_Product_(CS)
+ * @group Bundle_Product
  * @ZephyrId MAGETWO-24118
  */
 class CreateBundleProductEntityTest extends Injectable
@@ -29,7 +29,6 @@ class CreateBundleProductEntityTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.php
index ca7683fca93c78c7b7f6b0b81188b9e48ba360ea..bf17d216bcf9b479e6279f449e782bc94438600e 100644
--- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save".
  * 6. Perform asserts
  *
- * @group Bundle_Product_(MX)
+ * @group Bundle_Product
  * @ZephyrId MAGETWO-26195
  */
 class UpdateBundleProductEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php
index e648c84cf9afbd0c00a53036d0fcd421dcc93e98..d458ffeb22475b78d66eeb6441d1f911c12b0cc8 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save category
  * 6. Verify created category
  *
- * @group Category_Management_(MX)
+ * @group Category_Management
  * @ZephyrId MAGETWO-23411
  */
 class CreateCategoryEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.php
index 36bcf1a4386012a36cc66027b0da3f689c29a569..e7b613f43af59f98262b0f173c5d69413e1fed48 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Delete" button.
  * 5. Perform asserts.
  *
- * @group Category_Management_(MX)
+ * @group Category_Management
  * @ZephyrId MAGETWO-23303
  */
 class DeleteCategoryEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.php
index b37aba462dcfb9730d91734277bd433b3e81bbad..ab8b03e8bfe15ae7028b022fc1d7dfbaa25ebdbf 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\Fixture\FixtureFactory;
  * 5. Save
  * 6. Perform asserts
  *
- * @group Category_Management_(MX)
+ * @group Category_Management
  * @ZephyrId MAGETWO-23290
  */
 class UpdateCategoryEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AddCompareProductsTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AddCompareProductsTest.php
index ec87faa5f1155759d43940284a2ac7c8a81d3748..131163311bcd2af4d34031883d103b3c2341cdb8 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AddCompareProductsTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AddCompareProductsTest.php
@@ -22,14 +22,13 @@ use Magento\Catalog\Test\Page\Product\CatalogProductCompare;
  * 4. Navigate to compare page(click "compare product" link at the top of the page).
  * 5. Perform all asserts.
  *
- * @group Compare_Products_(MX)
+ * @group Compare_Products
  * @ZephyrId MAGETWO-25843
  */
 class AddCompareProductsTest extends AbstractCompareProductsTest
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AddToCartCrossSellTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AddToCartCrossSellTest.php
index 50819db0f1504d8e7327d1429a1a1be2c635c957..59f45bc004b8247e6846bc16dc0ed7983b3a37a9 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AddToCartCrossSellTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AddToCartCrossSellTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\Fixture\InjectableFixture;
  * 2. Verify Cross-sell block on checkout page.
  *
  * @ZephyrId MAGETWO-12390
- * @group Cross-sells_(MX)
+ * @group Cross-sells
  */
 class AddToCartCrossSellTest extends AbstractProductPromotedProductsTest
 {
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ClearAllCompareProductsTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ClearAllCompareProductsTest.php
index 72a0b88ddf07e0281792bd17166e5e22a0a76588..ebc7360fe004bd2fcb719bca7095d586f684f0cc 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ClearAllCompareProductsTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ClearAllCompareProductsTest.php
@@ -21,14 +21,13 @@ use Magento\Customer\Test\Page\CustomerAccountIndex;
  * 4. Click "Clear All" icon under the left menu tabs.
  * 5. Perform assertions.
  *
- * @group Compare_Products_(MX)
+ * @group Compare_Products
  * @ZephyrId MAGETWO-25961
  */
 class ClearAllCompareProductsTest extends AbstractCompareProductsTest
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.php
index 97b2a0715f7cad80a63f2adef69cde1cd82a5a78..c0cab5ef8e6b743f1926eb6e8e752d3bb4ec9b04 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.php
@@ -21,7 +21,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save Product.
  * 6. Perform appropriate assertions.
  *
- * @group Products_(CS)
+ * @group Products
  * @ZephyrId MAGETWO-23414
  */
 class CreateSimpleProductEntityTest extends Injectable
@@ -29,7 +29,6 @@ class CreateSimpleProductEntityTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php
index 86e45f9686ce10c07243009fe290c87a5e2a148a..290275ef4e8725f3d2205c7e2d3d41674d06cbe2 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.php
@@ -23,7 +23,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save product.
  * 6. Verify created product.
  *
- * @group Virtual_Product_(CS)
+ * @group Virtual_Product
  * @ZephyrId MAGETWO-23417
  */
 class CreateVirtualProductEntityTest extends Injectable
@@ -31,7 +31,6 @@ class CreateVirtualProductEntityTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DeleteCompareProductsTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DeleteCompareProductsTest.php
index 70c1757b82db45e330cd0f6f1df19c1002279ad7..7026b757bb7de03a00f18b525076a057749d2383 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DeleteCompareProductsTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DeleteCompareProductsTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\Fixture\FixtureFactory;
  * 3. Click (X) icon near the $product from dataset.
  * 4. Perform assertions.
  *
- * @group Compare_Products_(MX)
+ * @group Compare_Products
  * @ZephyrId MAGETWO-26161
  */
 class DeleteCompareProductsTest extends AbstractCompareProductsTest
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DeleteProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DeleteProductEntityTest.php
index bfc9e153a9e930e95ed1099b78369e9d31476d2f..1a0c46b146fafffb4b90eac6a5cd971686e9a15d 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DeleteProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DeleteProductEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Submit form.
  * 6. Perform asserts.
  *
- * @group Products_(MX)
+ * @group Products
  * @ZephyrId MAGETWO-23272
  */
 class DeleteProductEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DuplicateProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DuplicateProductEntityTest.php
index dd0f5e221facb43e7e8cf1f3379c13e2799fa4d8..bdf90b5df3bc5eb2ff71ed1697fc4892bf599429 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DuplicateProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DuplicateProductEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Save & Duplicate".
  * 5. Perform asserts.
  *
- * @group Products_(MX)
+ * @group Products
  * @ZephyrId MAGETWO-23294
  */
 class DuplicateProductEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.php
index 36c04d0bbbdf6430cffcf5b78b7dba4eac733662..f7fd82e3342bfdce8760c253215ad8189ef33643 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.php
@@ -28,14 +28,13 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductActionAttributeEdit;
  * 9. Click on the "Save" button.
  * 10. Perform asserts.
  *
- * @group Products_(MX)
+ * @group Products
  * @ZephyrId MAGETWO-21128
  */
 class MassProductUpdateTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateRelatedProductsTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateRelatedProductsTest.php
index 53451339e075ada19cf8bd08e04c48e285783623..49fec0876e48ffb426a63885bc9b13ea0bd416d0 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateRelatedProductsTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateRelatedProductsTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\Fixture\InjectableFixture;
  * 3. Verify checkout cart.
  *
  * @ZephyrId MAGETWO-12392
- * @group Related_Products_(MX)
+ * @group Related_Products
  */
 class NavigateRelatedProductsTest extends AbstractProductPromotedProductsTest
 {
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateUpSellProductsTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateUpSellProductsTest.php
index 53e3a57a2e8bcfdad3909a3bd3e66ab83da0afd6..37d8c9dc91d0c58573bf4cad2cd63a1a1eaa52f2 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateUpSellProductsTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateUpSellProductsTest.php
@@ -17,14 +17,13 @@ use Magento\Mtf\Fixture\InjectableFixture;
  * 1. Navigate through up-sell products.
  *
  * @ZephyrId MAGETWO-12391
- * @group Up-sells_(MX)
+ * @group Up-sells
  */
 class NavigateUpSellProductsTest extends AbstractProductPromotedProductsTest
 {
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php
index 5a97e8922ce77d71fafc8cf94ab65f238d12b235..c8189cd50ebf318b1373c8e495ccec0f64262993 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save
  * 6. Perform all assertions
  *
- * @group Products_(MX)
+ * @group Products
  * @ZephyrId MAGETWO-29398
  */
 class ProductTypeSwitchingOnCreationTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php
index 55814088db48197c6b247518b042ca59ba38310a..7c134c2902c330f51306ecff1d68f359fa29066c 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php
@@ -30,14 +30,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Save
  * 7. Perform all assertions
  *
- * @group Products_(MX)
+ * @group Products
  * @ZephyrId MAGETWO-29633
  */
 class ProductTypeSwitchingOnUpdateTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php
index d2730644dc6bf1e937116546802b80de15a05414..f68ec539c62e0c7b59f9c6f958bff7dc350a91d6 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php
@@ -25,7 +25,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save".
  * 6. Perform asserts.
  *
- * @group Products_(MX)
+ * @group Products
  * @ZephyrId MAGETWO-23544, MAGETWO-21125
  */
 class UpdateSimpleProductEntityTest extends Injectable
@@ -33,7 +33,6 @@ class UpdateSimpleProductEntityTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php
index 43d44b577ab66e92cf6d0ffaaa7df73f213a207e..ddd788d7ee1c91dde5164b06ea2d908056031c25 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php
@@ -30,14 +30,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save".
  * 6. Perform asserts.
  *
- * @group Products_(MX)
+ * @group Products
  * @ZephyrId MAGETWO-26204
  */
 class UpdateVirtualProductEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ValidateOrderOfProductTypeTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ValidateOrderOfProductTypeTest.php
index eff2ef2a6972b73db62486fef33551db220b2f29..a8c375ba2d84962e1e7657974c63bbe726f2dbe6 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ValidateOrderOfProductTypeTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ValidateOrderOfProductTypeTest.php
@@ -14,14 +14,13 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex;
  * 1. Login to backend.
  * 2. Navigate to PRODUCTS -> Catalog.
  *
- * @group Products_(MX)
+ * @group Products
  * @ZephyrId MAGETWO-37146
  */
 class ValidateOrderOfProductTypeTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php
index a20282f786a2542b1411e352cec0902ed869f98a..d3bd8f44adb7413034a1b5fba27f6c0f2d7a193d 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Save new Attribute Set.
  * 7. Verify created Attribute Set.
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-25104
  */
 class CreateAttributeSetEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php
index e40006301ffff01885dc032429ed17beeaef77f9..0a85628c5e708ec6c5fb4f4aee6aa7fa355e40d9 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 8. Save product.
  * 7. Perform appropriate assertions.
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-30528
  */
 class CreateProductAttributeEntityFromProductPageTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.php
index 034acb5918b41f78cc274ad635dbc82380e40fb7..22325ead5f5f759f529066dac477e0caa7f74348 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.php
@@ -17,14 +17,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 5. Save Product Attribute.
  * 6. Perform appropriate assertions.
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-24767
  */
 class CreateProductAttributeEntityTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php
index e8f20837bf384c7956383c530bc01ba362733120..11958cc2c1e87451e7f0bcb50c61150bda2ac85f 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click on the "Delete Attribute" button.
  * 6. Perform all assertions.
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-26011
  */
 class DeleteAssignedToTemplateProductAttributeTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php
index b71e751015db08510155733b005c210d070c480e..b097dc4681b166b55efef8ef55e152a9c68516b7 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click 'Delete' button.
  * 5. Perform all assertions.
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-25473
  */
 class DeleteAttributeSetTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.php
index 0b0e078015a220964236404720ba5286b461deeb..737a086dbb7e96a66b8afb6818059ffb76eb4ebc 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click on the "Delete Attribute" button.
  * 6. Perform all assertions.
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-24998
  */
 class DeleteProductAttributeEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteSystemProductAttributeTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteSystemProductAttributeTest.php
index e57a00a9d68ab9dc5d917c82cb3433776bff4a30..20fee003a576d5c4fd943e695e0669d62b9e7754 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteSystemProductAttributeTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteSystemProductAttributeTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click on line with search results.
  * 5. Perform assertion.
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-24771
  */
 class DeleteSystemProductAttributeTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.php
index 40c05f9f75a8d5c529373ee6c8fec96fa1d5f61b..baf9a238c6bc039cf606c5a384aed1ed0135c611 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.php
@@ -28,14 +28,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click on the "Delete Attribute" button.
  * 6. Perform asserts.
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-26652
  */
 class DeleteUsedInConfigurableProductAttributeTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php
index 37ebda4406c3c20db01fe6eade9d138638da7ae0..af6b5747819cdc0f5d7c0de37473b5e6effefdfc 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php
@@ -29,14 +29,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 7. Save Attribute Set.
  * 8. Preform all assertions.
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-26251
  */
 class UpdateAttributeSetTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php
index e30bb6622af664f122987934f57e553d947c6961..399b918078f22ee27ba498d7ffe82fc0273bfeda 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php
@@ -28,14 +28,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Save Attribute' button
  * 6. Perform all assertions
  *
- * @group Product_Attributes_(MX)
+ * @group Product_Attributes
  * @ZephyrId MAGETWO-23459
  */
 class UpdateProductAttributeEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/ApplyCatalogPriceRulesTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/ApplyCatalogPriceRulesTest.php
index 1da500b386454a045f822b4b1594fa2043b2fbc9..4a4c6a25321c8363133aa0d6696cb29a35c946b5 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/ApplyCatalogPriceRulesTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/ApplyCatalogPriceRulesTest.php
@@ -23,7 +23,7 @@ use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleEdit;
  * 2. Create simple product.
  * 3. Perform all assertions.
  *
- * @group Catalog_Price_Rules_(MX)
+ * @group Catalog_Price_Rules
  * @ZephyrId MAGETWO-24780
  */
 class ApplyCatalogPriceRulesTest extends AbstractCatalogRuleEntityTest
@@ -31,7 +31,6 @@ class ApplyCatalogPriceRulesTest extends AbstractCatalogRuleEntityTest
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogPriceRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogPriceRuleEntityTest.php
index bbab44b01d514c3806ed7fb78d656809a573a6a4..f5efc258fbdbf5854bd5accb95cc7bfef1820089 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogPriceRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogPriceRuleEntityTest.php
@@ -20,7 +20,7 @@ use Magento\Customer\Test\Fixture\CustomerGroup;
  * 5. Save rule.
  * 6. Perform appropriate assertions.
  *
- * @group Catalog_Price_Rules_(MX)
+ * @group Catalog_Price_Rules
  * @ZephyrId MAGETWO-24341
  */
 class CreateCatalogPriceRuleEntityTest extends AbstractCatalogRuleEntityTest
@@ -28,7 +28,6 @@ class CreateCatalogPriceRuleEntityTest extends AbstractCatalogRuleEntityTest
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.php
index 89dd079aecdd5adc4d8ae0f6b8792ec569976c91..a2d0ff9500d4c4c8ac62bf2e4b9f54e6fcc5c4f4 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click on the "Delete" button.
  * 5. Perform all assertions.
  *
- * @group Catalog_Price_Rules_(MX)
+ * @group Catalog_Price_Rules
  * @ZephyrId MAGETWO-25211
  */
 class DeleteCatalogPriceRuleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.php
index 2f04d13ca445e00852e093dd1e9430a3cf01f35b..8ca54baed577c63408f6bd36d257f985a8411694 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\Util\Command\Cli\Cron;
  * 6. Create simple product with category.
  * 7. Perform all asserts.
  *
- * @group Catalog_Price_Rules_(MX)
+ * @group Catalog_Price_Rules
  * @ZephyrId MAGETWO-25187
  */
 class UpdateCatalogPriceRuleEntityTest extends AbstractCatalogRuleEntityTest
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php
index 90234c28627ce59ca701e566121c0515054436b9..a3e5a4ba850d448e163dbee7499c4b616810fd1a 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Search" button
  * 5. Perform all asserts
  *
- * @group Search_Frontend_(MX)
+ * @group Search_Frontend
  * @ZephyrId MAGETWO-24729
  */
 class AdvancedSearchEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/CreateSearchTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/CreateSearchTermEntityTest.php
index a6853a8c4758d46ffbfad54ebc5102b2edf14ee3..f6ffd84c0b4e97da274a4fb6693d52ba4f731c99 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/CreateSearchTermEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/CreateSearchTermEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 7. Save the Search Term.
  * 8. Perform all assertions.
  *
- * @group Search_Terms_(MX)
+ * @group Search_Terms
  * @ZephyrId MAGETWO-26165
  */
 class CreateSearchTermEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.php
index d646ffc6c4aaf689316c985bbb9ba75d9199cb1e..ab5fb5f5bcd4d9120c4127f55e1373d1a4310141 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Delete Search" button
  * 5. Perform all assertions
  *
- * @group Search_Terms_(MX)
+ * @group Search_Terms
  * @ZephyrId MAGETWO-26491
  */
 class DeleteSearchTermEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php
index c64d5f5d72aef16b1cf15bef91d5d79a07645858..5f41d187564f92d022a8eb50b85cd7aef9cf777c 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Submit form
  * 6. Perform all assertions
  *
- * @group Search_Terms_(MX)
+ * @group Search_Terms
  * @ZephyrId MAGETWO-26599
  */
 class MassDeleteSearchTermEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SearchEntityResultsTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SearchEntityResultsTest.php
index 77aa6b169cbb780b54c4a3e4776162bf4c451234..c845e7f0bfe85958c20136ebcf0da30f53d31874 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SearchEntityResultsTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SearchEntityResultsTest.php
@@ -19,14 +19,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 2. Input test data into "search field" and press Enter key.
  * 3. Perform all assertions.
  *
- * @group Search_Frontend_(MX)
+ * @group Search_Frontend
  * @ZephyrId MAGETWO-25095
  */
 class SearchEntityResultsTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SuggestSearchingResultEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SuggestSearchingResultEntityTest.php
index 285fb7b3daf6533c7a71f849ad21fbc84a44de2b..42c1683a6cd1485de9b927911e477bba5ebd29f1 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SuggestSearchingResultEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/SuggestSearchingResultEntityTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 2. Input in "Search" field test data.
  * 3. Perform asserts.
  *
- * @group Search_Frontend_(CS)
+ * @group Search_Frontend
  * @ZephyrId MAGETWO-24671
  */
 class SuggestSearchingResultEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/UpdateSearchTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/UpdateSearchTermEntityTest.php
index b58fc2083a4004108d8b47717ec2e0d05346c02e..291f71322ded5389b400466a01306198bbe7596b 100644
--- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/UpdateSearchTermEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/UpdateSearchTermEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 7. Save the Search Term.
  * 8. Perform all assertions.
  *
- * @group Search_Terms_(MX)
+ * @group Search_Terms
  * @ZephyrId MAGETWO-26100
  */
 class UpdateSearchTermEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php
index 8eed34db7e349e4183add7c78dae2c17cdaf2b41..0733d778b9662dba9c857eff90b213b4da77e4c3 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 3. Add to cart test product
  * 4. Perform all asserts
  *
- * @group Shopping_Cart_(CS)
+ * @group Shopping_Cart
  * @ZephyrId MAGETWO-25382
  */
 class AddProductsToShoppingCartEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php
index 4997ed168f3257ed82aef973d1196f886531c4b4..f2a809656ed65449fc63d5405b3449f8587005c5 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click Ok
  * 5. Perform all assertions
  *
- * @group Mini_Shopping_Cart_(CS)
+ * @group Mini_Shopping_Cart
  * @ZephyrId MAGETWO-29104
  */
 class DeleteProductFromMiniShoppingCartTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductsFromShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductsFromShoppingCartTest.php
index 40edbd64dd01e668e0aa303be04e56dab7e1a964..ae48e6e6b79487571539aa28567f7dd930b57237 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductsFromShoppingCartTest.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductsFromShoppingCartTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 2. Click 'Remove item' button from Shopping Cart for each product(s)
  * 3. Perform all asserts
  *
- * @group Shopping_Cart_(CS)
+ * @group Shopping_Cart
  * @ZephyrId MAGETWO-25218
  */
 class DeleteProductsFromShoppingCartTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/OnePageCheckoutTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/OnePageCheckoutTest.php
index 40789d462d16c172bb36e5e74ba6dadbfc418b2f..58d0c23f2274fcdde30703aa8ca4920ec0aa208a 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/OnePageCheckoutTest.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/OnePageCheckoutTest.php
@@ -32,7 +32,7 @@ use Magento\Mtf\TestCase\Scenario;
  * 13. Place order.
  * 14. Perform assertions.
  *
- * @group One_Page_Checkout_(CS)
+ * @group One_Page_Checkout
  * @ZephyrId MAGETWO-27485, MAGETWO-12412, MAGETWO-12429
  * @ZephyrId MAGETWO-12444, MAGETWO-12848, MAGETWO-12849, MAGETWO-12850
  */
@@ -40,7 +40,6 @@ class OnePageCheckoutTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test, 3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php
index 709b131c9565597f3121e77fb6529b12577016da..62d773a6637bf8fdacedf62932d798dcd6d9e431 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click Update.
  * 5. Perform all assertions.
  *
- * @group Mini_Shopping_Cart_(CS)
+ * @group Mini_Shopping_Cart
  * @ZephyrId MAGETWO-29812
  */
 class UpdateProductFromMiniShoppingCartEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.php
index 89563fe97ba241fe47b7d09512d7788f4741a37e..809688cd8286a0afdc68ef3d236a6b1673b1c66b 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Update Shopping Cart" button
  * 5. Perform all assertion from dataset
  *
- * @group Shopping_Cart_(CS)
+ * @group Shopping_Cart
  * @ZephyrId MAGETWO-25081
  */
 class UpdateShoppingCartTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php
index 6cb7dac085389ba877dcb02e74129c0b63ecef2d..21f48abef963d288415d09b24d08a3fe8fd34ebe 100644
--- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php
@@ -19,14 +19,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 4. Save
  * 5. Perform all assertions
  *
- * @group Terms_and_Conditions_(CS)
+ * @group Terms_and_Conditions
  * @ZephyrId MAGETWO-29586, MAGETWO-32499
  */
 class CreateTermEntityTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.php
index ab9c1484ef37db6d0cfd5df4fa4bca6706b58753..2c65150aa697371c1fe050e5e4f5f9dfbdcb25b1 100644
--- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.php
@@ -19,14 +19,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 3. Click on 'Delete' button.
  * 4. Perform all assertions.
  *
- * @group Terms_and_Conditions_(CS)
+ * @group Terms_and_Conditions
  * @ZephyrId MAGETWO-29687
  */
 class DeleteTermEntityTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php
index 1a054cd8991be92974c8cf07fdd0bb4f02f225bf..277f38e0c7e1f1bdda9f122183415b35aa772f40 100644
--- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 4. Save
  * 5. Perform all assertions
  *
- * @group Terms_and_Conditions_(CS)
+ * @group Terms_and_Conditions
  * @ZephyrId MAGETWO-29635
  */
 class UpdateTermEntityTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.php b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.php
index 33824a8a84ffd69a278a56061305b818ece6fc24..7e3c3f0ebb3c95b69fdf1f5c766b8184c25d736c 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.php
@@ -19,14 +19,13 @@ use Magento\Cms\Test\Fixture\CmsBlock;
  * 4. Fill data according to dataset.
  * 5. Perform all assertions.
  *
- * @group CMS_Content_(PS)
+ * @group CMS_Content
  * @ZephyrId MAGETWO-25578
  */
 class CreateCmsBlockEntityTest extends AbstractCmsBlockEntityTest
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageEntityTest.php b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageEntityTest.php
index ca6f7a8d3f6e1e25e99c8f34679f360fbf475e27..f5035a2eaf76d734e7288a84d2657c897d90b5b4 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageEntityTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save CMS Page.
  * 6. Verify created CMS Page.
  *
- * @group CMS_Content_(PS)
+ * @group CMS_Content
  * @ZephyrId MAGETWO-25580
  */
 class CreateCmsPageEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageRewriteEntityTest.php
index d4d15290d7ba6a3102c98e9f188a7af8fa6ed010..296525540073fee5a0e12101cd9575ffcc2a15f5 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageRewriteEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 7. Save Rewrite.
  * 8. Perform all assertions.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-24847
  */
 class CreateCmsPageRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsBlockEntityTest.php b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsBlockEntityTest.php
index c4897ea36269dd38850dbe537472e8621b64a6ce..ad2ae5689c98588aa3964d948dd6e04e7a1a0fd2 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsBlockEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsBlockEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Catalog\Test\Fixture\Category;
  * 4. Click "Delete Block".
  * 5. Perform all assertions.
  *
- * @group CMS_Content_(PS)
+ * @group CMS_Content
  * @ZephyrId MAGETWO-25698
  */
 class DeleteCmsBlockEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageEntityTest.php b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageEntityTest.php
index 1a52df3142f8c213bdb37cc627c3bf829dd138b9..25225917014fcbee5385f1cb2334ba9889300390 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Delete Page" button.
  * 5. Perform all assertions.
  *
- * @group CMS_Content_(PS)
+ * @group CMS_Content
  * @ZephyrId MAGETWO-23291
  */
 class DeleteCmsPageEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageUrlRewriteEntityTest.php
index ac8f69b3fb50adca30d812e0c9f23fe3b8e241cb..68d0ae541253d779e60cd374e8055600446b4641 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageUrlRewriteEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Delete Redirect.
  * 5. Perform all assertions.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-25915
  */
 class DeleteCmsPageUrlRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsBlockEntityTest.php b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsBlockEntityTest.php
index f42078879c59d6ac6e60be044cebde2142aae8f9..8fa92fba59f8e65dc8a528c26a239b0ed54b2e48 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsBlockEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsBlockEntityTest.php
@@ -20,14 +20,13 @@ use Magento\Cms\Test\Fixture\CmsBlock;
  * 4. Fill data according to dataset.
  * 5. Perform all assertions.
  *
- * @group CMS_Content_(PS)
+ * @group CMS_Content
  * @ZephyrId MAGETWO-25941
  */
 class UpdateCmsBlockEntityTest extends AbstractCmsBlockEntityTest
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageEntityTest.php b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageEntityTest.php
index 280b2cd915a067e7876e146f1658df9f81eb4dbd..b16f4384f27d50e75411b3fcd20a388f514cd9d5 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Save' CMS Page.
  * 6. Perform asserts.
  *
- * @group CMS_Content_(PS)
+ * @group CMS_Content
  * @ZephyrId MAGETWO-25186
  */
 class UpdateCmsPageEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageRewriteEntityTest.php
index edec851d866153f432f965ce18090bdaf9b1e727..43fd7e69ac35930fc3274c6042cdcc6e43ef4f9a 100644
--- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageRewriteEntityTest.php
@@ -28,14 +28,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save Redirect.
  * 6. Perform all assertions.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-26173
  */
 class UpdateCmsPageRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Config/Test/Block/System/Config/AdminForm.php b/dev/tests/functional/tests/app/Magento/Config/Test/Block/System/Config/AdminForm.php
new file mode 100644
index 0000000000000000000000000000000000000000..38bb261cb790e295919aea49f344e1dfbeba1cab
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Config/Test/Block/System/Config/AdminForm.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Config\Test\Block\System\Config;
+
+use Magento\Mtf\Block\Form;
+use Magento\Mtf\Client\Locator;
+
+/**
+ * Admin Security form in admin configurations.
+ *
+ * Locate Admin account sharing settings, see if its visible
+ */
+class AdminForm extends Form
+{
+    private $adminAccountSharingField = '#admin_security_admin_account_sharing';
+
+    public function adminAccountSharingAvailability()
+    {
+        return $this->_rootElement->find($this->adminAccountSharingField, Locator::SELECTOR_CSS)->isVisible();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Config/Test/Constraint/AssertAdminAccountSharing.php b/dev/tests/functional/tests/app/Magento/Config/Test/Constraint/AssertAdminAccountSharing.php
new file mode 100644
index 0000000000000000000000000000000000000000..ae01915bef395d5e1db6916f0adde804f0829bdf
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Config/Test/Constraint/AssertAdminAccountSharing.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Config\Test\Constraint;
+
+use Magento\Mtf\Constraint\AbstractConstraint;
+use Magento\Config\Test\Page\Adminhtml\AdminAccountSharing;
+
+/**
+ * Assert Admin account sharing is available in Stores>Configuration>advanced>admin grid.
+ */
+class AssertAdminAccountSharing extends AbstractConstraint
+{
+    /**
+     * Assert Admin account sharing is available in Stores>Configuration>advanced>admin grid.
+     * @param AdminAccountSharing $adminAccountSharing
+     */
+    public function processAssert(AdminAccountSharing $adminAccountSharing)
+    {
+        \PHPUnit_Framework_Assert::assertTrue(
+            $adminAccountSharing->getAdminForm()->adminAccountSharingAvailability(),
+            'Admin Account Sharing Option is not available'
+        );
+    }
+
+    /**
+     * Returns a string representation of the object.
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Admin Account Sharing option is available and present in Stores>Configuration>Advanced>Admin Grid.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Config/Test/Page/Adminhtml/AdminAccountSharing.xml b/dev/tests/functional/tests/app/Magento/Config/Test/Page/Adminhtml/AdminAccountSharing.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0369a7746d5282d5b570657b8aded49ca716b211
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Config/Test/Page/Adminhtml/AdminAccountSharing.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd">
+    <page name="AdminAccountSharing" area="Adminhtml" mca="admin/system_config/edit/section/admin/" module="Magento_Config">
+           <block name="adminForm" class="Magento\Config\Test\Block\System\Config\AdminForm" locator="[id='page:main-container']" strategy="css selector" />
+       </page>
+   </config>
diff --git a/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.php b/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..30928810490d770c5ea8309748b07aeabf45314a
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Config\Test\TestCase;
+
+use Magento\Mtf\TestCase\Injectable;
+use Magento\Config\Test\Page\Adminhtml\AdminAccountSharing;
+
+/**
+ * Steps:
+ * 1. Log in to Admin.
+ * 2. Go to Stores>Configuration>Advanced>admin>Security.
+ * 3. * 7. Verify admin Acoount Sharing option availability.
+ *
+ * @group Config_(PS)
+ * @ZephyrId MAGETWO-47822
+ */
+class VerifyAdminAccountSharingEntityTest extends Injectable
+{
+    /* tags */
+    const MVP = 'yes';
+    const DOMAIN = 'PS';
+    const TEST_TYPE = 'extended_acceptance_test';
+    /* end tags */
+
+    /**
+     * Admin account settings page.
+     *
+     * @var adminAccountSharing
+     */
+    private $adminAccountSharing;
+
+    /**
+     * @param AdminAccountSharing $adminAccountSharing
+     */
+    public function __inject(
+        AdminAccountSharing $adminAccountSharing
+    ) {
+        $this->adminAccountSharing = $adminAccountSharing;
+    }
+
+    /**
+     * Create Verify Admin Account Sharing test.
+     *
+     * @return void
+     */
+    public function test()
+    {
+        $this->adminAccountSharing->open();
+        sleep(10);
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.xml b/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.xml
new file mode 100644
index 0000000000000000000000000000000000000000..46b043e6fb5a6a89e5fbe4b5789d85398a4d7e13
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Config/Test/TestCase/VerifyAdminAccountSharingEntityTest.xml
@@ -0,0 +1,14 @@
+<?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\Config\Test\TestCase\VerifyAdminAccountSharingEntityTest" summary="Verify admin account sharing option availability" ticketId="MAGETWO-47822">
+        <variation name="VerifyAdminAccountSharingEntityTestVariation1" summary="Verify Admin Account Sharing is available by default">
+            <constraint name="Magento\Config\Test\Constraint\AssertAdminAccountSharing" />
+        </variation>
+      </testCase>
+  </config>
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php
index c800c8b1bfef5ca7a73f53ef6c76709dd886abfd..e72b98c93b93d4a154cc6a93eb2149f4407e2e53 100644
--- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php
@@ -33,7 +33,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Save product
  * 7. Perform all assertions
  *
- * @group Configurable_Product_(MX)
+ * @group Configurable_Product
  * @ZephyrId MAGETWO-26041
  */
 class CreateConfigurableProductEntityTest extends Injectable
@@ -41,7 +41,6 @@ class CreateConfigurableProductEntityTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php
index e9014ca2476cb50f3b8dceb758e91a866455425f..7ff2be303d677a944e5c2391a509882ecb7d3e96 100644
--- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 5. Save product.
  * 6. Perform all assertions.
  *
- * @group Configurable_Product_(MX)
+ * @group Configurable_Product
  * @ZephyrId MAGETWO-29916
  */
 class UpdateConfigurableProductEntityTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/EditCurrencySymbolEntityTest.php b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/EditCurrencySymbolEntityTest.php
index f98745d22e1a3aa59b13922ffc1b7b0a6fc5d1cc..14a9d6f283b278228f178f4f3a14ffbe7786aceb 100644
--- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/EditCurrencySymbolEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/EditCurrencySymbolEntityTest.php
@@ -20,14 +20,13 @@ use Magento\CurrencySymbol\Test\Fixture\CurrencySymbolEntity;
  * 4. Click 'Save Currency Symbols' button
  * 5. Perform all asserts.
  *
- * @group Currency_(PS)
+ * @group Currency
  * @ZephyrId MAGETWO-26600
  */
 class EditCurrencySymbolEntityTest extends AbstractCurrencySymbolEntityTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/ResetCurrencySymbolEntityTest.php b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/ResetCurrencySymbolEntityTest.php
index 25895dc27e772fafe104c30394b7dd0f70072246..8740b0000ff58324787941a92213528b6c24d11d 100644
--- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/ResetCurrencySymbolEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/ResetCurrencySymbolEntityTest.php
@@ -21,14 +21,13 @@ use Magento\CurrencySymbol\Test\Fixture\CurrencySymbolEntity;
  * 4. Click 'Save Currency Symbols' button
  * 5. Perform all asserts.
  *
- * @group Currency_(PS)
+ * @group Currency
  * @ZephyrId MAGETWO-26638
  */
 class ResetCurrencySymbolEntityTest extends AbstractCurrencySymbolEntityTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.php
index bc0fea4b563d39b4758f5dd71efedb9a70a129c4..8f5b671fec904f50e2294c4e7a91356abd131da5 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.php
@@ -25,14 +25,13 @@ use Magento\Customer\Test\Fixture\Customer;
  * 5. Save Customer Address.
  * 6. Perform assertions.
  *
- * @group VAT_ID_(CS)
+ * @group VAT_ID
  * @ZephyrId MAGETWO-12447
  */
 class ApplyVatIdTest extends AbstractApplyVatIdTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest.php
index ecc981db972518bfaf152ca9815d2eeb4899b2b5..a8774bb99569d59d596b6dcbe3e05d5b5c506381 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest.php
@@ -26,14 +26,13 @@ use Magento\Customer\Test\Page\CustomerAccountLogin;
  * 4. Fill form according to data set and save
  * 5. Perform all assertions
  *
- * @group Customer_Account_(CS)
+ * @group Customer_Account
  * @ZephyrId MAGETWO-29411
  */
 class ChangeCustomerPasswordTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php
index 0ad79c4c4933aabf7cb7963bdfaa981052d13ca1..bf3ae060a6d1b008aab6a94181008aa24149a08c 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.php
@@ -27,7 +27,6 @@ class CreateCustomerBackendEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.php
index 25ff9ff25db0454df5a3ec5e4f65e94b79725a4a..64051195daa32a808536adb8afaa6a5100c51ce6 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5.Click "Save Customer Group" button.
  * 6.Perform all assertions.
  *
- * @group Customer_Groups_(CS)
+ * @group Customer_Groups
  * @ZephyrId MAGETWO-23422
  */
 class CreateCustomerGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerBackendEntity.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerBackendEntity.php
index 502e9d06092080c8e56093ef2ea7c90ea0c6d34d..1f13c6ccdacdc1d4656b7c796b037a1e8069a27e 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerBackendEntity.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerBackendEntity.php
@@ -29,7 +29,6 @@ class CreateExistingCustomerBackendEntity extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerFrontendEntity.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerFrontendEntity.php
index 25108d19534f1571dca7f6dc31166c9b6bb27d32..7ac9b5284b3f0f2dee4059a8659e43f65532fee8 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerFrontendEntity.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateExistingCustomerFrontendEntity.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click 'Create account' button.
  * 5. Perform assertions.
  *
- * @group Customer_Account_(CS)
+ * @group Customer_Account
  * @ZephyrId MAGETWO-23545
  */
 class CreateExistingCustomerFrontendEntity extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php
index 7943a1d9932659779583bc0ab28e956a49e0ca53..61771665c059ed1783c3e3820a8005601d91e631 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Delete second address - click 'Delete Address' button.
  * 5. Perform all assertions.
  *
- * @group Customers_(CS)
+ * @group Customers
  * @ZephyrId MAGETWO-28066
  */
 class DeleteCustomerAddressTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.php
index c22526ed1a0783f69ea7e4ab1ad806b4b4d05a83..3e6916eb2b2525a57b50643def70bbd7abb6b726 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Fill in data according to dataset
  * 5. Perform all assertions according to dataset
  *
- * @group Customers_(CS)
+ * @group Customers
  * @ZephyrId MAGETWO-24764
  */
 class DeleteCustomerBackendEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerGroupEntityTest.php
index 0622ceb028f6077ee533971766d85283e1fc1445..f8c426a3efb00246c141c21998976acbd74c6e98 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerGroupEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Customer\Test\Fixture\Customer;
  *  5. Confirm in pop-up.
  *  6. Perform all assertions.
  *
- * @group Customer_Groups_(CS)
+ * @group Customer_Groups
  * @ZephyrId MAGETWO-25243
  */
 class DeleteCustomerGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteSystemCustomerGroupTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteSystemCustomerGroupTest.php
index 5d26493333672f6bc785f55c7aae0b7fb488595f..a9e09d24fb07f0c4ee21b7e8face3f99444c369b 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteSystemCustomerGroupTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteSystemCustomerGroupTest.php
@@ -17,14 +17,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 3. Select system Customer Group specified in data set from grid.
  * 4. Perform all assertions.
  *
- * @group Customer_Groups_(CS)
+ * @group Customer_Groups
  * @ZephyrId MAGETWO-53576
  */
 class DeleteSystemCustomerGroupTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.php
index 67afe99b2027433fc67ff886679b98d877c0e5e4..d257805dc54916082c58def59cfb0bc382cdcd9b 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.php
@@ -20,14 +20,13 @@ use Magento\Customer\Test\Page\CustomerAccountForgotPassword;
  * 3. Click forgot password button.
  * 4. Check forgot password message.
  *
- * @group Customer_(CS)
+ * @group Customer
  * @ZephyrId MAGETWO-37145
  */
 class ForgotPasswordOnFrontendTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.php
index de458ff0a8be1bd8aacb3cff6270082e329c6ef8..f7448024b93aa2d889a4ac35b31df900adb68aed 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.php
@@ -29,14 +29,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Click "Submit" button
  * 7. Perform all assertions
  *
- * @group Customer_Groups_(CS), Customers_(CS)
+ * @group Customer_Groups, Customers
  * @ZephyrId MAGETWO-27892
  */
 class MassAssignCustomerGroupTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php
index 37431c7878e3b28e7ce0b2174b0bcf59115a9016..598a44657246b8fe03a82df8f443e0b8d9e881ff 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click Submit button
  * 6. Perform all assertions according to dataset
  *
- * @group Customers_(CS)
+ * @group Customers
  * @ZephyrId MAGETWO-26848
  */
 class MassDeleteCustomerBackendEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/RegisterCustomerFrontendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/RegisterCustomerFrontendEntityTest.php
index b5be83035f01fac6c3e00fe5a071842fbe2761f4..b2bad9a3bd31b1e70f304a1c57ee6d814efbd164 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/RegisterCustomerFrontendEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/RegisterCustomerFrontendEntityTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click 'Create account' button.
  * 5. Perform assertions.
  *
- * @group Customer_Account_(CS)
+ * @group Customer_Account
  * @ZephyrId MAGETWO-23546
  */
 class RegisterCustomerFrontendEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.php
index fcc523db65c41fdbad4d5ee49ad27daf526fb881..d6820720d89bcc579e193a94a0bb8729f25eaeba 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.php
@@ -31,7 +31,6 @@ class UpdateCustomerBackendEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
@@ -101,23 +100,45 @@ class UpdateCustomerBackendEntityTest extends Injectable
             : $initialCustomer->getData();
         $groupId = $customer->hasData('group_id') ? $customer : $initialCustomer;
         $data['group_id'] = ['customerGroup' => $groupId->getDataFieldConfig('group_id')['source']->getCustomerGroup()];
+        $customerAddress = $this->prepareCustomerAddress($initialCustomer, $address, $addressToDelete);
+        if (!empty($customerAddress)) {
+            $data['address'] = $customerAddress;
+        }
+
+        return $this->fixtureFactory->createByCode(
+            'customer',
+            ['data' => $data]
+        );
+    }
+
+    /**
+     * Prepare address for customer entity.
+     *
+     * @param Customer $initialCustomer
+     * @param Address|null $address
+     * @param Address|null $addressToDelete
+     * @return array
+     */
+    private function prepareCustomerAddress(
+        Customer $initialCustomer,
+        Address $address = null,
+        Address $addressToDelete = null
+    ) {
+        $customerAddress = [];
 
         if ($initialCustomer->hasData('address')) {
             $addressesList = $initialCustomer->getDataFieldConfig('address')['source']->getAddresses();
             foreach ($addressesList as $key => $addressFixture) {
                 if ($addressToDelete === null || $addressFixture != $address) {
-                    $data['address'] = ['addresses' => [$key => $addressFixture]];
+                    $customerAddress = ['addresses' => [$key => $addressFixture]];
                 }
             }
         }
         if ($address !== null) {
-            $data['address']['addresses'][] = $address;
+            $customerAddress['addresses'][] = $address;
         }
 
-        return $this->fixtureFactory->createByCode(
-            'customer',
-            ['data' => $data]
-        );
+        return $customerAddress;
     }
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerFrontendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerFrontendEntityTest.php
index c3b50d4371f33cdaab152dff16b5a50033157d9b..34338371d45af849f54956588aee5a97c0f75ecd 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerFrontendEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerFrontendEntityTest.php
@@ -29,7 +29,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Fill fields with test data and save.
  * 7. Perform all assertions.
  *
- * @group Customer_Account_(CS)
+ * @group Customer_Account
  * @ZephyrId MAGETWO-25925
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -38,7 +38,6 @@ class UpdateCustomerFrontendEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.php
index 548333915c6908f7f2e5f9f6541437f9356eba77..7fda95c0be7d2e48e58cb2a01317704cc54a0b57 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save Customer Group" button
  * 6. Perform all assertions
  *
- * @group Customer_Groups_(CS)
+ * @group Customer_Groups
  * @ZephyrId MAGETWO-25536
  */
 class UpdateCustomerGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/VerifyDisabledCustomerGroupFieldTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/VerifyDisabledCustomerGroupFieldTest.php
index 243b8564481468571d6d45199cac42c42aa73793..dfe3afca43f0d2ad54a05a0b3ffbf82cfc7bc049 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/VerifyDisabledCustomerGroupFieldTest.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/VerifyDisabledCustomerGroupFieldTest.php
@@ -17,14 +17,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 3. Select system Customer Group specified in data set from grid.
  * 4. Perform all assertions.
  *
- * @group Customer_Groups_(CS)
+ * @group Customer_Groups
  * @ZephyrId MAGETWO-52481
  */
 class VerifyDisabledCustomerGroupFieldTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.php b/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.php
index 15567c4ef8d168d2bc8f7a0b18c963502c2c9a87..4d397bde28bf6a11dc2a11032de62c4b317154bc 100644
--- a/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.php
+++ b/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.php
@@ -24,14 +24,13 @@ use Magento\CurrencySymbol\Test\Page\Adminhtml\SystemCurrencyIndex;
  * 4. Click on 'Save Currency Rates' button.
  * 5. Perform assertions.
  *
- * @group Localization_(PS)
+ * @group Localization
  * @ZephyrId MAGETWO-36824
  */
 class CreateCurrencyRateTest extends Injectable
 {
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.php
index 117f04548773513afc2648aa035d19d87c2a4692..7cc3fd6375c3caaccb6525bb357cea4f0050d5a6 100644
--- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.php
@@ -22,7 +22,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Save product.
  * 7. Verify created product.
  *
- * @group Downloadable_Product_(MX)
+ * @group Downloadable_Product
  * @ZephyrId MAGETWO-23425
  */
 class CreateDownloadableProductEntityTest extends Injectable
@@ -30,7 +30,6 @@ class CreateDownloadableProductEntityTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php
index 6eb17b87a74e9f2b74f10afc1d94a655bfb79110..276cc08e8efb74f05c70868cdf67a77f452bb44a 100644
--- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php
@@ -30,14 +30,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save".
  * 6. Perform asserts.
  *
- * @group Downloadable_Product_(MX)
+ * @group Downloadable_Product
  * @ZephyrId MAGETWO-24775
  */
 class UpdateDownloadableProductEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Email/Test/Block/Adminhtml/Template/Edit/TemplateForm.php b/dev/tests/functional/tests/app/Magento/Email/Test/Block/Adminhtml/Template/Edit/TemplateForm.php
new file mode 100644
index 0000000000000000000000000000000000000000..8cd455b6bed8db02270d03fd42ad235cf74e5f9f
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Email/Test/Block/Adminhtml/Template/Edit/TemplateForm.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Email\Test\Block\Adminhtml\Template\Edit;
+
+use Magento\Mtf\Block\Form;
+use Magento\Mtf\Client\Locator;
+
+/**
+ * Click Load button in Email template form.
+ * this class needs to be created because we need a customized click on the 'Load' button, its not a standard click
+ */
+class TemplateForm extends Form
+{
+    private $loadButton = '#load';
+
+    /**
+     * @return void
+     */
+    public function clickLoadTemplate()
+    {
+        $element = $this->_rootElement->find($this->loadButton, Locator::SELECTOR_CSS); // locate the Load button
+        $element->click(); // click the load button
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Email/Test/Block/Adminhtml/Template/Edit/TemplateForm.xml b/dev/tests/functional/tests/app/Magento/Email/Test/Block/Adminhtml/Template/Edit/TemplateForm.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b8bd0ee922a061a124005838dc6381e758c4c002
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Email/Test/Block/Adminhtml/Template/Edit/TemplateForm.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+ -->
+<mapping strict="1">
+    <fields>
+        <template_select>
+            <selector>#template_select</selector>
+            <input>select</input>
+        </template_select>
+        <template_code/>
+    </fields>
+</mapping>
\ No newline at end of file
diff --git a/dev/tests/functional/tests/app/Magento/Email/Test/Constraint/AssertEmailTemplateSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Email/Test/Constraint/AssertEmailTemplateSuccessSaveMessage.php
new file mode 100644
index 0000000000000000000000000000000000000000..4fbba15df27e7663c851a40f958c14a9deb7e4c0
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Email/Test/Constraint/AssertEmailTemplateSuccessSaveMessage.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Email\Test\Constraint;
+
+use Magento\Email\Test\Page\Adminhtml\EmailTemplateIndex;
+use Magento\Mtf\Constraint\AbstractConstraint;
+
+/**
+ * Assertion to check Success Save Message for Email Template.
+ */
+class AssertEmailTemplateSuccessSaveMessage extends AbstractConstraint
+{
+    const SUCCESS_MESSAGE = 'You saved the email template.';
+
+    /**
+     * @param EmailTemplateIndex $emailTemplateIndex
+     */
+    public function processAssert(EmailTemplateIndex $emailTemplateIndex)
+    {
+        $actualMessage = $emailTemplateIndex->getMessagesBlock()->getSuccessMessage();
+        \PHPUnit_Framework_Assert::assertEquals(
+            self::SUCCESS_MESSAGE,
+            $actualMessage,
+            'Wrong success message is displayed.'
+            . "\nExpected: " . self::SUCCESS_MESSAGE
+            . "\nActual: " . $actualMessage
+        );
+    }
+
+    /**
+     * Text success save message is displayed
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Assert that success message is displayed.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Email/Test/Fixture/EmailTemplate.xml b/dev/tests/functional/tests/app/Magento/Email/Test/Fixture/EmailTemplate.xml
new file mode 100644
index 0000000000000000000000000000000000000000..92870a5ebab3b8412a3c191e58a7793a2fc169fd
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Email/Test/Fixture/EmailTemplate.xml
@@ -0,0 +1,30 @@
+<?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/fixture.xsd">
+    <fixture name="EmailTemplate"
+             module="Magento_Email"
+             type="flat"
+             collection="Magento\Email\Model\ResourceModel\Template\Collection"
+             repository_class="Magento\Email\Test\Repository\EmailTemplate"
+             handler_interface="Magento\Email\Test\Handler\EmailTemplate\EmailTemplateInterface"
+             class="Magento\Email\Test\Fixture\EmailTemplate"
+             entity_type="email_template">
+        <field name="template_select" is_required="1"/>
+        <field name="template_code" is_required="0"/>
+        <field name="template_text" is_required="0"/>
+        <field name="template_styles" is_required="0"/>
+        <field name="template_type" is_required="0"/>
+        <field name="template_subject" is_required="0"/>
+        <field name="template_sender_name" is_required="0"/>
+        <field name="template_sender_email" is_required="0"/>
+        <field name="added_at" is_required="0"/>
+        <field name="modified_at" is_required="0"/>
+        <field name="orig_template_code" is_required="0"/>
+        <field name="orig_template_variables" is_required="0"/>
+    </fixture>
+</config>
diff --git a/dev/tests/functional/tests/app/Magento/Email/Test/Page/Adminhtml/EmailTemplateIndex.xml b/dev/tests/functional/tests/app/Magento/Email/Test/Page/Adminhtml/EmailTemplateIndex.xml
new file mode 100644
index 0000000000000000000000000000000000000000..dbb64d68dcd9ecca556a7926533496fe287d9498
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Email/Test/Page/Adminhtml/EmailTemplateIndex.xml
@@ -0,0 +1,13 @@
+<?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/pages.xsd">
+    <page name="EmailTemplateIndex" area="Adminhtml" mca="admin/email_template/" module="Magento_Email">
+        <block name="pageActionsBlock" class="Magento\Backend\Test\Block\GridPageActions" locator=".page-main-actions" strategy="css selector"/>
+        <block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator="#messages .messages" strategy="css selector"/>
+    </page>
+</config>
diff --git a/dev/tests/functional/tests/app/Magento/Email/Test/Page/Adminhtml/EmailTemplateNew.xml b/dev/tests/functional/tests/app/Magento/Email/Test/Page/Adminhtml/EmailTemplateNew.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9c0b1a626e139fc7dc37d73d3c94890254f43430
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Email/Test/Page/Adminhtml/EmailTemplateNew.xml
@@ -0,0 +1,13 @@
+<?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/pages.xsd">
+    <page name="EmailTemplateNew" area="Adminhtml" mca="admin/email_template/new/" module="Magento_Email">
+        <block name="templateForm" class="Magento\Email\Test\Block\Adminhtml\Template\Edit\TemplateForm" locator="[id='page:main-container']" strategy="css selector" />
+        <block name="formPageActions" class="Magento\Backend\Test\Block\FormPageActions" locator=".page-main-actions" strategy="css selector" />
+    </page>
+</config>
\ No newline at end of file
diff --git a/dev/tests/functional/tests/app/Magento/Email/Test/TestCase/CreateEmailTemplateEntityTest.php b/dev/tests/functional/tests/app/Magento/Email/Test/TestCase/CreateEmailTemplateEntityTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..dc86b6479757e00564877fa3f52c7e5c6c3ef4f5
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Email/Test/TestCase/CreateEmailTemplateEntityTest.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Email\Test\TestCase;
+
+use Magento\Mtf\TestCase\Injectable;
+use Magento\Email\Test\Page\Adminhtml\EmailTemplateIndex;
+use Magento\Email\Test\Page\Adminhtml\EmailTemplateNew;
+use Magento\Email\Test\Fixture\EmailTemplate;
+
+/**
+ * Steps:
+ * 1. Log in to Admin.
+ * 2. Open the Email Templates page.
+ * 3. Click the "Add New Template" button.
+ * 4. Select Email Template.
+ * 5. Click the "Load Template" button.
+ * 6. Enter Email Template name.
+ * 7. Click the "Save" button.
+ * 8. Verify the email template saved successfully.
+ * @group Email_(PS)
+ * @ZephyrId MAGETWO-17155
+ */
+
+class CreateEmailTemplateEntityTest extends Injectable
+{
+    /* tags */
+    const MVP = 'yes';
+    const DOMAIN = 'PS';
+    const TEST_TYPE = 'extended_acceptance_test';
+    /* end tags */
+
+    /**
+     * Email Template Index page.
+     *
+     * @var EmailTemplateIndex
+     */
+    private $emailTemplateIndex;
+
+    /**
+     * New EmailTemplate page.
+     *
+     * @var EmailTemplateNew
+     */
+    private $emailTemplateNew;
+
+    /**
+     * Inject Email template pages.
+     *
+     * @param EmailTemplateIndex $emailTemplateIndex
+     * @param EmailTemplateNew $emailTemplateNew
+     * @return void
+     */
+    public function __inject(
+        EmailTemplateIndex $emailTemplateIndex,
+        EmailTemplateNew $emailTemplateNew
+    ) {
+        $this->emailTemplateIndex = $emailTemplateIndex;
+        $this->emailTemplateNew = $emailTemplateNew;
+    }
+
+    /**
+     * @param EmailTemplate $emailTemplate
+     */
+
+    public function test(EmailTemplate $emailTemplate)
+    {
+        $this->emailTemplateIndex->open();
+        $this->emailTemplateIndex->getPageActionsBlock()->addNew();
+        $this->emailTemplateNew->getTemplateForm()->fill($emailTemplate);
+        $this->emailTemplateNew->getTemplateForm()->clickLoadTemplate();
+        $this->emailTemplateNew->getFormPageActions()->save();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Email/Test/TestCase/CreateEmailTemplateEntityTest.xml b/dev/tests/functional/tests/app/Magento/Email/Test/TestCase/CreateEmailTemplateEntityTest.xml
new file mode 100644
index 0000000000000000000000000000000000000000..57b95ad4243004363cf7e703296c6b320793b564
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Email/Test/TestCase/CreateEmailTemplateEntityTest.xml
@@ -0,0 +1,16 @@
+<?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\Email\Test\TestCase\CreateEmailTemplateEntityTest" summary="Create new email template" ticketId="MAGETWO-17155">
+        <variation name="CreateEmailTemplateEntityTestVariation1" summary="Create Change Email template">
+            <data name="EmailTemplate/data/template_select" xsi:type="string">Change Email</data>
+            <data name="EmailTemplate/data/template_code" xsi:type="string">Test code_%isolation%</data>
+            <constraint name="Magento\Email\Test\Constraint\AssertEmailTemplateSuccessSaveMessage" />
+        </variation>
+    </testCase>
+</config>
\ No newline at end of file
diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php
index 4d349580bd74bc0ab431d47de8031ce9b2c72055..e33adb68be4eb6eeb05753b072d394804acefb4a 100644
--- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php
+++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 4. Complete Checkout steps
  * 5. Perform all asserts
  *
- * @group Gift_Messages_(CS)
+ * @group Gift_Messages
  * @ZephyrId MAGETWO-28978
  */
 class CheckoutWithGiftMessagesTest extends Scenario
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     const TO_MAINTAIN = 'yes'; // Consider variation #2 to work correctly with Virtual products
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.php
index 7126dfa00a9f2d48ba19e0ba600ddbea3c69f0fe..bbe3b5ace0e830f36272d7a8b4d8f49cfa24e791 100644
--- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.php
@@ -29,7 +29,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 7. Save the Product.
  * 8. Perform assertions.
  *
- * @group Grouped_Product_(MX)
+ * @group Grouped_Product
  * @ZephyrId MAGETWO-24877
  */
 class CreateGroupedProductEntityTest extends Injectable
@@ -37,7 +37,6 @@ class CreateGroupedProductEntityTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.php
index 36c67db2ec306340255125011f0002d06ab5ce92..224fcbd3170bbe40ee4fe5164a75184acd8860ee 100644
--- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save the Product.
  * 6. Perform all assertions.
  *
- * @group Grouped_Product_(MX)
+ * @group Grouped_Product
  * @ZephyrId MAGETWO-26462
  */
 class UpdateGroupedProductEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php
index 427bec3528169fab1049ba1d212251f70539b505..f7931b03e3def69ddb02f6c73c7c0381fd8cf0c1 100644
--- a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php
+++ b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php
@@ -37,7 +37,7 @@ use Magento\Install\Test\Constraint\AssertAdminUriAutogenerated;
  * 12. Click "Next" and on the "Step 6: Install" page click "Install Now" button.
  * 13. Perform assertions.
  *
- * @group Installer_and_Upgrade/Downgrade_(PS)
+ * @group Installer_and_Upgrade/Downgrade
  * @ZephyrId MAGETWO-31431
  */
 class InstallTest extends Injectable
diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php
index b6e81512c9f32b8301009e39587e0b766f094d00..b8fa9638dc21ed6cb63de8df8de2ade8592de329 100644
--- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 3. Click on the "Activate" link near required integration.
  * 4. Perform all assertions.
  *
- * @group Web_API_Framework_(PS)
+ * @group Web_API_Framework
  * @ZephyrId MAGETWO-26119
  */
 class ActivateIntegrationEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationEntityTest.php
index 53e6c9fef1332acc39e8ff3d401d7475ae0b4e01..d7bd5b93ef0c6c621a1cb1583007b2a8f323bb5a 100644
--- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationEntityTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save" button.
  * 6. Perform all assertions.
  *
- * @group Web_API_Framework_(PS)
+ * @group Web_API_Framework
  * @ZephyrId MAGETWO-26009, MAGETWO-16755, MAGETWO-16819, MAGETWO-16820
  */
 class CreateIntegrationEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationWithDuplicatedNameTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationWithDuplicatedNameTest.php
index 2f5b450f7bd3d34a5c2c4b56fe013864215544b9..52d6dea9a13ac7c0bf8df3a2c85d7442dae32bab 100644
--- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationWithDuplicatedNameTest.php
+++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/CreateIntegrationWithDuplicatedNameTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 8. Click "Save" button
  * 9. Perform all assertions
  *
- * @group Web_API_Framework_(PS)
+ * @group Web_API_Framework
  * @ZephyrId MAGETWO-16756
  */
 class CreateIntegrationWithDuplicatedNameTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/DeleteIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/DeleteIntegrationEntityTest.php
index 894cdccadd6beac909966a95dea52faf0e2d02ab..c2878aeda72e4e402904b7041fa75f3e5db069c6 100644
--- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/DeleteIntegrationEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/DeleteIntegrationEntityTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Delete" button.
  * 5. Perform all assertions.
  *
- * @group Web_API_Framework_(PS)
+ * @group Web_API_Framework
  * @ZephyrId MAGETWO-26058
  */
 class DeleteIntegrationEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php
index ed373ed2a58cbda24bcf73d4b6bf699ac37a85df..2af446b97b0cf502a55890a122a65aaecce0e96d 100644
--- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click Done.
  * 5. Perform assertions.
  *
- * @group Integrations_(PS)
+ * @group Integrations
  * @ZephyrId MAGETWO-29648
  */
 class ReAuthorizeTokensIntegrationEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/UpdateIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/UpdateIntegrationEntityTest.php
index fc246582127fc374a0305e23d88c1fb65248609e..a349ba386508397fc8af6024f92a439c1c6ff76a 100644
--- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/UpdateIntegrationEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/UpdateIntegrationEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save" button.
  * 6. Perform all assertions.
  *
- * @group Web_API_Framework_(PS)
+ * @group Web_API_Framework
  * @ZephyrId MAGETWO-26102
  */
 class UpdateIntegrationEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.php b/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.php
index 976d52fb0f15650be1b1944aa6627c3c2e1d6729..543880aea127310181be8b7e7d5663495e8202ba 100644
--- a/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.php
+++ b/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.php
@@ -20,13 +20,12 @@ use Magento\Mtf\TestCase\Injectable;
  * 2. Create product with created category.
  * 3. Perform all assertions.
  *
- * @group Layered_Navigation_(MX)
+ * @group Layered_Navigation
  * @ZephyrId MAGETWO-12419
  */
 class FilterProductListTest extends Injectable
 {
     /* tags */
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Msrp/Test/TestCase/ApplyMapTest.php b/dev/tests/functional/tests/app/Magento/Msrp/Test/TestCase/ApplyMapTest.php
index 19332e899e1aba5141edf448053f4add8503693d..f6f9c912f358da9bc7bc233ddfe2da86cb6a911e 100644
--- a/dev/tests/functional/tests/app/Magento/Msrp/Test/TestCase/ApplyMapTest.php
+++ b/dev/tests/functional/tests/app/Magento/Msrp/Test/TestCase/ApplyMapTest.php
@@ -13,13 +13,12 @@ use Magento\Mtf\TestCase\Injectable;
  * 1. Create product.
  * 2. Perform all assertions.
  *
- * @group MAP_(MX)
+ * @group MAP
  * @ZephyrId MAGETWO-12430, MAGETWO-12847
  */
 class ApplyMapTest extends Injectable
 {
     /* tags */
-    const DOMAIN = 'MX';
     const MVP = 'yes';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php
index 99d9fff1465d44f3cd48c138baedcc380533aa4e..a79ea3995eeff08464befe26a71e61171af3bc2e 100644
--- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Select action in action dropdown for created template according to dataset
  * 5. Perform all assertions
  *
- * @group Newsletters_(MX)
+ * @group Newsletters
  * @ZephyrId MAGETWO-27043
  */
 class ActionNewsletterTemplateEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/CreateNewsletterTemplateEntityTest.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/CreateNewsletterTemplateEntityTest.php
index 314670ad2d177b2ffce48a2c5356a0a05a776675..62fb186a3c6744ec9d35ede421516852d27da746 100644
--- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/CreateNewsletterTemplateEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/CreateNewsletterTemplateEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save.
  * 6. Perform asserts.
  *
- * @group Newsletters_(MX)
+ * @group Newsletters
  * @ZephyrId MAGETWO-23302
  */
 class CreateNewsletterTemplateEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/PreviewNewsletterTemplateEntityTest.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/PreviewNewsletterTemplateEntityTest.php
index bd30c443ca0c18a41fba7a760222859df7e7025a..2ec44f0e303134d8fd5d703b83a4466e8cc1d6be 100644
--- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/PreviewNewsletterTemplateEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/PreviewNewsletterTemplateEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Preview Template" button at the top of the page
  * 5. Perform all assertions
  *
- * @group Newsletters_(MX)
+ * @group Newsletters
  * @ZephyrId MAGETWO-51979
  */
 class PreviewNewsletterTemplateEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/UpdateNewsletterTemplateTest.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/UpdateNewsletterTemplateTest.php
index ed27d43681e082e06a743bdeb6b5f8470434c128..f6d29ba6a843bd9f780e7a04a1fc32dcb07576c5 100644
--- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/UpdateNewsletterTemplateTest.php
+++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/UpdateNewsletterTemplateTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Save Template' button
  * 6. Perform asserts
  *
- * @group Newsletters_(MX)
+ * @group Newsletters
  * @ZephyrId MAGETWO-29427
  */
 class UpdateNewsletterTemplateTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/PageCache/Test/TestCase/FlushAdditionalCachesTest.php b/dev/tests/functional/tests/app/Magento/PageCache/Test/TestCase/FlushAdditionalCachesTest.php
index af7cdfc69979a3f16576547202c4a35540fb5508..8fd543d88a8af536a15e90e68bdeb7fdfc44a3ef 100644
--- a/dev/tests/functional/tests/app/Magento/PageCache/Test/TestCase/FlushAdditionalCachesTest.php
+++ b/dev/tests/functional/tests/app/Magento/PageCache/Test/TestCase/FlushAdditionalCachesTest.php
@@ -22,7 +22,6 @@ class FlushAdditionalCachesTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/PageCache/Test/TestCase/FlushStaticFilesCacheButtonVisibilityTest.php b/dev/tests/functional/tests/app/Magento/PageCache/Test/TestCase/FlushStaticFilesCacheButtonVisibilityTest.php
index f07546b100640f4dd71aacf6b1a33de0bf2d71e7..28090b866290370fff0ec8b48bde0d196ffb6d5b 100644
--- a/dev/tests/functional/tests/app/Magento/PageCache/Test/TestCase/FlushStaticFilesCacheButtonVisibilityTest.php
+++ b/dev/tests/functional/tests/app/Magento/PageCache/Test/TestCase/FlushStaticFilesCacheButtonVisibilityTest.php
@@ -21,7 +21,6 @@ class FlushStaticFilesCacheButtonVisibilityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
     
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromProductPageTest.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromProductPageTest.php
index be6c223a2503c1f172a186413e596f4c36df5ed5..c8fb3e4f30f19834d1587cf1a1290aeeace7b958 100644
--- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromProductPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromProductPageTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 5. Process checkout via PayPal.
  * 6. Perform asserts.
  *
- * @group PayPal_(CS)
+ * @group PayPal
  * @ZephyrId MAGETWO-12415
  */
 class ExpressCheckoutFromProductPageTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     const TO_MAINTAIN = 'yes';
     /* end tags */
diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromShoppingCartTest.php
index fc85feb524baf534c3e5de95e457988b49a6b56e..7fc35ff1eb6fd83e929886bcdeac741de868fe68 100644
--- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromShoppingCartTest.php
+++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromShoppingCartTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 5. Process checkout via PayPal.
  * 6. Perform asserts.
  *
- * @group PayPal_(CS)
+ * @group PayPal
  * @ZephyrId MAGETWO-12414
  */
 class ExpressCheckoutFromShoppingCartTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     const TO_MAINTAIN = 'yes';
     /* end tags */
diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutOnePageTest.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutOnePageTest.php
index f57544ae5a663b1dc0dd183a0054901c3ba47777..b40adf986dbe9a7311fec484411bb8a7ed50810d 100644
--- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutOnePageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutOnePageTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 5. Process checkout via PayPal.
  * 6. Perform asserts.
  *
- * @group PayPal_(CS)
+ * @group PayPal
  * @ZephyrId MAGETWO-12413, MAGETWO-14359, MAGETWO-12996
  */
 class ExpressCheckoutOnePageTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     const TO_MAINTAIN = 'yes';
     /* end tags */
diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/InContextExpressCheckoutFromShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/InContextExpressCheckoutFromShoppingCartTest.php
index 9637d95a7216b949421c0f2b69257c0ca40f206b..07f03b1c931cfc0c547f781451630fa828101294 100644
--- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/InContextExpressCheckoutFromShoppingCartTest.php
+++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/InContextExpressCheckoutFromShoppingCartTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 5. Click "Cancel".
  * 6. Perform asserts.
  *
- * @group PayPal_(CS)
+ * @group PayPal
  * @ZephyrId MAGETWO-47213
  */
 class InContextExpressCheckoutFromShoppingCartTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     const TO_MAINTAIN = 'yes';
     /* end tags */
diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/InContextExpressOnePageCheckoutTest.php b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/InContextExpressOnePageCheckoutTest.php
index 1cc9e00df7ec907652fb071c3d1daee2f7f86e95..ff06e6b10266ef4b723811bf143b648aa59853e9 100644
--- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/InContextExpressOnePageCheckoutTest.php
+++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/InContextExpressOnePageCheckoutTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 5. Click "Cancel".
  * 6. Perform asserts.
  *
- * @group PayPal_(CS)
+ * @group PayPal
  * @ZephyrId MAGETWO-47261
  */
 class InContextExpressOnePageCheckoutTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     const TO_MAINTAIN = 'yes';
     /* end tags */
diff --git a/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/AddProductVideoTest.php b/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/AddProductVideoTest.php
index e0fff16f9cbd5cd5bbe2b5168aa170feef980d22..c5175df4ad0787b48cb5f9d54bacc3c76057d520 100644
--- a/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/AddProductVideoTest.php
+++ b/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/AddProductVideoTest.php
@@ -24,7 +24,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Click "Save" button on product page.
  * 7. Perform asserts.
  *
- * @group ProductVideo_(MX)
+ * @group ProductVideo
  * @ZephyrId MAGETWO-43673
  */
 class AddProductVideoTest extends Injectable
@@ -32,7 +32,6 @@ class AddProductVideoTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/DeleteProductVideoTest.php b/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/DeleteProductVideoTest.php
index 63f3fa8f4f49a39f217cba98680dcb6a0739a641..ebc5e0ccf93b48b61d49f3fdaca168f1cb66ed91 100644
--- a/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/DeleteProductVideoTest.php
+++ b/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/DeleteProductVideoTest.php
@@ -26,7 +26,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 8. Click "Save" button on product page.
  * 9. Perform asserts.
  *
- * @group ProductVideo_(MX)
+ * @group ProductVideo
  * @ZephyrId MAGETWO-43660
  */
 class DeleteProductVideoTest extends Injectable
@@ -34,7 +34,6 @@ class DeleteProductVideoTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/UpdateProductVideoTest.php b/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/UpdateProductVideoTest.php
index b6c4fdc25dc786a408f99e7cdc7c01697f6102d9..30df076817dff80416933e9bccf11d598fb28a87 100644
--- a/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/UpdateProductVideoTest.php
+++ b/dev/tests/functional/tests/app/Magento/ProductVideo/Test/TestCase/UpdateProductVideoTest.php
@@ -27,7 +27,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 9. Click "Save" button on product page
  * 10. Perform asserts.
  *
- * @group ProductVideo_(MX)
+ * @group ProductVideo
  * @ZephyrId MAGETWO-43664, @ZephyrId MAGETWO-43656, @ZephyrId MAGETWO-43661, @ZephyrId MAGETWO-43663
  */
 class UpdateProductVideoTest extends Injectable
@@ -35,7 +35,6 @@ class UpdateProductVideoTest extends Injectable
     /* tags */
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php
index 20feecc8a54310a50f5947f8dd0ad03e7f4ab595..5930e63b9d3bd367a4c93fb241cc64613fa9aea6 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Catalog\Test\Page\Product\CatalogProductView;
  * 3. Click "Reset Filter".
  * 4. Perform all assertions.
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-28558
  */
 class AbandonedCartsReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest.php
index 317ea3cd16c10a70ca0d74d9ea9604e6c199f27c..3eb5237eddd97fc076cd1702938291cdfae92161 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/BestsellerProductsReportEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Show report".
  * 5. Perform all assertions.
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-28222
  */
 class BestsellerProductsReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderCountReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderCountReportEntityTest.php
index e27ddbd5be6c4bc3984595d91acd24ac8521814c..cacb6e5a329bff99eb28fd62118f440c569ade46 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderCountReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderCountReportEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click button Refresh
  * 5. Perform all assertions
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-28521
  */
 class CustomersOrderCountReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderTotalReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderTotalReportEntityTest.php
index fe4454065b7f99edc0aec26367b2df92cf6ead50..c366cedb3c3a99825b18b8527555c935b33b641a 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderTotalReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderTotalReportEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click button Refresh
  * 5. Perform all assertions
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-28358
  */
 class CustomersOrderTotalReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest.php
index 97ea72404ecdd43bddbb475f12f395cea97023b5..97dc365d62338e83d1418ab1b4ce4587e80ddd25 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/DownloadProductsReportEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 2. Go to Reports > Products > Downloads.
  * 3. Perform all assertions.
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-28823
  */
 class DownloadProductsReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.php
index b925a6f049c136d89e3a36edc713eacb898f48bb..0dd87bde327c9f3e30c876c682b57563ace9df61 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.php
@@ -18,14 +18,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 2. Open Reports > Low Stock.
  * 3. Perform appropriate assertions.
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-27193
  */
 class LowStockProductsReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.php
index 2c24ef791c6297eea84d3e30483f2bd2dbea13e8..bb5f8644d4359e70f12060e97bf849a009332de9 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Refresh button".
  * 5. Perform all assertions.
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-27742
  */
 class NewAccountsReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/OrderedProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/OrderedProductsReportEntityTest.php
index ca1b3594b118a23082295fe8d36e2bb8d0bfd1c9..7d0d13862e7720b0b63516639d8b4968909c66cc 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/OrderedProductsReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/OrderedProductsReportEntityTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Refresh button"
  * 5. Perform all assertions
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-28200
  */
 class OrderedProductsReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.php
index fb8007bc24434fbde98878abe62e09f48601cd2b..148c0a69cecaa950cf4e4b3641ec163320c4f8e1 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Add product to cart as unregistered customer
  * 5. Perform all assertions
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-27952
  */
 class ProductsInCartReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ReviewReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ReviewReportEntityTest.php
index 9ed56a46e565ef0c489229d3b89af959cad8fc5b..376e5662320b89de024821f22fa32d070171f615 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ReviewReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ReviewReportEntityTest.php
@@ -29,7 +29,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click Submit review.
  * 5. Perform appropriate assertions.
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-27555
  * @ZephyrId MAGETWO-27223
  *
@@ -39,7 +39,6 @@ class ReviewReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesCouponReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesCouponReportEntityTest.php
index de3f9e60f3fba8bb503ba8464fe318cb4270b482..0d59b989fc25fc162e450ce719c96413229c45fe 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesCouponReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesCouponReportEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Show report"
  * 5. Perform all assertions
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-28190
  */
 class SalesCouponReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.php
index 6e480ca94bc84849663ad9606759283dc7d2e2a3..3ebfd4746a858f92381e9c58e8b20cc84356c0be 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.php
@@ -30,14 +30,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Show Report"
  * 5. Perform all assertions
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-29216
  */
 class SalesInvoiceReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesOrderReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesOrderReportEntityTest.php
index 014148b561ead3562c7cbf0aec5fae5cb1b77df9..c1eb4e8b35c3f3373abd2aed6d42f091d497c576 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesOrderReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesOrderReportEntityTest.php
@@ -30,14 +30,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Show Report"
  * 5. Perform all assertions
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-29136
  */
 class SalesOrderReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesRefundsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesRefundsReportEntityTest.php
index 2b411a19c22ed4bf092d0ee6d4b7b4caf35f888c..692e9024a2212ee3ed52a5f9fc4c896f0a408748 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesRefundsReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesRefundsReportEntityTest.php
@@ -29,14 +29,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click button Show Report
  * 5. Perform Asserts
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-29348
  */
 class SalesRefundsReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest.php
index 844a30bed98a35db02ba562b816bfda1548dbae4..0d5249ef4d06f79f39ad4644eb7dc7f648fc7071 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesTaxReportEntityTest.php
@@ -32,7 +32,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Show report".
  * 5. Perform all assertions.
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-28515
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -41,7 +41,6 @@ class SalesTaxReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php
index 69ed5fbce7d2402eac59ae1ed1f1c819873bc388..1175942452f89d8680267d2d21cd463cbde62ba3 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 3. Navigate to: Reports > Search Terms.
  * 4. Perform appropriate assertions.
  *
- * @group Search_Terms_(MX)
+ * @group Search_Terms
  * @ZephyrId MAGETWO-27106
  */
 class SearchTermsReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php
index 3f45a0541fe7c1eaa4e1d0e0182d67c430c1fd5f..905fa8fb70f0cebff985cf4a99d193359969e5e1 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Cms\Test\Page\CmsIndex;
  * 4. Click "Show report"
  * 5. Perform all assertions
  *
- * @group Reports_(MX)
+ * @group Reports
  * @ZephyrId MAGETWO-27954
  */
 class ViewedProductsReportEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
@@ -63,6 +62,7 @@ class ViewedProductsReportEntityTest extends Injectable
      * @var CatalogProductIndex
      */
     protected $catalogProductIndexPage;
+
     /**
      * Catalog product index page
      *
@@ -150,7 +150,11 @@ class ViewedProductsReportEntityTest extends Injectable
         foreach ($products as $key => $product) {
             for ($i = 0; $i < $total[$key]; $i++) {
                 $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
-                $this->assertEquals($product->getName(), $this->cmsIndex->getTitleBlock()->getTitle(), 'Could not open product page');
+                $this->assertEquals(
+                    $product->getName(),
+                    $this->cmsIndex->getTitleBlock()->getTitle(),
+                    'Could not open product page.'
+                );
             }
         }
     }
diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php
index f25b46c53123aca6c835d377b432b2278a5ed8e2..648de4bf40183fd33b0373c57cfc6dc4aa60859e 100644
--- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save Rating.
  * 6. Perform asserts.
  *
- * @group Reviews_and_Ratings_(MX)
+ * @group Reviews_and_Ratings
  * @ZephyrId MAGETWO-23331
  */
 class CreateProductRatingEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.php
index d7de5f52103d8b4aa806a548bc732616cc1f8f9f..aeeff3480e4a623c23f8491f19a180f2acbcab48 100644
--- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Click "Save Review" button.
  * 7. Perform Asserts.
  *
- * @group Reviews_and_Ratings_(MX)
+ * @group Reviews_and_Ratings
  * @ZephyrId MAGETWO-26476
  */
 class CreateProductReviewBackendEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php
index fa46c5d51583bbb14156efcfd92bf455bbaa9187..2e764636789e1c91f2907b67bdf0b58eac653f9b 100644
--- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. click "Submit review".
  * 6. Perform all assertions.
  *
- * @group Reviews_and_Ratings_(MX)
+ * @group Reviews_and_Ratings
  * @ZephyrId MAGETWO-25519
  */
 class CreateProductReviewFrontendEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php
index 71fcc265d9af2bdec2af2f0d03708ff717179fb1..316af94078849f8f60630fdda7da2a94335f45c9 100644
--- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Delete Rating' button.
  * 6. Perform all asserts.
  *
- * @group Reviews_and_Ratings_(MX)
+ * @group Reviews_and_Ratings
  * @ZephyrId MAGETWO-23276
  */
 class DeleteProductRatingEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php
index 09ed2350b0c1f70a755126ccfca951f233aff00e..fc58266356223d48457d54a14d508a01712acc4c 100644
--- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php
@@ -34,7 +34,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 7. Click "Submit review".
  * 8. Perform all assertions.
  *
- * @group Reviews_and_Ratings_(MX)
+ * @group Reviews_and_Ratings
  * @ZephyrId MAGETWO-27625
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -43,7 +43,6 @@ class ManageProductReviewFromCustomerPageTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/MassActionsProductReviewEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/MassActionsProductReviewEntityTest.php
index 0cc043c4c33888a7f99bdfcff52def1f71aa9b07..027b299e71072febe63d2cbe61cd754b11f1acba 100644
--- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/MassActionsProductReviewEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/MassActionsProductReviewEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Click "Submit" button.
  * 7. Perform Asserts.
  *
- * @group Reviews_and_Ratings_(MX)
+ * @group Reviews_and_Ratings
  * @ZephyrId MAGETWO-26618
  */
 class MassActionsProductReviewEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.php
index d0dcf9a14eb2a93c3bba3f162322eb4bb657e1a8..dbe89b387e61587f938a1c62b7c1fd0baa67e1b7 100644
--- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save.
  * 6. Perform all assertions.
  *
- * @group Reviews_and_Ratings_(MX)
+ * @group Reviews_and_Ratings
  * @ZephyrId MAGETWO-26768
  */
 class ModerateProductReviewEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php
index 555217246c65b3e20ee40a8ef8d921a3bf23174c..9f343bdfc10febfdadca024043bead211881c0b3 100644
--- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php
@@ -28,7 +28,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Save changes.
  * 7. Perform all assertions.
  *
- * @group Reviews_and_Ratings_(MX)
+ * @group Reviews_and_Ratings
  * @ZephyrId MAGETWO-27743
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -36,7 +36,6 @@ class UpdateProductReviewEntityOnProductPageTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.php
index e82f3637a133a048ae52e03f6ec8a0bc74a1e2de..a5901a6211a251329f32e1aaa42636850bd8a952 100644
--- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Submit review".
  * 6. Perform all assertions.
  *
- * @group Reviews_and_Ratings_(MX)
+ * @group Reviews_and_Ratings
  * @ZephyrId MAGETWO-25604
  */
 class UpdateProductReviewEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/AssignCustomOrderStatusTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/AssignCustomOrderStatusTest.php
index 62bc18ee07f1eb987793e2b00cd51ee5a78c2be9..6d49174e069a601163adb5915763901842a2cc22 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/AssignCustomOrderStatusTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/AssignCustomOrderStatusTest.php
@@ -29,7 +29,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 7. Create Order.
  * 8. Perform all assertions from dataset.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-29382
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -37,7 +37,6 @@ class AssignCustomOrderStatusTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php
index 91f697e332baa7437f8e83ea20ca97d9452f4e22..1779ad437c76e4192fd8c9774fc5a6f0ab8ccafb 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Do cancel Order.
  * 5. Perform all assetions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-28191
  */
 class CancelCreatedOrderTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.php
index 57f18d9e8644de806f32c2364b6e1230124dcd1f..ed00a414bd0e689cfdb15b75ccf5d795ca40c992 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. On order's page click 'Refund offline' button.
  * 5. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-29116
  */
 class CreateCreditMemoEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php
index 66ddf31ca0ebdfc49dd086ed37670bf4bf6c75ab..3dc689a38527153dbef1f3ff9646cacaa6ee203f 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save order status.
  * 6. Verify created order status.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-23412
  */
 class CreateCustomOrderStatusEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.php
index 1bde546b2d644d01af3642755ac86eed35d4a7eb..f62583583c3dc565579196d24ed564a14613eef9 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Submit Invoice' button.
  * 6. Perform assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-28209
  */
 class CreateInvoiceEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOnlineInvoiceEntityTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOnlineInvoiceEntityTest.php
index c871d382fbee9202b6443238c3437c63340091e6..c3b00b4b7f7942176300450faf9a0b42c956942b 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOnlineInvoiceEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOnlineInvoiceEntityTest.php
@@ -32,14 +32,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 16. Click 'Submit Invoice' button.
  * 17. Perform assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-47010
  */
 class CreateOnlineInvoiceEntityTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.php
index c5bd68ab71c0714eec039e07bc1c456c8ce79060..284a09f42332fa456107017db9fb9bb5c78b3e65 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 11. Submit Order.
  * 12. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-28696
  */
 class CreateOrderBackendTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test, 3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/HoldCreatedOrderTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/HoldCreatedOrderTest.php
index 9e6b2c9556a5d375dfec5ea8c28cd33d90761ad8..8b45a8a22eecf91511eb4143d70024c0171b5416 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/HoldCreatedOrderTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/HoldCreatedOrderTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Do 'Hold' for Order.
  * 5. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-28214
  */
 class HoldCreatedOrderTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MassOrdersUpdateTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MassOrdersUpdateTest.php
index 5735c26625106bf1050153b591bc9f2a7548769c..4f62fa07bba4261ae6cb78e6f2e1cdcfda57928a 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MassOrdersUpdateTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MassOrdersUpdateTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Submit.
  * 5. Perform Asserts.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-27897
  */
 class MassOrdersUpdateTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveLastOrderedProductsOnOrderPageTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveLastOrderedProductsOnOrderPageTest.php
index 7c41d7c1894ca64af2fe1aa683c69e6cea16ac7a..719ae5863051343b253bf503c8b3535cf411a186 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveLastOrderedProductsOnOrderPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveLastOrderedProductsOnOrderPageTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click Update Changes.
  * 6. Perform all assertions.
  *
- * @group Customers_(CS), Order_Management_(CS)
+ * @group Customers, Order_Management
  * @ZephyrId MAGETWO-27640
  */
 class MoveLastOrderedProductsOnOrderPageTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveProductsInComparedOnOrderPageTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveProductsInComparedOnOrderPageTest.php
index 6cfeabdd056ae72f5b4b41469ba255a223c48942..cedf2aeb71c5811cfdebf2298717f91b218efe5d 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveProductsInComparedOnOrderPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveProductsInComparedOnOrderPageTest.php
@@ -30,7 +30,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Update Changes'.
  * 6. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-28050
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -39,7 +39,6 @@ class MoveProductsInComparedOnOrderPageTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyComparedProductsOnOrderPageTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyComparedProductsOnOrderPageTest.php
index cd95ec1479ec809406665c715a037e708cd620cb..49487ff1b2e8ea9b9e23543a44a2878b797c4f2c 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyComparedProductsOnOrderPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyComparedProductsOnOrderPageTest.php
@@ -31,7 +31,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Update Changes'.
  * 6. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-28109
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -40,7 +40,6 @@ class MoveRecentlyComparedProductsOnOrderPageTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyViewedProductsOnOrderPageTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyViewedProductsOnOrderPageTest.php
index 0118c2cdcc832de4b7e8ad43c0f1e0a5651b1474..d6a4b685e57112c8d718c4e2a1e6825d8699fb27 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyViewedProductsOnOrderPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyViewedProductsOnOrderPageTest.php
@@ -28,14 +28,13 @@ use Magento\Customer\Test\Fixture\Customer;
  * 10. Click Update Items and Qty's button.
  * 11. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-29723
  */
 class MoveRecentlyViewedProductsOnOrderPageTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveShoppingCartProductsOnOrderPageTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveShoppingCartProductsOnOrderPageTest.php
index 628cfa0871619eb07d536b66b96f9564ea1b7410..21a13d782e0d5cde5683626c2104c849b759b29d 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveShoppingCartProductsOnOrderPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveShoppingCartProductsOnOrderPageTest.php
@@ -29,7 +29,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click Update Changes.
  * 6. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-28540
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -38,7 +38,6 @@ class MoveShoppingCartProductsOnOrderPageTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.php
index 753f4fa50c0f689118eafbb5304085b13fd79b4f..4e05d4025fce42dc94381dd67cce35b72b9fd87b 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 5. Click on the "Print Order" button.
  * 6. Perform appropriate assertions.v
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-30253
  */
 class PrintOrderFrontendGuestTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/ReorderOrderEntityTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/ReorderOrderEntityTest.php
index 0ae9f844f88c856efb42d0e7d1ade07db280920b..60547dd9e03e17f4bb35f7dbe00122f6d1bfdd50 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/ReorderOrderEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/ReorderOrderEntityTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 4. Do 'Reorder' for placed order.
  * 5. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-29007
  */
 class ReorderOrderEntityTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UnassignCustomOrderStatusTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UnassignCustomOrderStatusTest.php
index 85c492dcf0b880ae00ff52011e516bac96f1c7d1..de9939ce106adbe639e4120ffeb7212fab289c88 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UnassignCustomOrderStatusTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UnassignCustomOrderStatusTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 3. Click "Unassign" for appropriate status.
  * 4. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-29450
  */
 class UnassignCustomOrderStatusTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UpdateCustomOrderStatusTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UpdateCustomOrderStatusTest.php
index 98726fbd9d31ac11a3aa1f1e0ece4f38d1e2434e..e5da53b48b74e8a2711a36a76b1fab81ee0a4313 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UpdateCustomOrderStatusTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UpdateCustomOrderStatusTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save order status.
  * 6. Perform all assertions.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-29868
  */
 class UpdateCustomOrderStatusTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/ApplySeveralSalesRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/ApplySeveralSalesRuleEntityTest.php
index 30f2a1546cb2e98ae2384d9f04bf7fa025f0da81..a5a554f7a180bf157db7f7213b1c41c915968488 100644
--- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/ApplySeveralSalesRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/ApplySeveralSalesRuleEntityTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\Fixture\FixtureFactory;
  * 2. Apply all created rules.
  * 3. Perform all assertions.
  *
- * @group Sales_Rules_(CS)
+ * @group Sales_Rules
  * @ZephyrId MAGETWO-45883
  */
 class ApplySeveralSalesRuleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php
index 13281a69566f9bad37e6c89d28199227ba66439e..a07799d5f1ed77d46b06462ab214248508b89b7b 100644
--- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Customer\Test\Fixture\Customer;
  * 3. Create Cart Price rule according to dataset and click "Save" button.
  * 4. Perform asserts.
  *
- * @group Shopping_Cart_Price_Rules_(CS)
+ * @group Shopping_Cart_Price_Rules
  * @ZephyrId MAGETWO-24855
  */
 class CreateSalesRuleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/DeleteSalesRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/DeleteSalesRuleEntityTest.php
index 7ac8c0621a4e7aa6fc128476faf41e22e51f3a7d..7e0204a90d4e177e4eaad066cdeb9b3c6df702e4 100644
--- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/DeleteSalesRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/DeleteSalesRuleEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click 'Delete' button.
  * 5. Perform asserts.
  *
- * @group Shopping_Cart_Price_Rules_(CS)
+ * @group Shopping_Cart_Price_Rules
  * @ZephyrId MAGETWO-24985
  */
 class DeleteSalesRuleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/OnePageCheckoutWithDiscountTest.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/OnePageCheckoutWithDiscountTest.php
index 7107775cd9f9851c7066b7d30fe38d554b9f673d..95fae4642d8781dbc0b63f4d2ffd893e77b94ffc 100644
--- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/OnePageCheckoutWithDiscountTest.php
+++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/OnePageCheckoutWithDiscountTest.php
@@ -12,7 +12,6 @@ class OnePageCheckoutWithDiscountTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test, 3rd_party_test';
     /* end tags */
 
@@ -25,4 +24,4 @@ class OnePageCheckoutWithDiscountTest extends Scenario
     {
         $this->executeScenario();
     }
-}
\ No newline at end of file
+}
diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php
index 2bf0cb6d2d539a9266e2b6cee630e0898ecff3b0..92dc0f4f83956df10aa31e9c07a4ded103237de0 100644
--- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Save' button.
  * 6. Perform asserts.
  *
- * @group Shopping_Cart_Price_Rules_(CS)
+ * @group Shopping_Cart_Price_Rules
  * @ZephyrId MAGETWO-24860
  */
 class UpdateSalesRuleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/CreateSynonymGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/CreateSynonymGroupEntityTest.php
index 462aa845e3ccc99f4a1f0e73116a76b13e02a13d..ce2222ba3dd2c1aa378da6ff0b361e9970a7640f 100644
--- a/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/CreateSynonymGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/CreateSynonymGroupEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Search\Test\Fixture\SynonymGroup;
  * 4. Fill data according to dataset.
  * 5. Perform all assertions.
  *
- * @group Search_(MX)
+ * @group Search
  * @ZephyrId MAGETWO-47681
  */
 class CreateSynonymGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/DeleteSynonymGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/DeleteSynonymGroupEntityTest.php
index d11a8213a96f06370983672ee011bb9df42965fa..7e6ec5c14da6dae51696bad68df3c52fb8df5108 100755
--- a/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/DeleteSynonymGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/DeleteSynonymGroupEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Search\Test\Fixture\SynonymGroup;
  * 3. Delete created Synonym Group
  * 4. Perform all assertions.
  *
- * @group Search_(MX)
+ * @group Search
  * @ZephyrId MAGETWO-47683
  */
 class DeleteSynonymGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/MergeSynonymGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/MergeSynonymGroupEntityTest.php
index 207e84c5ffa194f20a85856e922290c5a45d51eb..4e9424a83be02886811e3f4af2967fb098be7202 100644
--- a/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/MergeSynonymGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/MergeSynonymGroupEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Search\Test\Fixture\SynonymGroup;
  * 4. Fill data according to dataset.
  * 5. Perform all assertions.
  *
- * @group Search_(MX)
+ * @group Search
  * @ZephyrId MAGETWO-47684
  */
 class MergeSynonymGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/UpdateSynonymGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/UpdateSynonymGroupEntityTest.php
index 984984ee25012464dfabd8204cc19532a8372260..042a656339abba2a79a850f12edd9b42a9832276 100644
--- a/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/UpdateSynonymGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Search/Test/TestCase/UpdateSynonymGroupEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Search\Test\Fixture\SynonymGroup;
  * 4. Fill data according to dataset.
  * 5. Perform all assertions.
  *
- * @group Search_(MX)
+ * @group Search
  * @ZephyrId MAGETWO-49412
  */
 class UpdateSynonymGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenCreatingNewIntegrationTest.php b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenCreatingNewIntegrationTest.php
index 9a36e05e60abaf1ffc4e0091942102d2509f5243..cc75c27949c0e739c6e1b8eb3ae2cd9742583be7 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenCreatingNewIntegrationTest.php
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenCreatingNewIntegrationTest.php
@@ -33,7 +33,6 @@ class LockAdminUserWhenCreatingNewIntegrationTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenCreatingNewRoleTest.php b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenCreatingNewRoleTest.php
index 03b38c58a9a1ac7fffe382b7077b36c9eb369c26..23a43100de85421927f774600aac3a316cc309e2 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenCreatingNewRoleTest.php
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockAdminUserWhenCreatingNewRoleTest.php
@@ -33,7 +33,6 @@ class LockAdminUserWhenCreatingNewRoleTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockCustomerOnEditPageTest.php b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockCustomerOnEditPageTest.php
index 03c7a33533e9144d8841dfea885c46bc5085b4c3..c5b910c12470793916b8fa4aa68f64ff2d6b38f0 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockCustomerOnEditPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockCustomerOnEditPageTest.php
@@ -35,7 +35,6 @@ class LockCustomerOnEditPageTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockCustomerOnLoginPageTest.php b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockCustomerOnLoginPageTest.php
index 75b06ed87b4fc8026cf6d5e5625c3cf2b5d4802a..1612f1dac24e417393e861a0bbc04918791ab9d0 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockCustomerOnLoginPageTest.php
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/LockCustomerOnLoginPageTest.php
@@ -29,7 +29,6 @@ class LockCustomerOnLoginPageTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/NewCustomerPasswordComplexityTest.php b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/NewCustomerPasswordComplexityTest.php
index 57154031e704d0c4d5eaba20d4cbcf5ad0ae6998..8fdab9165db036361d22ad2a6d211fbb7f45acd1 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/NewCustomerPasswordComplexityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/NewCustomerPasswordComplexityTest.php
@@ -25,7 +25,6 @@ class NewCustomerPasswordComplexityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/ResetCustomerPasswordFailedTest.php b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/ResetCustomerPasswordFailedTest.php
index f953be4bc5a07c3aa096b7e845d45197137b7740..d3b7a3ccb130490244e4081a1bd7b22813f00b48 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/ResetCustomerPasswordFailedTest.php
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/ResetCustomerPasswordFailedTest.php
@@ -27,7 +27,6 @@ class ResetCustomerPasswordFailedTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/ResetUserPasswordFailedTest.php b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/ResetUserPasswordFailedTest.php
index 8e1b013745163e7e6d305adf35fec0d7bd32f06a..0bf600a7042f9889239507d06e51aa24a1fc4287 100644
--- a/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/ResetUserPasswordFailedTest.php
+++ b/dev/tests/functional/tests/app/Magento/Security/Test/TestCase/ResetUserPasswordFailedTest.php
@@ -27,7 +27,6 @@ class ResetUserPasswordFailedTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/AbstractGrid.php b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/AbstractGrid.php
index a71d23be952efc8f5d5ead051ea3afd8b0a0ecf4..24403ce94c52c6af6fc2bb8c193e9826de62daf5 100644
--- a/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/AbstractGrid.php
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/AbstractGrid.php
@@ -36,6 +36,13 @@ abstract class AbstractGrid extends Block
      */
     protected $extensionName = "//*[contains(text(), '%s')]";
 
+    /**
+     * Checkbox for select extension.
+     *
+     * @var string
+     */
+    protected $extensionCheckbox = "//tr[td/*[contains(text(), '%s')]]//*[contains(@ng-checked, 'selectedExtension')]";
+
     /**
      * Find Extension on the grid by name.
      *
@@ -85,4 +92,42 @@ abstract class AbstractGrid extends Block
 
         return false;
     }
+
+    /**
+     * Select several extensions to install on grid.
+     *
+     * @param Extension[] $extensions
+     * @return Extension[]
+     */
+    public function selectSeveralExtensions(array $extensions)
+    {
+        while (true) {
+            foreach ($extensions as $key => $extension) {
+                if ($this->isExtensionOnGrid($extension->getExtensionName())) {
+                    $this->selectExtension($extension->getExtensionName());
+                    unset($extensions[$key]);
+                }
+            }
+
+            if (empty($extensions) || !$this->clickNextPageButton()) {
+                break;
+            }
+        }
+
+        return $extensions;
+    }
+
+    /**
+     * Select extension on grid, check checkbox.
+     *
+     * @param string $extensionName
+     * @return void
+     */
+    protected function selectExtension($extensionName)
+    {
+        $this->_rootElement->find(
+            sprintf($this->extensionCheckbox, $extensionName),
+            Locator::SELECTOR_XPATH
+        )->click();
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/Grid.php b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/Grid.php
index bfa6ed4ca9a6e5b2273e0606c5df3ebd41cd52c0..49d0de9cebaf1780a9ee4489d3366d9b830d07f9 100644
--- a/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/Grid.php
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/Grid.php
@@ -21,6 +21,13 @@ class Grid extends AbstractGrid
      */
     protected $installButton = "//button[contains(@class, 'goInstall')]";
 
+    /**
+     * 'Review Updates' button that opens grid with extensions for update.
+     *
+     * @var string
+     */
+    protected $updateButton = "//button[contains(@class, 'goUpdate')]";
+
     /**
      * Select action of extension on the grid.
      *
@@ -80,6 +87,16 @@ class Grid extends AbstractGrid
         $this->_rootElement->find($this->installButton, Locator::SELECTOR_XPATH)->click();
     }
 
+    /**
+     * Click 'Review Updates' button.
+     *
+     * @return void
+     */
+    public function clickUpdateButton()
+    {
+        $this->_rootElement->find($this->updateButton, Locator::SELECTOR_XPATH)->click();
+    }
+
     /**
      * Click to uninstall button.
      *
@@ -119,7 +136,7 @@ class Grid extends AbstractGrid
      * @param Extension $extension
      * @return void
      */
-    public function clickUpdateButton(Extension $extension)
+    public function clickUpdateActionButton(Extension $extension)
     {
         $this->clickSelectActionButton($extension);
         $button = $this->_rootElement->find(
@@ -137,6 +154,8 @@ class Grid extends AbstractGrid
      */
     public function findExtensionOnGrid(Extension $extension)
     {
+        sleep(3);
+
         $this->_rootElement->waitUntil(
             function () {
                 $message = $this->_rootElement->find($this->notFoundMessage)->isVisible();
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/InstallGrid.php b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/InstallGrid.php
index 710e14a166982e5bcd9192e4cd7c1d49ba911fde..3a23f74de259eb60d50fdb76fd781f6a05c267b3 100644
--- a/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/InstallGrid.php
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/InstallGrid.php
@@ -16,7 +16,7 @@ class InstallGrid extends AbstractGrid
 {
     /**
      * "Install" button of extension.
-     * 
+     *
      * @var string
      */
     protected $extensionInstall = "//tr[td/*[contains(text(), '%s')]]//*[contains(@class, 'action-wrap')]//button";
@@ -28,13 +28,6 @@ class InstallGrid extends AbstractGrid
      */
     protected $extensionSelectVersion = "//tr[td/*[contains(text(), '%s')]]//*[contains(@id, 'selectedVersion')]";
 
-    /**
-     * Checkbox for select extension.
-     *
-     * @var string
-     */
-    protected $extensionCheckbox = "//tr[td/*[contains(text(), '%s')]]//*[contains(@ng-checked, 'selectedExtension')]";
-
     /**
      * "Install All" button.
      *
@@ -75,42 +68,4 @@ class InstallGrid extends AbstractGrid
     {
         $this->_rootElement->find($this->installAllButton, Locator::SELECTOR_CSS)->click();
     }
-
-    /**
-     * Select several extensions to install on grid.
-     *
-     * @param Extension[] $extensions
-     * @return Extension[]
-     */
-    public function selectSeveralExtensions(array $extensions)
-    {
-        while (true) {
-            foreach ($extensions as $key => $extension) {
-                if ($this->isExtensionOnGrid($extension->getExtensionName())) {
-                    $this->selectExtension($extension->getExtensionName());
-                    unset($extensions[$key]);
-                }
-            }
-
-            if (empty($extensions) || !$this->clickNextPageButton()) {
-                break;
-            }
-        }
-
-        return $extensions;
-    }
-
-    /**
-     * Select extension on grid, check checkbox.
-     *
-     * @param string $extensionName
-     * @return void
-     */
-    protected function selectExtension($extensionName)
-    {
-        $this->_rootElement->find(
-            sprintf($this->extensionCheckbox, $extensionName),
-            Locator::SELECTOR_XPATH
-        )->click();
-    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/UpdateGrid.php b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/UpdateGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..035c1722a393d032dc6a6d89485798138a2086e1
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Extension/UpdateGrid.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Setup\Test\Block\Extension;
+
+use Magento\Mtf\Client\Locator;
+use Magento\Setup\Test\Fixture\Extension;
+
+/**
+ * Class UpdateGrid
+ *
+ * Grid with extension updates.
+ */
+class UpdateGrid extends AbstractGrid
+{
+    /**
+     * 'Update All' button.
+     *
+     * @var string
+     */
+    protected $updateAllButton = "[ng-click*='updateAll']";
+
+    /**
+     * Grid that contains the list of extensions.
+     *
+     * @var string
+     */
+    protected $dataGrid = '#updateExtensionGrid';
+
+    /**
+     * Click to update all button.
+     *
+     * @return void
+     */
+    public function clickUpdateAllButton()
+    {
+        $this->_rootElement->find($this->updateAllButton, Locator::SELECTOR_CSS)->click();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Readiness.php b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Readiness.php
index 9be5c9479ded979f422bb7ea27890c5a8f82db45..27b9a81ad37dbb4e9687ffeae6b94d5b564cb3cf 100644
--- a/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Readiness.php
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/Block/Readiness.php
@@ -8,6 +8,7 @@ namespace Magento\Setup\Test\Block;
 
 use Magento\Mtf\Block\Block;
 use Magento\Mtf\Client\Locator;
+use Magento\Setup\Test\Fixture\Extension;
 
 /**
  * Readiness block.
@@ -28,6 +29,34 @@ class Readiness extends Block
      */
     protected $next = "[ng-click*='next']";
 
+    /**
+     * 'Try Again' button.
+     *
+     * @var string
+     */
+    protected $tryAgain = "[ng-click*='forceReload']";
+
+    /**
+     * Trash Bin icon.
+     *
+     * @var string
+     */
+    protected $removeExtension = '//li[contains(text(), \'%s\')]//button';
+
+    /**
+     * Remove button on modal.
+     *
+     * @var string
+     */
+    protected $removeExtensionButtonOnModal = "[ng-click*='removeExtension']";
+
+    /**
+     * Remove popup modal.
+     *
+     * @var string
+     */
+    protected $popupRemoveModal = '.modal-popup';
+
     /**
      * 'Completed!' message.
      * [ng-switch-when="true"]
@@ -98,6 +127,41 @@ class Readiness extends Block
         $this->_rootElement->find($this->next, Locator::SELECTOR_CSS)->click();
     }
 
+    /**
+     * Click on 'Try Again' button.
+     *
+     * @return void
+     */
+    public function clickTryAgain()
+    {
+        $this->_rootElement->find($this->tryAgain, Locator::SELECTOR_CSS)->click();
+        $this->waitForElementVisible($this->completedMessage, Locator::SELECTOR_CSS);
+    }
+
+    /**
+     * Click Trash Bin icon.
+     *
+     * @param Extension $extension
+     * @return void
+     */
+    public function clickRemoveExtension(Extension $extension)
+    {
+        $removeExtension = sprintf($this->removeExtension, $extension->getExtensionName());
+
+        $this->_rootElement->find($removeExtension, Locator::SELECTOR_XPATH)->click();
+    }
+
+    /**
+     * Click Remove button on modal.
+     *
+     * @return void
+     */
+    public function clickRemoveExtensionOnModal()
+    {
+        $this->_rootElement->find($this->removeExtensionButtonOnModal, Locator::SELECTOR_CSS)->click();
+        $this->waitForElementNotVisible($this->popupRemoveModal, Locator::SELECTOR_CSS);
+    }
+
     /**
      * Get Updater application check result.
      *
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/Constraint/Extension/AssertSelectSeveralExtensions.php b/dev/tests/functional/tests/app/Magento/Setup/Test/Constraint/Extension/AssertSelectSeveralExtensions.php
index 094ae1509899cd0750eab72c5c7194d1ab762f1c..c186f9bf20c00ace14645af8610b19460b914d42 100644
--- a/dev/tests/functional/tests/app/Magento/Setup/Test/Constraint/Extension/AssertSelectSeveralExtensions.php
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/Constraint/Extension/AssertSelectSeveralExtensions.php
@@ -7,7 +7,7 @@
 namespace Magento\Setup\Test\Constraint\Extension;
 
 use Magento\Mtf\Constraint\AbstractConstraint;
-use Magento\Setup\Test\Block\Extension\InstallGrid;
+use Magento\Setup\Test\Block\Extension\AbstractGrid;
 use Magento\Setup\Test\Fixture\Extension;
 
 /**
@@ -18,11 +18,11 @@ class AssertSelectSeveralExtensions extends AbstractConstraint
     /**
      * Assert that extensions were selected on the grid.
      *
-     * @param InstallGrid $grid
+     * @param AbstractGrid $grid
      * @param Extension[] $extensions
      * @return void
      */
-    public function processAssert(InstallGrid $grid, array $extensions)
+    public function processAssert(AbstractGrid $grid, array $extensions)
     {
         $extensions = $grid->selectSeveralExtensions($extensions);
         \PHPUnit_Framework_Assert::assertEmpty(
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/Page/Adminhtml/SetupWizard.xml b/dev/tests/functional/tests/app/Magento/Setup/Test/Page/Adminhtml/SetupWizard.xml
index 2e5ad0b1fdc6b8876345cb5a0eb2284185cd7c34..d8d6f828f2f93f72008cd68c3130358a220959d6 100644
--- a/dev/tests/functional/tests/app/Magento/Setup/Test/Page/Adminhtml/SetupWizard.xml
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/Page/Adminhtml/SetupWizard.xml
@@ -21,5 +21,6 @@
         <block name="successMessage" class="Magento\Setup\Test\Block\SuccessMessage" locator="body" strategy="css selector"/>
         <block name="moduleGrid" class="Magento\Setup\Test\Block\Module\Grid" locator=".admin__data-grid-outer-wrap" strategy="css selector"/>
         <block name="moduleStatus" class="Magento\Setup\Test\Block\Module\Status" locator="body" strategy="css selector"/>
+        <block name="extensionsUpdateGrid" class="Magento\Setup\Test\Block\Extension\UpdateGrid" locator="#main" strategy="css selector"/>
     </page>
 </config>
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/Repository/Extension.xml b/dev/tests/functional/tests/app/Magento/Setup/Test/Repository/Extension.xml
index 2a015016a78a74a5215625bd4b70aebce0164e2d..319ae1a6ab81cee7ff4341e4d948480132e395b3 100644
--- a/dev/tests/functional/tests/app/Magento/Setup/Test/Repository/Extension.xml
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/Repository/Extension.xml
@@ -20,5 +20,17 @@
         <dataset name="secondExtension">
             <field name="extensionName" xsi:type="string">magento/module-theme-sample-data</field>
         </dataset>
+
+        <dataset name="thirdExtension">
+            <field name="extensionName" xsi:type="string">magento/module-customer-sample-data</field>
+            <field name="version" xsi:type="string">100.1.0-rc3</field>
+            <field name="versionToUpdate" xsi:type="string">100.1.0</field>
+        </dataset>
+
+        <dataset name="fourthExtension">
+            <field name="extensionName" xsi:type="string">magento/module-theme-sample-data</field>
+            <field name="version" xsi:type="string">100.1.0-rc3</field>
+            <field name="versionToUpdate" xsi:type="string">100.1.0</field>
+        </dataset>
     </repository>
 </config>
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/AbstractExtensionTest.php b/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/AbstractExtensionTest.php
index f1374d4ef73b06e849120ac5d603cb11cb987211..f9358abe828c5f742281f1a2df0c86187720a981 100644
--- a/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/AbstractExtensionTest.php
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/AbstractExtensionTest.php
@@ -79,14 +79,34 @@ abstract class AbstractExtensionTest extends Injectable
         AssertSuccessfulReadinessCheck $assertReadiness,
         BackupOptions $backupOptions
     ) {
+        $this->readinessCheck($assertReadiness);
+        $this->setupWizard->getReadiness()->clickNext();
+        $this->backup($backupOptions);
+        $this->setupWizard->getCreateBackup()->clickNext();
+    }
+
+    /**
+     * Perform Readiness check.
+     *
+     * @param AssertSuccessfulReadinessCheck $assertReadiness
+     */
+    protected function readinessCheck(AssertSuccessfulReadinessCheck $assertReadiness)
+    {
         // Readiness Check
         $this->setupWizard->getReadiness()->clickReadinessCheck();
+
         $assertReadiness->processAssert($this->setupWizard);
-        $this->setupWizard->getReadiness()->clickNext();
+    }
 
+    /**
+     * Perform Backup.
+     *
+     * @param BackupOptions $backupOptions
+     */
+    protected function backup(BackupOptions $backupOptions)
+    {
         // Create Backup page
         $this->setupWizard->getCreateBackup()->fill($backupOptions);
-        $this->setupWizard->getCreateBackup()->clickNext();
     }
 
     /**
@@ -143,4 +163,48 @@ abstract class AbstractExtensionTest extends Injectable
             $this->fail('Extension is not uninstalled!');
         }
     }
+
+    /**
+     * @param Extension $extension
+     * @param BackupOptions $backupOptions
+     * @param AssertFindExtensionOnGrid $assertFindExtensionOnGrid
+     * @param AssertSuccessfulReadinessCheck $assertReadiness
+     * @param AssertExtensionAndVersionCheck $assertExtensionAndVersionCheck
+     * @param AssertSuccessMessage $assertSuccessMessage
+     */
+    protected function installExtension(
+        Extension $extension,
+        BackupOptions $backupOptions,
+        AssertFindExtensionOnGrid $assertFindExtensionOnGrid,
+        AssertSuccessfulReadinessCheck $assertReadiness,
+        AssertExtensionAndVersionCheck $assertExtensionAndVersionCheck,
+        AssertSuccessMessage $assertSuccessMessage
+    ) {
+        // Open Extension Grid with extensions to install
+        $this->setupWizard->getSetupHome()->clickExtensionManager();
+        $this->setupWizard->getExtensionsGrid()->waitLoader();
+        $this->setupWizard->getExtensionsGrid()->clickInstallButton();
+
+        // Find extension on grid and install
+        $assertFindExtensionOnGrid->processAssert($this->setupWizard->getExtensionsInstallGrid(), $extension);
+        $this->setupWizard->getExtensionsInstallGrid()->install($extension);
+
+        $this->readinessCheckAndBackup($assertReadiness, $backupOptions);
+
+        // Install Extension
+        $assertExtensionAndVersionCheck->processAssert(
+            $this->setupWizard,
+            $extension,
+            AssertExtensionAndVersionCheck::TYPE_INSTALL
+        );
+        $this->setupWizard->getUpdaterExtension()->clickStartButton();
+        $assertSuccessMessage->processAssert(
+            $this->setupWizard,
+            $extension,
+            AssertSuccessMessage::TYPE_INSTALL
+        );
+
+        // Open Web Setup Wizard
+        $this->setupWizard->open();
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/EnableDisableModuleTest.php b/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/EnableDisableModuleTest.php
index 5344e07cfc9fae587adaa911774bbbbec1289b5f..b68f25bd7440ab18bfbd5a6b263c570311ab0140 100644
--- a/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/EnableDisableModuleTest.php
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/EnableDisableModuleTest.php
@@ -37,7 +37,7 @@ use Magento\Setup\Test\Page\Adminhtml\SetupWizard;
  * 16. Check for Success message
  * 17. Return to "Web Setup Wizard".
  *
- * @group Setup_(CS)
+ * @group Setup
  * @ZephyrId MAGETWO-43202
  */
 class EnableDisableModuleTest extends Injectable
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/ExtensionMultipleUpdateTest.php b/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/ExtensionMultipleUpdateTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..8175dd27b5d57dbe2a70c6e07b22ab48a647a498
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/ExtensionMultipleUpdateTest.php
@@ -0,0 +1,132 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Setup\Test\TestCase;
+
+use Magento\Mtf\Fixture\FixtureFactory;
+use Magento\Setup\Test\Constraint\AssertSuccessfulReadinessCheck;
+use Magento\Setup\Test\Constraint\Extension\AssertExtensionAndVersionCheck;
+use Magento\Setup\Test\Constraint\Extension\AssertFindExtensionOnGrid;
+use Magento\Setup\Test\Constraint\Extension\AssertMultipleSuccessMessage;
+use Magento\Setup\Test\Constraint\Extension\AssertSelectSeveralExtensions;
+use Magento\Setup\Test\Constraint\Extension\AssertSuccessMessage;
+use Magento\Setup\Test\Fixture\BackupOptions;
+use Magento\Setup\Test\Fixture\Extension;
+use Magento\Setup\Test\Fixture\RepoCredentials;
+
+/**
+ * @group Setup_(CS)
+ * @ZephyrId MAGETWO-56328, MAGETWO-56332
+ */
+class ExtensionMultipleUpdateTest extends AbstractExtensionTest
+{
+    /**
+     * @param FixtureFactory $fixtureFactory
+     * @param RepoCredentials $repoCredentials
+     * @param BackupOptions $backupOptions
+     * @param AssertFindExtensionOnGrid $assertFindExtensionOnGrid
+     * @param AssertSuccessfulReadinessCheck $assertReadiness
+     * @param AssertExtensionAndVersionCheck $assertExtensionAndVersionCheck
+     * @param AssertSuccessMessage $assertSuccessMessage
+     * @param AssertMultipleSuccessMessage $assertMultipleSuccessMessage
+     * @param AssertSelectSeveralExtensions $assertSelectSeveralExtensions
+     * @param $needAuthentication
+     * @param array $extensions
+     * @param array $removeExtensions
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     */
+    public function test(
+        FixtureFactory $fixtureFactory,
+        RepoCredentials $repoCredentials,
+        BackupOptions $backupOptions,
+        AssertFindExtensionOnGrid $assertFindExtensionOnGrid,
+        AssertSuccessfulReadinessCheck $assertReadiness,
+        AssertExtensionAndVersionCheck $assertExtensionAndVersionCheck,
+        AssertSuccessMessage $assertSuccessMessage,
+        AssertMultipleSuccessMessage $assertMultipleSuccessMessage,
+        AssertSelectSeveralExtensions $assertSelectSeveralExtensions,
+        $needAuthentication,
+        array $extensions,
+        array $removeExtensions
+    ) {
+        foreach ($extensions as $key => $options) {
+            $extensions[$key] = $fixtureFactory->create(Extension::class, $options);
+        }
+
+        foreach ($removeExtensions as $key => $options) {
+            $removeExtensions[$key] = $fixtureFactory->create(Extension::class, $options);
+        }
+
+        // Authenticate in admin area
+        $this->adminDashboard->open();
+
+        // Open Web Setup Wizard
+        $this->setupWizard->open();
+
+        // Authenticate on repo.magento.com
+        $this->repoAuthentication($needAuthentication, $repoCredentials);
+
+        foreach ($extensions as $extension) {
+            $this->installExtension(
+                $extension,
+                $backupOptions,
+                $assertFindExtensionOnGrid,
+                $assertReadiness,
+                $assertExtensionAndVersionCheck,
+                $assertSuccessMessage
+            );
+        }
+
+        // Open Extension Grid with extensions to update
+        $this->setupWizard->getSetupHome()->clickExtensionManager();
+        $this->setupWizard->getExtensionsGrid()->waitLoader();
+        $this->setupWizard->getExtensionsGrid()->clickUpdateButton();
+
+        // Select several extensions on grid and check it
+        $assertSelectSeveralExtensions->processAssert($this->setupWizard->getExtensionsUpdateGrid(), $extensions);
+
+        // Click general "Update" button
+        $this->setupWizard->getExtensionsUpdateGrid()->clickUpdateAllButton();
+
+        $this->readinessCheck($assertReadiness);
+
+        /** @var Extension $removeExtension */
+        foreach ($removeExtensions as $removeExtension) {
+            $this->setupWizard->getReadiness()->clickRemoveExtension($removeExtension);
+            $this->setupWizard->getReadiness()->clickRemoveExtensionOnModal();
+        }
+
+        $this->setupWizard->getReadiness()->clickTryAgain();
+        $assertReadiness->processAssert($this->setupWizard);
+        $this->setupWizard->getReadiness()->clickNext();
+        $this->backup($backupOptions);
+        $this->setupWizard->getCreateBackup()->clickNext();
+
+        // Start updating
+        $this->setupWizard->getUpdaterExtension()->clickStartButton();
+
+        $updatedExtensions = array_diff_key($extensions, $removeExtensions);
+
+        // Check success message
+        $assertMultipleSuccessMessage->processAssert(
+            $this->setupWizard,
+            $updatedExtensions,
+            AssertSuccessMessage::TYPE_UPDATE
+        );
+
+        // Uninstall installed extensions
+        foreach ($extensions as $extension) {
+            $this->uninstallExtension(
+                $extension,
+                $backupOptions,
+                $assertReadiness,
+                $assertFindExtensionOnGrid,
+                $assertExtensionAndVersionCheck,
+                $assertSuccessMessage
+            );
+        }
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/ExtensionMultipleUpdateTest.xml b/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/ExtensionMultipleUpdateTest.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b83cc06816360de429d7ebfa3fc67f457a0139d3
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/ExtensionMultipleUpdateTest.xml
@@ -0,0 +1,27 @@
+<?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\Setup\Test\TestCase\ExtensionMultipleUpdateTest" summary="Multiple Update Extensions">
+        <variation name="PerformMultipleUpdateExtensions">
+            <data name="needAuthentication" xsi:type="boolean">false</data>
+            <data name="extensions" xsi:type="array">
+                <item name="0" xsi:type="array">
+                    <item name="dataset" xsi:type="string">thirdExtension</item>
+                </item>
+                <item name="1" xsi:type="array">
+                    <item name="dataset" xsi:type="string">fourthExtension</item>
+                </item>
+            </data>
+            <data name="removeExtensions" xsi:type="array">
+                <item name="0" xsi:type="array">
+                    <item name="dataset" xsi:type="string">thirdExtension</item>
+                </item>
+            </data>
+        </variation>
+    </testCase>
+</config>
diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.php
index 3ac010409f326fb0656b06f063daf4606e047273..064bc2ec0ba2b37ea57616cd1c6187e30114528f 100644
--- a/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Submit Shipment' button.
  * 6. Perform all asserts.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-28708
  */
 class CreateShipmentEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/CreateSitemapEntityTest.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/CreateSitemapEntityTest.php
index fbffe760eaabf73e30d15dca598c397c94ba4e10..f820e92f9a5265b8b6db984b21e3fdf768d642f2 100644
--- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/CreateSitemapEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/CreateSitemapEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  *  5. Click "Save" button.
  *  6. Perform all assertions.
  *
- * @group XML_Sitemap_(PS)
+ * @group XML_Sitemap
  * @ZephyrId MAGETWO-23277
  */
 class CreateSitemapEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.php b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.php
index d898fd80cde390d16926ca915d08b49a308dc9d6..e8f24bfccc05691525a46bed378a23bb088768b7 100644
--- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  *  4. Click "Delete" button.
  *  5. Perform all assertions.
  *
- * @group XML_Sitemap_(PS)
+ * @group XML_Sitemap
  * @ZephyrId MAGETWO-23296
  */
 class DeleteSitemapEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.php
index 4418882a8b309713f7c474b1e8d5342e18542be3..804111c497cca364fc749a477ee85e356c686d53 100644
--- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Fill data according to dataset
  * 5. Perform all assertions
  *
- * @group Store_Management_(PS)
+ * @group Store_Management
  * @ZephyrId MAGETWO-27647
  */
 class CreateStoreEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.php
index f7f5e6c6890791e82bd1c2c7dc1afeb502f8de08..5d638d781d173ab22923ad2772fd31a984dd944e 100644
--- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save Store" button
  * 6. Perform all assertions
  *
- * @group Store_Management_(PS)
+ * @group Store_Management
  * @ZephyrId MAGETWO-27345
  */
 class CreateStoreGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateWebsiteEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateWebsiteEntityTest.php
index e2018dbdf73df8d564b1e8127c5a60f3ddf6ef12..766e030b3f61880551fd4b82ffc217ce0aa5179a 100644
--- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateWebsiteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateWebsiteEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save Web Site" button
  * 6. Perform all assertions
  *
- * @group Store_Management_(PS)
+ * @group Store_Management
  * @ZephyrId MAGETWO-27665
  */
 class CreateWebsiteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php
index 66d8cf55a10ad1365f21f1a3ffe347ddfc5b8848..cbe261fe750a8c7c8fd61244edd5387aea6152cb 100644
--- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php
@@ -29,14 +29,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Click "Delete Store View"
  * 7. Perform all assertions
  *
- * @group Store_Management_(PS)
+ * @group Store_Management
  * @ZephyrId MAGETWO-27942
  */
 class DeleteStoreEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.php
index a3980497764e611e4cf123a2c4ea47ced2c420d3..e7ba27b44c1a845bd513a55bf22d042b3100d1cc 100644
--- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.php
@@ -31,14 +31,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Click "Delete store"
  * 7. Perform all assertions
  *
- * @group Store_Management_(PS)
+ * @group Store_Management
  * @ZephyrId MAGETWO-27596
  */
 class DeleteStoreGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.php
index 5d5a068800b0450e5674d90e93b373fceaa5b54d..5d4af70cb03e3154364e03611be4347104d09db0 100644
--- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.php
@@ -31,14 +31,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Click "Delete Web Site"
  * 7. Perform all assertions
  *
- * @group Store_Management_(PS)
+ * @group Store_Management
  * @ZephyrId MAGETWO-27723
  */
 class DeleteWebsiteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.php
index 4bd993e22d35a28a368abd717db74676a4df20ed..38250d958bc10273d3918789b6b00559bdf0c567 100644
--- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Fill data according to dataset
  * 5. Perform all assertions
  *
- * @group Store_Management_(PS)
+ * @group Store_Management
  * @ZephyrId MAGETWO-27786
  */
 class UpdateStoreEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.php
index 728e11825196f875d7d20db124b831c10f05e1b6..7e9143a5c91df4775bc2222a4281171ffb6681b7 100644
--- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save Store" button
  * 6. Perform all assertions
  *
- * @group Store_Management_(PS)
+ * @group Store_Management
  * @ZephyrId MAGETWO-27568
  */
 class UpdateStoreGroupEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.php
index 050cb3734ccd2ea36681c69e0734bd8142016260..b187f05856670a1807b904a8b87bfca78ee51357 100644
--- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.php
@@ -28,14 +28,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Save Web Site" button
  * 6. Perform all assertions
  *
- * @group Store_Management_(PS)
+ * @group Store_Management
  * @ZephyrId MAGETWO-27690
  */
 class UpdateWebsiteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Swagger/Test/TestCase/SwaggerUiForRestApiTest.php b/dev/tests/functional/tests/app/Magento/Swagger/Test/TestCase/SwaggerUiForRestApiTest.php
index 3a9afc2185792e321074086abb3ff5ccd7665a2d..9246bdcd9929b339d657bc1be42d739efb4858db 100644
--- a/dev/tests/functional/tests/app/Magento/Swagger/Test/TestCase/SwaggerUiForRestApiTest.php
+++ b/dev/tests/functional/tests/app/Magento/Swagger/Test/TestCase/SwaggerUiForRestApiTest.php
@@ -21,14 +21,13 @@ use Magento\Swagger\Test\Page\SwaggerUiPage;
  * 5. Click operation name to show operation details
  * 6. Perform all assertions
  *
- * @group Swagger_(PS)
+ * @group Swagger
  * @ZephyrId MAGETWO-41381, MAGETWO-41383
  */
 class SwaggerUiForRestApiTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.php
index 5837793ab263e8d2515257d20c5b5cf4c9abaede..b35c566fd9b988e1d0a03147419ecc45f366627e 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.php
@@ -31,14 +31,13 @@ use Magento\Customer\Test\TestCase\AbstractApplyVatIdTest;
  * 5. In 'Estimate Shipping and Tax' section specify destination and click 'Get a Quote' button.
  * 6. Perform assertions.
  *
- * @group VAT_ID_(CS)
+ * @group VAT_ID
  * @ZephyrId MAGETWO-13436
  */
 class ApplyTaxBasedOnVatIdTest extends AbstractApplyVatIdTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php
index 50a7167c207a819e21096f651dfcea4c979e37e5..f13cfc8d42793046b86b64b203a7abf52a12a85d 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save Tax Rate.
  * 6. Perform all assertions.
  *
- * @group Tax_(CS)
+ * @group Tax
  * @ZephyrId MAGETWO-23286
  */
 class CreateTaxRateEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php
index 7722a7e9773299dfee949239a1226f273a645515..9cfa401510bc17bd1e0651f7cb3a71370c46a2fe 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save Tax Rule.
  * 6. Perform all assertions.
  *
- * @group Tax_(CS)
+ * @group Tax
  * @ZephyrId MAGETWO-20913
  */
 class CreateTaxRuleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.php
index d256fe1783a912c9f8daf5721f585184f9d4420d..567e4860df12be2df431b9d0ee6d6a1a1c489792 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click Delete Rate
  * 5. Perform all assertions
  *
- * @group Tax_(CS)
+ * @group Tax
  * @ZephyrId MAGETWO-23295
  */
 class DeleteTaxRateEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.php
index 18c4db9689b3e7bb60bb897f3df3c73137e8d26f..5553738b21463dd4acca5eedec362af5b672e70c 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click on the "Delete Rule" button.
  * 5. Perform all assertions.
  *
- * @group Tax_(CS)
+ * @group Tax
  * @ZephyrId MAGETWO-20924
  */
 class DeleteTaxRuleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.php
index b6c1391a0b04aa9a123b4ce7a66092471375f09e..14ef3cc293d923b5b006856ba4fccccccec9a610 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 12. Save tax configuration.
  * 13. Perform all assertions.
  *
- * @group Tax_(CS)
+ * @group Tax
  * @ZephyrId MAGETWO-27809
  */
 class TaxCalculationTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php
index 7e972c17c492287e3b1322ab9769ce030e13df43..9517ee063ce67cbf33e50ed44412d8e7253526e2 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php
@@ -30,14 +30,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 13. Register two customers on front end that will match two different rates
  * 14. Login with each customer and verify prices
  *
- * @group Tax_(CS)
+ * @group Tax
  * @ZephyrId MAGETWO-29052
  */
 class TaxWithCrossBorderTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.php
index b0cc79aa52ea356c5a74f3c71e7bf63ecf951c00..ff54451529aabdfbab776361ab9769e2e848958e 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Click 'Save Rate' button.
  * 7. Perform asserts.
  *
- * @group Tax_(CS)
+ * @group Tax
  * @ZephyrId MAGETWO-23299
  */
 class UpdateTaxRateEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php
index b9cf14a74e7fe6b8b8f638306b9087ff334c8645..bef2ede5733cd909a7e5358acf0f98ea76f6cdd8 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Save' button.
  * 6. Perform all asserts.
  *
- * @group Tax_(CS)
+ * @group Tax
  * @ZephyrId MAGETWO-20996
  */
 class UpdateTaxRuleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFilteringTest.php b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFilteringTest.php
index 57cdccd6edb9fd9228c0ef348fc69171efa7402c..39a80b783a0a1cf2dcb36a91e8d140bf3e236b8c 100644
--- a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFilteringTest.php
+++ b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFilteringTest.php
@@ -22,14 +22,13 @@ use Magento\Ui\Test\Block\Adminhtml\DataGrid;
  * 3. Filter grid using provided columns
  * 5. Perform Asserts
  *
- * @group Ui_(CS)
+ * @group Ui
  * @ZephyrId MAGETWO-41329
  */
 class GridFilteringTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php
index a441bbc68c77590ced6a9a2abe921f8429b791e8..c0049f0cc2fb39d22758a1ce3cae3fcc22bf9552 100644
--- a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php
+++ b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php
@@ -22,14 +22,13 @@ use Magento\Ui\Test\Block\Adminhtml\DataGrid;
  * 3. Perfrom full text search
  * 5. Perform Asserts
  *
- * @group Ui_(CS)
+ * @group Ui
  * @ZephyrId MAGETWO-41330
  */
 class GridFullTextSearchTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridSortingTest.php b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridSortingTest.php
index bfd360fbf1053a5f21239a319904b54f159300d5..d1f543c7b989137c209bdbd63e6c4755644e9e8b 100644
--- a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridSortingTest.php
+++ b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridSortingTest.php
@@ -22,14 +22,13 @@ use Magento\Ui\Test\Block\Adminhtml\DataGrid;
  * 3. Sort grid using provided columns
  * 5. Perform Asserts
  *
- * @group Ui_(CS)
+ * @group Ui
  * @ZephyrId MAGETWO-41328
  */
 class GridSortingTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php
index f2dddaa65ff12ed62136e013fe757ebb67dd6fd3..c3502924b56e08f9456eb08db00d330f77363d95 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 7. Save Rewrite.
  * 8. Verify created rewrite.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-24280
  */
 class CreateCategoryRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest.php
index 718d87857218c1078202775211a4bc0d8cd00eb4..201a52ce5dec1a5c1df9e4cd489fcfdb8df7c6fe 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 6. Save Rewrite.
  * 7. Perform all assertions.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-25474
  */
 class CreateCustomUrlRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php
index 9c25d56bb53c321cba7f0808795b73cc7a5db1c1..e333fdd2f0618a2af3620d9a7e35ffabfb256bcb 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 7. Fill data according to dataset.
  * 8. Perform all assertions.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-25150
  */
 class CreateProductUrlRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php
index 348d0548f1d156817079cc51f96016175af32589..0dcc9d8e1985b0fd1ccb7651dd2ff4de630bc803 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Delete URL Rewrite.
  * 5. Perform all assertions.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-25086
  */
 class DeleteCategoryUrlRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.php
index e058f3c4041b44a6e5748de8b3ce42d950a888cf..4f4526d907be19bb12805a649bfe7ad6c28d18df 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Delete Redirect.
  * 5. Perform all assertions.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-26337
  */
 class DeleteCustomUrlRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php
index 25fb260c1a863d16f13da038ff980517c9823a58..9d8491b8afa4bb9873fd836c5c215be9dee206c5 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click 'Delete' button.
  * 5. Perform asserts.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId  MAGETWO-23287
  */
 class DeleteProductUrlRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php
index 4361bc2a6a7b4a9a95bc7a62a39ed5806cb31058..2c7cf3ecbf4ce58dcf18ae915f851a672954fa50 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php
@@ -26,14 +26,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Save' button.
  * 6. Perform all asserts.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-24838
  */
 class UpdateCategoryUrlRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php
index 813f5b0937dadc2f0ba1ecca58155fea37b4f77c..04eb7fd5aa8e57499360cdce4662f3d2d4aa5648 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php
@@ -24,14 +24,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save Redirect.
  * 6. Perform all assertions.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-25784
  */
 class UpdateCustomUrlRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php
index 2ba4e53b31e704f1a25ecf7a5d87461be359b556..1f9c09fcb5f3cd2998877f2b24aa08ffb81f5f53 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php
@@ -25,14 +25,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Fill data according to dataset.
  * 5. Perform all assertions.
  *
- * @group URL_Rewrites_(MX)
+ * @group URL_Rewrites
  * @ZephyrId MAGETWO-24819
  */
 class UpdateProductUrlRewriteEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'MX';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php
index 22c82757dd4c899569fd25a3a97dc9e71fede166..2003bb4b27770239a2b9c2b8d75dc1a9a178f02b 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php
@@ -23,14 +23,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save user
  * 6. Perform assertions
  *
- * @group ACL_(PS)
+ * @group ACL
  * @ZephyrId MAGETWO-25699
  */
 class CreateAdminUserEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.php
index 39a11c0c16994e21bd1b4913b10fb1555cea9f2a..42dfaf10b9307a2aa0657ba5272459a91a83e0ac 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserRoleEntityTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save role
  * 6. Perform assertions
  *
- * @group ACL_(PS)
+ * @group ACL
  * @ZephyrId MAGETWO-23413
  */
 class CreateAdminUserRoleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php
index 65f0443812d1b5d8bbb9e5638d045776f95b101a..57de56c7f56f7397282e1863ec43a3f42c6a9ec2 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click "Delete User" button
  * 5. Perform all assertions
  *
- * @group ACL_(PS)
+ * @group ACL
  * @ZephyrId MAGETWO-23416
  */
 class DeleteAdminUserEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php
index 7282818399d7f404f7d3c9c730aa7ecab68da628..c3f0d766406b20edcf62fffa9a4d172b915bcdb8 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php
@@ -28,14 +28,13 @@ use Magento\Mtf\TestCase\Injectable;
  *  4. Click "Delete Role" button
  *  5. Perform all assertions
  *
- * @group ACL_(PS)
+ * @group ACL
  * @ZephyrId MAGETWO-23926
  */
 class DeleteUserRoleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/LockAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/LockAdminUserEntityTest.php
index a14273d7f94846c59a663ddbe1ab88c9cb03e893..a6074b3f5ac6b4e4c40fee94d8a0af17c29066d8 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/LockAdminUserEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/LockAdminUserEntityTest.php
@@ -24,14 +24,13 @@ use Magento\User\Test\Fixture\User;
  * 3. "You did not sign in correctly or your account is temporarily disabled." appears after each login attempt.
  * 4. Perform all assertions.
  *
- * @group AuthN_&_AuthZ_(PS)
+ * @group AuthN_&_AuthZ
  * @ZephyrId MAGETWO-12386
  */
 class LockAdminUserEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.php
index e6139c681d226d0dcfd024a16cada0786d654cf0..f570d179cd23e819c90cbc1a816c008e85d3b643 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.php
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click Ok on popup window.
  * 6. Perform all asserts.
  *
- * @group Web_API_Framework_(PS)
+ * @group Web_API_Framework
  * @ZephyrId MAGETWO-29675
  */
 class RevokeAllAccessTokensForAdminWithoutTokensTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.php
index c3b65ce1ca97a58845594b8a3b743e5d0f9684d8..79c58c434e2387d59408aaf814bf451d5b4ac061 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Save user
  * 6. Perform all assertions
  *
- * @group ACL_(PS)
+ * @group ACL
  * @ZephyrId MAGETWO-24345
  */
 class UpdateAdminUserEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.php
index dc417cfa96d788d5d685edc363aaec11a95a94dc..aaf3a42dc1d1dd5490c7186f7ecaceb442903099 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.php
@@ -27,14 +27,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Fill in data according to data set
  * 5. Perform all assertions
  *
- * @group ACL_(PS)
+ * @group ACL
  * @ZephyrId MAGETWO-24768
  */
 class UpdateAdminUserRoleEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php
index 235d078b2831cdc1ed887b1aeef10b0d60eb8c00..5eb73d2087e01101dc45dce30c09523fceff2349 100644
--- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php
+++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UserLoginAfterChangingPermissionsTest.php
@@ -35,7 +35,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 13. Log in using new admin user (before the bug was fixed, it was impossible to log in from the first attempt)
  * 14. Perform assertions
  *
- * @group ACL_(PS)
+ * @group ACL
  * @ZephyrId MAGETWO-28828
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -43,7 +43,6 @@ class UserLoginAfterChangingPermissionsTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/CreateCustomVariableEntityTest.php b/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/CreateCustomVariableEntityTest.php
index ff441a0ec574ac305e07b649b52318e7a55e8911..ccb146635719fd986917efb9f25ebb705ef7db31 100644
--- a/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/CreateCustomVariableEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/CreateCustomVariableEntityTest.php
@@ -20,14 +20,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click 'Save' button.
  * 6. Perform all asserts.
  *
- * @group Variables_(PS)
+ * @group Variables
  * @ZephyrId MAGETWO-23293
  */
 class CreateCustomVariableEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/DeleteCustomVariableEntityTest.php b/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/DeleteCustomVariableEntityTest.php
index 88bc18a71bcecbc9270485a930b40c644b8dd13a..6b3e819eaf9039f93e270b9e0c97d40b72a75ddb 100644
--- a/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/DeleteCustomVariableEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/DeleteCustomVariableEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Click 'Delete' button.
  * 5. Perform asserts.
  *
- * @group Variables_(PS)
+ * @group Variables
  * @ZephyrId MAGETWO-25535
  */
 class DeleteCustomVariableEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/UpdateCustomVariableEntityTest.php b/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/UpdateCustomVariableEntityTest.php
index 4f3b82b26dddcb1a8ba3d006e56deb4cf6017f7f..6e9631c7a95f9c4089130a4ff7dc3254bf101400 100644
--- a/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/UpdateCustomVariableEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/UpdateCustomVariableEntityTest.php
@@ -29,14 +29,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 8. Save Custom variable using correspond saveActions.
  * 9. Perform all assertions.
  *
- * @group Variables_(PS)
+ * @group Variables
  * @ZephyrId MAGETWO-26104
  */
 class UpdateCustomVariableEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/CreateVaultOrderBackendTest.php b/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/CreateVaultOrderBackendTest.php
index 37d0fdc81c5aae9f6109b764b6c8074526bdb621..3c306280215ea1a2ee460db6f7838fd7c33caf7c 100644
--- a/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/CreateVaultOrderBackendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/CreateVaultOrderBackendTest.php
@@ -30,14 +30,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 15. Select any available payment token.
  * 16. Place order.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-48127, MAGETWO-48091
  */
 class CreateVaultOrderBackendTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'acceptance_test, extended_acceptance_test, 3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/DeleteSavedCreditCardTest.php b/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/DeleteSavedCreditCardTest.php
index 7d5e6d8284ff18babf07a49ed88df36b3ea003ee..a90bd37f33047ea9e339254f1f30f294b983f160 100644
--- a/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/DeleteSavedCreditCardTest.php
+++ b/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/DeleteSavedCreditCardTest.php
@@ -23,22 +23,39 @@ use Magento\Vault\Test\Constraint\AssertCreditCardNotPresentOnCheckout;
  * 6. Go to One page Checkout
  * 7. Perform assertions.
  *
- * @group Vault_(CS)
+ * @group Vault
  * @ZephyrId MAGETWO-54059, MAGETWO-54072, MAGETWO-54068, MAGETWO-54015, MAGETWO-54011
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class DeleteSavedCreditCardTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
+    /**
+     * Page for one page checkout.
+     *
+     * @var CheckoutOnepage
+     */
+    private $checkoutOnepage;
+
+    /**
+     * Injection data.
+     *
+     * @param CheckoutOnepage $checkoutOnepage
+     * @return void
+     */
+    public function __inject(CheckoutOnepage $checkoutOnepage)
+    {
+        $this->checkoutOnepage = $checkoutOnepage;
+    }
+
     /**
      * Runs delete saved credit card test.
      *
      * @param AssertCreditCardNotPresentOnCheckout $assertCreditCardNotPresentOnCheckout
-     * @param CheckoutOnepage $checkoutOnepage
      * @param $products
      * @param $configData
      * @param $customer
@@ -47,10 +64,10 @@ class DeleteSavedCreditCardTest extends Injectable
      * @param $shipping
      * @param array $payments
      * @param $creditCardSave
+     * @return void
      */
     public function test(
         AssertCreditCardNotPresentOnCheckout $assertCreditCardNotPresentOnCheckout,
-        CheckoutOnepage $checkoutOnepage,
         $products,
         $configData,
         $customer,
@@ -69,7 +86,7 @@ class DeleteSavedCreditCardTest extends Injectable
         foreach ($payments as $key => $payment) {
             $this->addToCart($products);
             $this->proceedToCheckout();
-            if($key < 1) { // if this is the first order to be placed
+            if ($key < 1) { // if this is the first order to be placed
                 $this->selectCheckoutMethod($checkoutMethod, $customer);
                 $this->fillShippingAddress($shippingAddress);
             }
@@ -84,7 +101,7 @@ class DeleteSavedCreditCardTest extends Injectable
         }
         // Delete credit cards from Stored Payment Methods and verify they are not available on checkout
         $paymentsCount = count($payments);
-        for($i = 2; $i < $paymentsCount; $i++) {
+        for ($i = 2; $i < $paymentsCount; $i++) {
             $deletedCard = $this->deleteCreditCardFromMyAccount(
                 $customer,
                 $payments[$i]['creditCard'],
@@ -94,7 +111,7 @@ class DeleteSavedCreditCardTest extends Injectable
             $this->proceedToCheckout();
             $this->fillShippingMethod($shipping);
             $assertCreditCardNotPresentOnCheckout->processAssert(
-                $checkoutOnepage,
+                $this->checkoutOnepage,
                 $deletedCard['deletedCreditCard']
             );
         }
@@ -244,7 +261,7 @@ class DeleteSavedCreditCardTest extends Injectable
         );
         $saveCreditCardStep->run();
     }
-    
+
     /**
      * @return void
      */
@@ -255,7 +272,7 @@ class DeleteSavedCreditCardTest extends Injectable
         );
         $fillBillingInformationStep->run();
     }
-    
+
     /**
      * @return void
      */
diff --git a/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/ReorderUsingVaultTest.php b/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/ReorderUsingVaultTest.php
index 357dca735c9bd158ee76147a778d448f016c31ad..c3b82af6949c4a0ea114324abae90aa7ccab3a24 100644
--- a/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/ReorderUsingVaultTest.php
+++ b/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/ReorderUsingVaultTest.php
@@ -28,14 +28,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 10. Select any available payment token.
  * 11. Place order.
  *
- * @group Order_Management_(CS)
+ * @group Order_Management
  * @ZephyrId MAGETWO-54870, MAGETWO-54872
  */
 class ReorderUsingVaultTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'extended_acceptance_test, 3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/UseVaultOnCheckoutTest.php b/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/UseVaultOnCheckoutTest.php
index 39332d9c657ab98626ed8fb02ed44623272eb12a..902ccc62af7f57c23db399bc22d5d3530b0a7515 100644
--- a/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/UseVaultOnCheckoutTest.php
+++ b/dev/tests/functional/tests/app/Magento/Vault/Test/TestCase/UseVaultOnCheckoutTest.php
@@ -31,14 +31,13 @@ use Magento\Mtf\TestCase\Scenario;
  * 12. Click Place Order button.
  * 13. Perform assertions.
  *
- * @group One_Page_Checkout_(CS)
+ * @group One_Page_Checkout
  * @ZephyrId MAGETWO-46530
  */
 class UseVaultOnCheckoutTest extends Scenario
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'CS';
     const TEST_TYPE = '3rd_party_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php
index 5f3d91b58d147bdd8bde6f91aa450ba676cd3f70..e430afbbad197f59300e3fe442adb356dedf4cdf 100644
--- a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php
+++ b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php
@@ -41,14 +41,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 9. Go to frontend and login with customer
  * 10. Perform all assertions.
  *
- * @group Tax_(CS)
+ * @group Tax
  * @ZephyrId MAGETWO-29551
  */
 class CreateTaxWithFptTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
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 0583cacb1a40bf655c9c146a3c13a6d1bb71efa9..edd021713f8923afef6901d32c5ab1bf974ff5b4 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
@@ -18,14 +18,13 @@ use Magento\Widget\Test\Fixture\Widget;
  * 6. Fill widget data according dataset.
  * 7. Perform all assertions.
  *
- * @group Widget_(PS)
+ * @group Widget
  * @ZephyrId MAGETWO-27916
  */
 class CreateWidgetEntityTest extends AbstractCreateWidgetEntityTest
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/DeleteWidgetEntityTest.php b/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/DeleteWidgetEntityTest.php
index f9426890212337e003e26f60a87de7f8c51d2ce4..ba89d591e36406475ebd3783e777d049ff599517 100644
--- a/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/DeleteWidgetEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Widget/Test/TestCase/DeleteWidgetEntityTest.php
@@ -22,14 +22,13 @@ use Magento\Mtf\TestCase\Injectable;
  * 4. Delete.
  * 5. Perform all asserts.
  *
- * @group Widget_(PS)
+ * @group Widget
  * @ZephyrId MAGETWO-28459
  */
 class DeleteWidgetEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'yes';
-    const DOMAIN = 'PS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php
index 6804bdfa464985acd9c742ac1dea1d1b2c2649e0..9959796828df23943db8fc3f6dfdce4b6387e1ac 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php
@@ -21,14 +21,13 @@ use Magento\Customer\Test\Fixture\Customer;
  * 3. Add created product to Wishlist according to dataset
  * 4. Perform all assertions
  *
- * @group Wishlist_(CS)
+ * @group Wishlist
  * @ZephyrId MAGETWO-29045
  */
 class AddProductToWishlistEntityTest extends AbstractWishlistTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php
index 1a145f4a06c723204a553f1d81d159bc63d26c33..cf16a045c3487ca9c8520a03ff4b47fc83ed84dd 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php
@@ -21,14 +21,13 @@ use Magento\Customer\Test\Fixture\Customer;
  * 3. Click "Add to Cart"
  * 4. Perform asserts
  *
- * @group Wishlist_(CS)
+ * @group Wishlist
  * @ZephyrId MAGETWO-25268
  */
 class AddProductsToCartFromCustomerWishlistOnFrontendTest extends AbstractWishlistTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php
index ed0f91570a64fb3bad8d4cde5dfef5f3feadfda7..21841a70b356ddef0003ab21939342f2bfce6988 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php
@@ -26,14 +26,13 @@ use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
  * 7. Click Ok
  * 8. Perform assertions
  *
- * @group Wishlist_(CS)
+ * @group Wishlist
  * @ZephyrId MAGETWO-29257
  */
 class ConfigureProductInCustomerWishlistOnBackendTest extends AbstractWishlistTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest.php
index 2abae352944105f8093688c33a5271a653d3b7c1..3738dd0631e82510715c1ef10f2c12dd5cc7c5d1 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest.php
@@ -22,14 +22,13 @@ use Magento\Customer\Test\Fixture\Customer;
  * 4. Click 'Ok'
  * 5. Perform assertions
  *
- * @group Wishlist_(CS)
+ * @group Wishlist
  * @ZephyrId MAGETWO-29507
  */
 class ConfigureProductInCustomerWishlistOnFrontendTest extends AbstractWishlistTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php
index 2699153ef9a1b5b7491ee38ef796760e879ca53c..aca814aebca6ad7815442f76a0a9e587784e10a7 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php
@@ -27,14 +27,13 @@ use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
  * 5. Click 'Delete'
  * 6. Perform assertions
  *
- * @group Wishlist_(CS)
+ * @group Wishlist
  * @ZephyrId MAGETWO-27813
  */
 class DeleteProductFromCustomerWishlistOnBackendTest extends AbstractWishlistTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php
index 9705358cba55bbfd98b2e40246f5ed7be1f78ba6..361e80ea56b023cf48cb9b3ca45e20bbf3fabfe2 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php
@@ -20,14 +20,13 @@ use Magento\Customer\Test\Fixture\Customer;
  * 4. Click "Remove item".
  * 5. Perform all assertions.
  *
- * @group Wishlist_(CS)
+ * @group Wishlist
  * @ZephyrId MAGETWO-28874
  */
 class DeleteProductsFromWishlistOnFrontendTest extends AbstractWishlistTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest.php
index 33c47f44069707748bd5af5fc302e804a7deea3c..7ff599cf43df04daa283eb1a334a6c7b74019715 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest.php
@@ -21,14 +21,13 @@ use Magento\Mtf\Fixture\FixtureInterface;
  * 2. Click 'Move to Wishlist' button from Shopping Cart for added product.
  * 3. Perform asserts.
  *
- * @group Shopping_Cart_(CS)
+ * @group Shopping_Cart
  * @ZephyrId MAGETWO-29545
  */
 class MoveProductFromShoppingCartToWishlistTest extends AbstractWishlistTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     const TEST_TYPE = 'extended_acceptance_test';
     /* end tags */
 
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php
index fd8abbe0644fd861ffb3563e941175fa33fb3102..866b60f3dc26a29f5c71e139dafbc2f616df1448 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php
@@ -26,7 +26,7 @@ use Magento\Mtf\TestCase\Injectable;
  * 5. Click "Share Wishlist" button.
  * 6. Perform all assertions.
  *
- * @group Wishlist_(CS)
+ * @group Wishlist
  * @ZephyrId MAGETWO-23394
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -35,7 +35,6 @@ class ShareWishlistEntityTest extends Injectable
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php
index b1736c332b01c97a824e075c3aed73cbe1214372..06b0bfa77bf1da97e8c7c4955397b72955c7837a 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php
@@ -25,14 +25,13 @@ use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
  * 4. Open wish list tab.
  * 5. Perform assertions.
  *
- * @group Wishlist_(CS)
+ * @group Wishlist
  * @ZephyrId MAGETWO-29616
  */
 class ViewProductInCustomerWishlistOnBackendTest extends AbstractWishlistTest
 {
     /* tags */
     const MVP = 'no';
-    const DOMAIN = 'CS';
     /* end tags */
 
     /**
diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php
index 6c7e8b334baa5b3d9b0baa3804bd18dddb5ecc37..507cf768acfa9bc7d1e4522425e87acd3e8a6de0 100644
--- a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php
+++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php
@@ -98,8 +98,17 @@ class InjectableTests extends \PHPUnit_Framework_TestSuite
 
             /** @var \Magento\Mtf\Config\DataInterface $configData */
             $configData = $objectManagerFactory->getObjectManager()->create(\Magento\Mtf\Config\TestRunner::class);
-            $configData->setFileName($configFileName . '.xml')->load($configFilePath);
-
+            $filter = getopt('', ['filter:']);
+            if (!isset($filter['filter'])) {
+                $configData->setFileName($configFileName . '.xml')->load($configFilePath);
+            } else {
+                $isValid = preg_match('`variation::(.*?)$`', $filter['filter'], $variation);
+                if ($isValid === 1) {
+                    $configData->setFileName($configFileName . '.xml')->load($configFilePath);
+                    $data['rule']['variation']['allow'][0]['name'][0]['value'] = $variation[1];
+                    $configData->merge($data);
+                }
+            }
             $this->objectManager = $objectManagerFactory->create(
                 [\Magento\Mtf\Config\TestRunner::class => $configData]
             );
diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx_category.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/category.xml
similarity index 100%
rename from dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx_category.xml
rename to dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/category.xml
diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml
deleted file mode 100644
index cdb06f36d53b6da31d89e635882fc6ca1ef90e9b..0000000000000000000000000000000000000000
--- a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_cs.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * 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/Magento/Mtf/TestRunner/etc/testRunner.xsd">
-    <rule scope="testcase">
-        <allow>
-            <tag group="domain" value="CS" />
-        </allow>
-        <deny>
-            <tag group="stable" value="no" />
-            <tag group="to_maintain" value="yes" />
-            <tag group="test_type" value="3rd_party_test_deprecated" />
-        </deny>
-    </rule>
-    <rule scope="variation">
-        <deny>
-            <tag group="stable" value="no" />
-            <tag group="to_maintain" value="yes" />
-            <tag group="test_type" value="3rd_party_test" />
-        </deny>
-    </rule>
-</config>
diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml
deleted file mode 100644
index 9c5788733cdbc6b0a670a1b301a2024c660d382a..0000000000000000000000000000000000000000
--- a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_mx.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * 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/Magento/Mtf/TestRunner/etc/testRunner.xsd">
-    <rule scope="testcase">
-        <allow>
-            <tag group="domain" value="MX" />
-        </allow>
-        <deny>
-            <tag group="test_type" value="3rd_party_test_deprecated" />
-        </deny>
-    </rule>
-    <rule scope="variation">
-        <deny>
-            <tag group="test_type" value="3rd_party_test" />
-        </deny>
-    </rule>
-</config>
diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml
deleted file mode 100644
index 9b7e29085936e28939a1540a31922a5ea31bd320..0000000000000000000000000000000000000000
--- a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/domain_ps.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * 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/Magento/Mtf/TestRunner/etc/testRunner.xsd">
-    <rule scope="testcase">
-        <allow>
-            <tag group="domain" value="PS" />
-        </allow>
-        <deny>
-            <tag group="stable" value="no" />
-            <tag group="to_maintain" value="yes" />
-            <tag group="test_type" value="3rd_party_test_deprecated" />
-        </deny>
-    </rule>
-    <rule scope="variation">
-        <deny>
-            <tag group="stable" value="no" />
-            <tag group="to_maintain" value="yes" />
-            <tag group="test_type" value="3rd_party_test" />
-        </deny>
-    </rule>
-</config>
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php
index ffcf5096b103f74c7406e4a36eeba22115090ac0..eeba8d78cead15a0d444c5cedd24f5ee5b18f7c1 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php
@@ -70,6 +70,19 @@ class EavTest extends \PHPUnit_Framework_TestCase
         $this->prepareDataForComparison($actualMeta, $expectedMeta);
         $this->assertEquals($expectedMeta, $actualMeta);
     }
+    
+    public function testModifyMetaNewProduct()
+    {
+        $this->objectManager->get(\Magento\Eav\Model\Entity\AttributeCache::class)->clear();
+        /** @var \Magento\Catalog\Model\Product $product */
+        $product = $this->objectManager->create(\Magento\Catalog\Model\Product::class);
+        $product->setAttributeSetId(4);
+        $this->locatorMock->expects($this->any())->method('getProduct')->willReturn($product);
+        $expectedMeta = include __DIR__ . '/_files/eav_expected_meta_output_w_default.php';
+        $actualMeta = $this->eavModifier->modifyMeta([]);
+        $this->prepareDataForComparison($actualMeta, $expectedMeta);
+        $this->assertEquals($expectedMeta, $actualMeta);
+    }
 
     /**
      * @magentoDataFixture Magento/Catalog/_files/product_simple_with_admin_store.php
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/_files/eav_expected_meta_output.php b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/_files/eav_expected_meta_output.php
index 1f22ec3b1c6ebcc9a1f4cef384d9d0ac9e875f65..29b092177b522efdebe0cc53e507225493da81c8 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/_files/eav_expected_meta_output.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/_files/eav_expected_meta_output.php
@@ -35,7 +35,6 @@ return [
                                     "visible" => "1",
                                     "required" => "0",
                                     "label" => "Enable Product",
-                                    "default" => "1",
                                     "source" => "product-details",
                                     "scopeLabel" => "[WEBSITE]",
                                     "globalScope" => false,
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/_files/eav_expected_meta_output_w_default.php b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/_files/eav_expected_meta_output_w_default.php
new file mode 100644
index 0000000000000000000000000000000000000000..999a96d29811ff68fe3dbbea152a02c56dee03fb
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/_files/eav_expected_meta_output_w_default.php
@@ -0,0 +1,105 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+return [
+    "product-details" => [
+        "arguments" => [
+            "data" => [
+                "config" => [
+                    "dataScope" => "data.product",
+                ],
+            ],
+        ],
+        "children" => [
+            "container_status" => [
+                "children" => [
+                    "status" => [
+                        "arguments" => [
+                            "data" => [
+                                "config" => [
+                                    "dataType" => "select",
+                                    "formElement" => "select",
+                                    "options" => [
+                                        [
+                                            "value" => 1,
+                                            "label" => "Enabled"
+                                        ],
+                                        [
+                                            "value" => 2,
+                                            "label" => "Disabled"
+                                        ]
+                                    ],
+                                    "visible" => "1",
+                                    "required" => "0",
+                                    "label" => "Enable Product",
+                                    "default" => "1",
+                                    "source" => "product-details",
+                                    "scopeLabel" => "[WEBSITE]",
+                                    "globalScope" => false,
+                                    "code" => "status",
+                                    "sortOrder" => "__placeholder__",
+                                    "componentType" => "field"
+                                ],
+                            ],
+                        ],
+                    ],
+                ],
+            ],
+            "container_name" => [
+                "children" => [
+                    "name" => [
+                        "arguments" => [
+                            "data" => [
+                                "config" => [
+                                    "dataType" => "text",
+                                    "formElement" => "input",
+                                    "visible" => "1",
+                                    "required" => "1",
+                                    "label" => "Product Name",
+                                    "source" => "product-details",
+                                    "scopeLabel" => "[STORE VIEW]",
+                                    "globalScope" => false,
+                                    "code" => "name",
+                                    "sortOrder" => "__placeholder__",
+                                    "componentType" => "field",
+                                    "validation" => [
+                                        "required-entry" => true
+                                    ],
+                                ],
+                            ],
+                        ],
+                    ],
+                ],
+            ],
+            "container_sku" => [
+                "children" => [
+                    "sku" => [
+                        "arguments" => [
+                            "data" => [
+                                "config" => [
+                                    "dataType" => "text",
+                                    "formElement" => "input",
+                                    "visible" => "1",
+                                    "required" => "1",
+                                    "label" => "SKU",
+                                    "source" => "product-details",
+                                    "scopeLabel" => "[GLOBAL]",
+                                    "globalScope" => true,
+                                    "code" => "sku",
+                                    "sortOrder" => "__placeholder__",
+                                    "componentType" => "field",
+                                    "validation" => [
+                                        "required-entry" => true
+                                    ],
+                                ],
+                            ],
+                        ],
+                    ],
+                ],
+            ],
+        ],
+    ],
+];
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..0a06be7f9dd4a7262d1f3cdd4d4a283693b5dbd8
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search.php
@@ -0,0 +1,122 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+include 'category.php';
+
+use Magento\Catalog\Api\CategoryLinkManagementInterface;
+use Magento\Catalog\Model\Product;
+use Magento\Catalog\Model\Product\Attribute\Source\Status;
+use Magento\Catalog\Model\Product\Visibility;
+
+$products = [
+    [
+        'type' => 'simple',
+        'id' => 101,
+        'name' => 'search product 1',
+        'sku' => 'search_product_1',
+        'status' => Visibility::VISIBILITY_BOTH,
+        'visibility' => Status::STATUS_ENABLED,
+        'attribute_set' => 4,
+        'website_ids' => [1],
+        'price' => 10,
+        'category_id' => 333,
+        'meta_title' => 'Key Title',
+        'meta_keyword' => 'meta keyword',
+        'meta_description' => 'meta description',
+    ],
+    [
+        'type' => 'simple',
+        'id' => 102,
+        'name' => 'search product 2',
+        'sku' => 'search_product_2',
+        'status' => Visibility::VISIBILITY_BOTH,
+        'visibility' => Status::STATUS_ENABLED,
+        'attribute_set' => 4,
+        'website_ids' => [1],
+        'price' => 10,
+        'category_id' => 333,
+        'meta_title' => 'Last Title',
+        'meta_keyword' => 'meta keyword',
+        'meta_description' => 'meta description',
+    ],
+    [
+        'type' => 'simple',
+        'id' => 103,
+        'name' => 'search product 3',
+        'sku' => 'search_product_3',
+        'status' => Visibility::VISIBILITY_BOTH,
+        'visibility' => Status::STATUS_ENABLED,
+        'attribute_set' => 4,
+        'website_ids' => [1],
+        'price' => 20,
+        'category_id' => 333,
+        'meta_title' => 'First Title',
+        'meta_keyword' => 'meta keyword',
+        'meta_description' => 'meta description',
+    ],
+    [
+        'type' => 'simple',
+        'id' => 104,
+        'name' => 'search product 4',
+        'sku' => 'search_product_4',
+        'status' => Visibility::VISIBILITY_BOTH,
+        'visibility' => Status::STATUS_ENABLED,
+        'attribute_set' => 4,
+        'website_ids' => [1],
+        'price' => 30,
+        'category_id' => 333,
+        'meta_title' => 'A title',
+        'meta_keyword' => 'meta keyword',
+        'meta_description' => 'meta description',
+    ],
+    [
+        'type' => 'simple',
+        'id' => 105,
+        'name' => 'search product 5',
+        'sku' => 'search_product_5',
+        'status' => Visibility::VISIBILITY_BOTH,
+        'visibility' => Status::STATUS_ENABLED,
+        'attribute_set' => 4,
+        'website_ids' => [1],
+        'price' => 40,
+        'category_id' => 333,
+        'meta_title' => 'meta title',
+        'meta_keyword' => 'meta keyword',
+        'meta_description' => 'meta description',
+    ],
+];
+
+/** @var CategoryLinkManagementInterface $categoryLinkManagement */
+$categoryLinkManagement = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+    ->create(CategoryLinkManagementInterface::class);
+
+$categoriesToAssign = [];
+
+foreach ($products as $data) {
+    /** @var $product Product */
+    $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(Product::class);
+    $product
+        ->setTypeId($data['type'])
+        ->setId($data['id'])
+        ->setAttributeSetId($data['attribute_set'])
+        ->setWebsiteIds($data['website_ids'])
+        ->setName($data['name'])
+        ->setSku($data['sku'])
+        ->setPrice($data['price'])
+        ->setMetaTitle($data['meta_title'])
+        ->setMetaKeyword($data['meta_keyword'])
+        ->setMetaDescription($data['meta_keyword'])
+        ->setVisibility($data['visibility'])
+        ->setStatus($data['status'])
+        ->setStockData(['use_config_manage_stock' => 0])
+        ->save();
+
+    $categoriesToAssign[$data['sku']][] = $data['category_id'];
+}
+
+foreach ($categoriesToAssign as $sku => $categoryIds) {
+    $categoryLinkManagement->assignProductToCategories($sku, $categoryIds);
+}
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search_rollback.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search_rollback.php
new file mode 100644
index 0000000000000000000000000000000000000000..8c0cf3183eb5900fff9d9133e6696279e4d97e67
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/products_for_search_rollback.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Catalog\Api\ProductRepositoryInterface;
+use Magento\Framework\Exception\NoSuchEntityException;
+use Magento\Framework\Registry;
+use Magento\TestFramework\Helper\Bootstrap;
+
+Bootstrap::getInstance()->getInstance()->reinitialize();
+
+/** @var Registry $registry */
+$registry = Bootstrap::getObjectManager()->get(Registry::class);
+
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', true);
+
+/** @var ProductRepositoryInterface $productRepository */
+$productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
+
+$productSkus = ['search_product_1', 'search_product_2', 'search_product_3', 'search_product_4', 'search_product_5'];
+foreach ($productSkus as $sku) {
+    try {
+        $product = $productRepository->get($sku, false, null, true);
+        $productRepository->delete($product);
+    } catch (NoSuchEntityException $e) {
+
+    }
+}
+
+include_once 'category_rollback.php';
+
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', false);
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/NameTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/NameTest.php
index c7710cb8be8b59d17d7e70fe56288aa5841ccdbe..2793d1efd59009c77440014db5e3f0a267cbf233 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/NameTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/NameTest.php
@@ -43,13 +43,13 @@ class NameTest extends \PHPUnit_Framework_TestCase
 
         $html = $this->_block->toHtml();
 
-        $this->assertContains('title="First Name"', $html);
+        $this->assertContains('title="First&#x20;Name"', $html);
         $this->assertContains('value="Jane"', $html);
-        $this->assertContains('title="Last Name"', $html);
+        $this->assertContains('title="Last&#x20;Name"', $html);
         $this->assertContains('value="Doe"', $html);
-        $this->assertNotContains('title="Middle Name/Initial"', $html);
-        $this->assertNotContains('title="Name Prefix"', $html);
-        $this->assertNotContains('title="Name Suffix"', $html);
+        $this->assertNotContains('title="Middle&#x20;Name&#x2F;Initial"', $html);
+        $this->assertNotContains('title="Name&#x20;Prefix"', $html);
+        $this->assertNotContains('title="Name&#x20;Suffix"', $html);
     }
 
     /**
@@ -78,15 +78,15 @@ class NameTest extends \PHPUnit_Framework_TestCase
 
         $html = $this->_block->toHtml();
 
-        $this->assertContains('title="First Name"', $html);
+        $this->assertContains('title="First&#x20;Name"', $html);
         $this->assertContains('value="Jane"', $html);
-        $this->assertContains('title="Last Name"', $html);
+        $this->assertContains('title="Last&#x20;Name"', $html);
         $this->assertContains('value="Doe"', $html);
-        $this->assertContains('title="Middle Name/Initial"', $html);
+        $this->assertContains('title="Middle&#x20;Name&#x2F;Initial"', $html);
         $this->assertContains('value="Roe"', $html);
-        $this->assertContains('title="Name Prefix"', $html);
+        $this->assertContains('title="Name&#x20;Prefix"', $html);
         $this->assertContains('value="Dr."', $html);
-        $this->assertContains('title="Name Suffix"', $html);
+        $this->assertContains('title="Name&#x20;Suffix"', $html);
         $this->assertContains('value="Ph.D."', $html);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/AddressRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/AddressRepositoryTest.php
index 600db468d926b92c51f021fc6dd871960e8a2663..9e8a6a0bb9f38b145be03c8213270f3cd6fd6990 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/AddressRepositoryTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/AddressRepositoryTest.php
@@ -327,31 +327,23 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
             }
         }
 
-        $searchResults = $this->repository->getList($searchBuilder->create());
+        $searchBuilder->setPageSize(1);
+        $searchBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchBuilder->create();
+        $searchResults = $this->repository->getList($searchCriteria);
+
+        $items = array_values($searchResults->getItems());
 
         $this->assertEquals(count($expectedResult), $searchResults->getTotalCount());
+        $this->assertEquals(1, count($items));
 
-        $i = 0;
-        /** @var \Magento\Customer\Api\Data\AddressInterface $item*/
-        foreach ($searchResults->getItems() as $item) {
-            $this->assertEquals(
-                $expectedResult[$i]['id'],
-                $item->getId()
-            );
-            $this->assertEquals(
-                $expectedResult[$i]['city'],
-                $item->getCity()
-            );
-            $this->assertEquals(
-                $expectedResult[$i]['postcode'],
-                $item->getPostcode()
-            );
-            $this->assertEquals(
-                $expectedResult[$i]['firstname'],
-                $item->getFirstname()
-            );
-            $i++;
-        }
+        $expectedResultIndex = count($expectedResult) - 1;
+
+        $this->assertEquals($expectedResult[$expectedResultIndex]['id'], $items[0]->getId());
+        $this->assertEquals($expectedResult[$expectedResultIndex]['city'], $items[0]->getCity());
+        $this->assertEquals($expectedResult[$expectedResultIndex]['postcode'], $items[0]->getPostcode());
+        $this->assertEquals($expectedResult[$expectedResultIndex]['firstname'], $items[0]->getFirstname());
     }
 
     public function searchAddressDataProvider()
@@ -371,13 +363,17 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
                 [$filterBuilder->setField('postcode')->setValue('75477')->create()],
                 null,
                 null,
-                [['id' => 1, 'city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John']],
+                [
+                    ['id' => 1, 'city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John'],
+                ],
             ],
             'Address with city CityM' => [
                 [$filterBuilder->setField('city')->setValue('CityM')->create()],
                 null,
                 null,
-                [['id' => 1, 'city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John']],
+                [
+                    ['id' => 1, 'city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John'],
+                ],
             ],
             'Addresses with firstname John sorted by firstname desc, city asc' => [
                 [$filterBuilder->setField('firstname')->setValue('John')->create()],
diff --git a/dev/tests/integration/testsuite/Magento/Eav/Model/Attribute/GroupRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Eav/Model/Attribute/GroupRepositoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..8527628cb2a0d41b1224ebc2ba298f1ec476a906
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Eav/Model/Attribute/GroupRepositoryTest.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Model\Attribute;
+
+use Magento\Eav\Api\AttributeGroupRepositoryInterface;
+use Magento\Eav\Model\Entity\Attribute\Set;
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class GroupRepositoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var AttributeGroupRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(AttributeGroupRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Eav/_files/attribute_group_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var Set $attributeSet */
+        $attributeSet = Bootstrap::getObjectManager()->create(Set::class)
+            ->load('attribute_set_1_for_search', 'attribute_set_name');
+
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField('attribute_set_id')
+            ->setValue($attributeSet->getId())
+            ->create();
+        $filter2 = $filterBuilder->setField('default_id')
+            ->setValue(0)
+            ->setConditionType('eq')
+            ->create();
+        $filter3 = $filterBuilder->setField('sort_order')
+            ->setValue(10)
+            ->setConditionType('gteq')
+            ->create();
+        $filter4 = $filterBuilder->setField('sort_order')
+            ->setValue(30)
+            ->setConditionType('lteq')
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder = Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $searchCriteriaBuilder->addFilters([$filter3, $filter4]);
+
+        /** @var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField('attribute_group_code')
+            ->setDirection(SortOrder::SORT_ASC)
+            ->create();
+
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(1);
+        $searchCriteriaBuilder->setCurrentPage(1);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList($searchCriteria);
+
+        $this->assertEquals(2, $searchResult->getTotalCount());
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('attribute_group_3_for_search', $items[0]['attribute_group_code']);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Eav/Model/AttributeRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Eav/Model/AttributeRepositoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..8c2052183cd8215e2309d298377366e556fe8e24
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Eav/Model/AttributeRepositoryTest.php
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Eav\Model;
+
+use Magento\Eav\Api\AttributeRepositoryInterface;
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class AttributeRepositoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var AttributeRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(AttributeRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Eav/_files/attribute_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField('backend_type')
+            ->setValue('varchar')
+            ->create();
+        $filter2 = $filterBuilder->setField('is_user_defined')
+            ->setValue(true)
+            ->create();
+        $filter3 = $filterBuilder->setField('is_required')
+            ->setValue(true)
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder = Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $searchCriteriaBuilder->addFilters([$filter3]);
+
+        /** @var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField('attribute_code')
+            ->setDirection(SortOrder::SORT_ASC)
+            ->create();
+
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList('order', $searchCriteria);
+
+        $this->assertEquals(3, $searchResult->getTotalCount());
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('attribute_for_search_3', $items[0]['attribute_code']);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_for_search.php b/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..18ed20147199f3bcf924e70d47ed6c36c45fd84a
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_for_search.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+$entityTypeId = $objectManager->create(\Magento\Eav\Model\Entity\Type::class)
+    ->loadByCode('order')
+    ->getId();
+
+$attributeData = [
+    [
+        'attribute_code' => 'attribute_for_search_1',
+        'entity_type_id' => $entityTypeId,
+        'backend_type' => 'varchar',
+        'is_required' => 1,
+        'is_user_defined' => 1,
+        'is_unique' => 0,
+    ],
+    [
+        'attribute_code' => 'attribute_for_search_2',
+        'entity_type_id' => $entityTypeId,
+        'backend_type' => 'varchar',
+        'is_required' => 1,
+        'is_user_defined' => 1,
+        'is_unique' => 0,
+    ],
+    [
+        'attribute_code' => 'attribute_for_search_3',
+        'entity_type_id' => $entityTypeId,
+        'backend_type' => 'varchar',
+        'is_required' => 1,
+        'is_user_defined' => 1,
+        'is_unique' => 0,
+    ],
+    [
+        'attribute_code' => 'attribute_for_search_4',
+        'entity_type_id' => $entityTypeId,
+        'backend_type' => 'int',
+        'is_required' => 0,
+        'is_user_defined' => 1,
+        'is_unique' => 0,
+    ],
+    [
+        'attribute_code' => 'attribute_for_search_5',
+        'entity_type_id' => $entityTypeId,
+        'backend_type' => 'varchar',
+        'is_required' => 0,
+        'is_user_defined' => 1,
+        'is_unique' => 0,
+    ],
+];
+
+foreach ($attributeData as $data) {
+    /** @var \Magento\Eav\Model\Entity\Attribute $attribute */
+    $attribute = $objectManager->create(\Magento\Eav\Model\Entity\Attribute::class);
+    $attribute->setData($data);
+    $attribute->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_group_for_search.php b/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_group_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..4400c7d90d13755b884e5b941d7f03829ab42ba7
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_group_for_search.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+/**
+ * Create attribute set
+ */
+$entityTypeId = $objectManager->create(\Magento\Eav\Model\Entity\Type::class)
+    ->loadByCode('catalog_product')
+    ->getId();
+
+/** @var \Magento\Eav\Model\Entity\Attribute\Set $attributeSet */
+$attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class);
+$attributeSet->setData([
+    'attribute_set_name' => 'attribute_set_1_for_search',
+    'entity_type_id' => $entityTypeId,
+    'sort_order' => 100,
+]);
+$attributeSet->validate();
+$attributeSet->save();
+
+/**
+ * Create attribute groups
+ */
+$attributeGroupData = [
+    [
+        'attribute_set_id' => $attributeSet->getAttributeSetId(),
+        'sort_order' => 10,
+        'attribute_group_code' => 'attribute_group_1_for_search',
+        'default_id' => 1,
+    ],
+    [
+        'attribute_set_id' => $attributeSet->getAttributeSetId(),
+        'sort_order' => 20,
+        'attribute_group_code' => 'attribute_group_2_for_search',
+        'default_id' => 0,
+    ],
+    [
+        'attribute_set_id' => $attributeSet->getAttributeSetId(),
+        'sort_order' => 30,
+        'attribute_group_code' => 'attribute_group_3_for_search',
+        'default_id' => 0,
+    ],
+];
+
+foreach ($attributeGroupData as $data) {
+    /** @var \Magento\Eav\Model\Entity\Attribute\Group $attributeGroup */
+    $attributeGroup = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Group::class);
+    $attributeGroup->setData($data);
+    $attributeGroup->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_set_for_search.php b/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_set_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..c24dfcec7a66914bf9da12fb177e4c353c3b8673
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_set_for_search.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+$entityTypeId = $objectManager->create(\Magento\Eav\Model\Entity\Type::class)
+    ->loadByCode('catalog_product')
+    ->getId();
+
+$attributeSetData = [
+    [
+        'attribute_set_name' => 'attribute_set_1_for_search',
+        'entity_type_id' => $entityTypeId,
+        'sort_order' => 100,
+    ],
+    [
+        'attribute_set_name' => 'attribute_set_2_for_search',
+        'entity_type_id' => $entityTypeId,
+        'sort_order' => 200,
+    ],
+    [
+        'attribute_set_name' => 'attribute_set_3_for_search',
+        'entity_type_id' => $entityTypeId,
+        'sort_order' => 300,
+    ],
+    [
+        'attribute_set_name' => 'attribute_set_4_for_search',
+        'entity_type_id' => $entityTypeId,
+        'sort_order' => 400,
+    ],
+];
+
+foreach ($attributeSetData as $data) {
+    /** @var \Magento\Eav\Model\Entity\Attribute\Set $attributeSet */
+    $attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class);
+    $attributeSet->setData($data);
+    $attributeSet->validate();
+    $attributeSet->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_set_for_search_rollback.php b/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_set_for_search_rollback.php
new file mode 100644
index 0000000000000000000000000000000000000000..e787e2326312aa11e0ca4186b281c36473f053b3
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Eav/_files/attribute_set_for_search_rollback.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+$attributeSetData = [
+    'attribute_set_1_for_search',
+    'attribute_set_2_for_search',
+    'attribute_set_3_for_search',
+    'attribute_set_4_for_search',
+];
+
+foreach ($attributeSetData as $attributeSetName) {
+    /** @var \Magento\Eav\Model\Entity\Attribute\Set $attributeSet */
+    $attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
+        ->load($attributeSetName, 'attribute_set_name');
+    if ($attributeSet->getId()) {
+        $attributeSet->delete();
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Api/CreditmemoCommentRepositoryInterfaceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Api/CreditmemoCommentRepositoryInterfaceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..f4089aadaa6288bd08f5928a8b3c7ebab18312f9
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Api/CreditmemoCommentRepositoryInterfaceTest.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api;
+
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\Sales\Api\Data\CreditmemoCommentInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class CreditmemoCommentRepositoryInterfaceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CreditmemoCommentRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(CreditmemoCommentRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/creditmemo_comments_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(CreditmemoCommentInterface::COMMENT)
+            ->setValue('comment 2')
+            ->create();
+        $filter2 = $filterBuilder->setField(CreditmemoCommentInterface::COMMENT)
+            ->setValue('comment 3')
+            ->create();
+        $filter3 = $filterBuilder->setField(CreditmemoCommentInterface::COMMENT)
+            ->setValue('comment 4')
+            ->create();
+        $filter4 = $filterBuilder->setField(CreditmemoCommentInterface::COMMENT)
+            ->setValue('comment 5')
+            ->create();
+        $filter5 = $filterBuilder->setField(CreditmemoCommentInterface::IS_VISIBLE_ON_FRONT)
+            ->setValue(1)
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(CreditmemoCommentInterface::COMMENT)
+            ->setDirection(SortOrder::SORT_DESC)
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3, $filter4]);
+        $searchCriteriaBuilder->addFilters([$filter5]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList($searchCriteria);
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('comment 2', $items[0][CreditmemoCommentInterface::COMMENT]);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Api/CreditmemoItemRepositoryInterfaceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Api/CreditmemoItemRepositoryInterfaceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..933832954233c15b41dcc80bb28eeecf62ce5864
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Api/CreditmemoItemRepositoryInterfaceTest.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api;
+
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\Sales\Api\Data\CreditmemoItemInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class CreditmemoItemRepositoryInterfaceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CreditmemoItemRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(CreditmemoItemRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/creditmemo_items_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(CreditmemoItemInterface::NAME)
+            ->setValue('item 2')
+            ->create();
+        $filter2 = $filterBuilder->setField(CreditmemoItemInterface::NAME)
+            ->setValue('item 3')
+            ->create();
+        $filter3 = $filterBuilder->setField(CreditmemoItemInterface::NAME)
+            ->setValue('item 4')
+            ->create();
+        $filter4 = $filterBuilder->setField(CreditmemoItemInterface::NAME)
+            ->setValue('item 5')
+            ->create();
+        $filter5 = $filterBuilder->setField(CreditmemoItemInterface::PRICE)
+            ->setValue(45)
+            ->setConditionType('lt')
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(CreditmemoItemInterface::NAME)
+            ->setDirection(SortOrder::SORT_DESC)
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3, $filter4]);
+        $searchCriteriaBuilder->addFilters([$filter5]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList($searchCriteria);
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('item 2', $items[0][CreditmemoItemInterface::NAME]);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Api/InvoiceCommentRepositoryInterfaceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Api/InvoiceCommentRepositoryInterfaceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..5cf0cde4f1fc73f2689e7930652d835bd347a94c
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Api/InvoiceCommentRepositoryInterfaceTest.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api;
+
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\Sales\Api\Data\InvoiceCommentInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class InvoiceCommentRepositoryInterfaceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var InvoiceCommentRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(InvoiceCommentRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/invoice_comments_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(InvoiceCommentInterface::COMMENT)
+            ->setValue('comment 2')
+            ->create();
+        $filter2 = $filterBuilder->setField(InvoiceCommentInterface::COMMENT)
+            ->setValue('comment 3')
+            ->create();
+        $filter3 = $filterBuilder->setField(InvoiceCommentInterface::COMMENT)
+            ->setValue('comment 4')
+            ->create();
+        $filter4 = $filterBuilder->setField(InvoiceCommentInterface::COMMENT)
+            ->setValue('comment 5')
+            ->create();
+        $filter5 = $filterBuilder->setField(InvoiceCommentInterface::IS_VISIBLE_ON_FRONT)
+            ->setValue(1)
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(InvoiceCommentInterface::COMMENT)
+            ->setDirection(SortOrder::SORT_DESC)
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3, $filter4]);
+        $searchCriteriaBuilder->addFilters([$filter5]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList($searchCriteria);
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('comment 2', $items[0][InvoiceCommentInterface::COMMENT]);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Api/InvoiceItemRepositoryInterfaceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Api/InvoiceItemRepositoryInterfaceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..7f7f64e897bb586e3e72c3dbd9f791d8f47002c1
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Api/InvoiceItemRepositoryInterfaceTest.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api;
+
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\Sales\Api\Data\InvoiceItemInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class InvoiceItemRepositoryInterfaceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var InvoiceItemRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(InvoiceItemRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/invoice_items_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(InvoiceItemInterface::NAME)
+            ->setValue('item 2')
+            ->create();
+        $filter2 = $filterBuilder->setField(InvoiceItemInterface::NAME)
+            ->setValue('item 3')
+            ->create();
+        $filter3 = $filterBuilder->setField(InvoiceItemInterface::NAME)
+            ->setValue('item 4')
+            ->create();
+        $filter4 = $filterBuilder->setField(InvoiceItemInterface::NAME)
+            ->setValue('item 5')
+            ->create();
+        $filter5 = $filterBuilder->setField(InvoiceItemInterface::PRICE)
+            ->setValue(45)
+            ->setConditionType('lt')
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(InvoiceItemInterface::NAME)
+            ->setDirection(SortOrder::SORT_DESC)
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3, $filter4]);
+        $searchCriteriaBuilder->addFilters([$filter5]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList($searchCriteria);
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('item 2', $items[0][InvoiceItemInterface::NAME]);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Api/OrderStatusHistoryRepositoryInterfaceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Api/OrderStatusHistoryRepositoryInterfaceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..5dd28b5603de2879b6f1419e545872104dd360f2
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Api/OrderStatusHistoryRepositoryInterfaceTest.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api;
+
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\Sales\Api\Data\OrderStatusHistoryInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class OrderStatusHistoryRepositoryInterfaceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var OrderStatusHistoryRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(OrderStatusHistoryRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/order_status_history_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(OrderStatusHistoryInterface::COMMENT)
+            ->setValue('comment 2')
+            ->create();
+        $filter2 = $filterBuilder->setField(OrderStatusHistoryInterface::COMMENT)
+            ->setValue('comment 3')
+            ->create();
+        $filter3 = $filterBuilder->setField(OrderStatusHistoryInterface::COMMENT)
+            ->setValue('comment 4')
+            ->create();
+        $filter4 = $filterBuilder->setField(OrderStatusHistoryInterface::COMMENT)
+            ->setValue('comment 5')
+            ->create();
+        $filter5 = $filterBuilder->setField(OrderStatusHistoryInterface::IS_VISIBLE_ON_FRONT)
+            ->setValue(1)
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(OrderStatusHistoryInterface::COMMENT)
+            ->setDirection(SortOrder::SORT_DESC)
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3, $filter4]);
+        $searchCriteriaBuilder->addFilters([$filter5]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList($searchCriteria);
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('comment 2', $items[0][OrderStatusHistoryInterface::COMMENT]);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Api/ShipmentCommentRepositoryInterfaceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Api/ShipmentCommentRepositoryInterfaceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..14784958c00a3eb1be1f9d225031df3f458b3bcf
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Api/ShipmentCommentRepositoryInterfaceTest.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api;
+
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\Sales\Api\Data\ShipmentCommentInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class ShipmentCommentRepositoryInterfaceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ShipmentCommentRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(ShipmentCommentRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/shipment_comments_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(ShipmentCommentInterface::COMMENT)
+            ->setValue('comment 2')
+            ->create();
+        $filter2 = $filterBuilder->setField(ShipmentCommentInterface::COMMENT)
+            ->setValue('comment 3')
+            ->create();
+        $filter3 = $filterBuilder->setField(ShipmentCommentInterface::COMMENT)
+            ->setValue('comment 4')
+            ->create();
+        $filter4 = $filterBuilder->setField(ShipmentCommentInterface::COMMENT)
+            ->setValue('comment 5')
+            ->create();
+        $filter5 = $filterBuilder->setField(ShipmentCommentInterface::IS_VISIBLE_ON_FRONT)
+            ->setValue(1)
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(ShipmentCommentInterface::COMMENT)
+            ->setDirection(SortOrder::SORT_DESC)
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3, $filter4]);
+        $searchCriteriaBuilder->addFilters([$filter5]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList($searchCriteria);
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('comment 2', $items[0][ShipmentCommentInterface::COMMENT]);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Api/ShipmentItemRepositoryInterfaceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Api/ShipmentItemRepositoryInterfaceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..e0d5799c6c7ca91bb8b550ccb5cdbbb21cf9637b
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Api/ShipmentItemRepositoryInterfaceTest.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api;
+
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\Sales\Api\Data\ShipmentItemInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class ShipmentItemRepositoryInterfaceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ShipmentItemRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(ShipmentItemRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/shipment_items_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(ShipmentItemInterface::NAME)
+            ->setValue('item 2')
+            ->create();
+        $filter2 = $filterBuilder->setField(ShipmentItemInterface::NAME)
+            ->setValue('item 3')
+            ->create();
+        $filter3 = $filterBuilder->setField(ShipmentItemInterface::NAME)
+            ->setValue('item 4')
+            ->create();
+        $filter4 = $filterBuilder->setField(ShipmentItemInterface::NAME)
+            ->setValue('item 5')
+            ->create();
+        $filter5 = $filterBuilder->setField(ShipmentItemInterface::PRICE)
+            ->setValue(45)
+            ->setConditionType('lt')
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(ShipmentItemInterface::NAME)
+            ->setDirection(SortOrder::SORT_DESC)
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3, $filter4]);
+        $searchCriteriaBuilder->addFilters([$filter5]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList($searchCriteria);
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('item 2', $items[0][ShipmentItemInterface::NAME]);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Api/ShipmentTrackRepositoryInterfaceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Api/ShipmentTrackRepositoryInterfaceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..dcbba427073ff49e3919c31096dee7c958769542
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Api/ShipmentTrackRepositoryInterfaceTest.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Api;
+
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Api\SortOrderBuilder;
+use Magento\Sales\Api\Data\ShipmentTrackInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class ShipmentTrackRepositoryInterfaceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ShipmentTrackRepositoryInterface
+     */
+    private $repository;
+
+    protected function setUp()
+    {
+        $this->repository = Bootstrap::getObjectManager()->create(ShipmentTrackRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/shipment_tracks_for_search.php
+     */
+    public function testGetList()
+    {
+        /** @var FilterBuilder $filterBuilder */
+        $filterBuilder = Bootstrap::getObjectManager()->create(FilterBuilder::class);
+
+        $filter1 = $filterBuilder->setField(ShipmentTrackInterface::TITLE)
+            ->setValue('title 2')
+            ->create();
+        $filter2 = $filterBuilder->setField(ShipmentTrackInterface::DESCRIPTION)
+            ->setValue('description 3')
+            ->create();
+        $filter3 = $filterBuilder->setField(ShipmentTrackInterface::TRACK_NUMBER)
+            ->setValue('track number 4')
+            ->create();
+        $filter4 = $filterBuilder->setField(ShipmentTrackInterface::CARRIER_CODE)
+            ->setValue('carrier code 5')
+            ->create();
+        $filter5 = $filterBuilder->setField(ShipmentTrackInterface::QTY)
+            ->setConditionType('lt')
+            ->setValue(5)
+            ->create();
+        $filter6 = $filterBuilder->setField(ShipmentTrackInterface::WEIGHT)
+            ->setValue(1)
+            ->create();
+
+        /**@var SortOrderBuilder $sortOrderBuilder */
+        $sortOrderBuilder = Bootstrap::getObjectManager()->create(SortOrderBuilder::class);
+
+        /** @var SortOrder $sortOrder */
+        $sortOrder = $sortOrderBuilder->setField(ShipmentTrackInterface::DESCRIPTION)
+            ->setDirection(SortOrder::SORT_DESC)
+            ->create();
+
+        /** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+        $searchCriteriaBuilder =  Bootstrap::getObjectManager()->create(SearchCriteriaBuilder::class);
+
+        $searchCriteriaBuilder->addFilters([$filter1, $filter2, $filter3, $filter4]);
+        $searchCriteriaBuilder->addFilters([$filter5]);
+        $searchCriteriaBuilder->addFilters([$filter6]);
+        $searchCriteriaBuilder->setSortOrders([$sortOrder]);
+
+        $searchCriteriaBuilder->setPageSize(2);
+        $searchCriteriaBuilder->setCurrentPage(2);
+
+        $searchCriteria = $searchCriteriaBuilder->create();
+
+        $searchResult = $this->repository->getList($searchCriteria);
+
+        $items = array_values($searchResult->getItems());
+        $this->assertEquals(1, count($items));
+        $this->assertEquals('title 2', $items[0][ShipmentTrackInterface::TITLE]);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/AddressRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/AddressRepositoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..687fff317ca50a317cc00e2a3b7b6438dd7e0f3a
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/AddressRepositoryTest.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order;
+
+use Magento\TestFramework\Helper\Bootstrap;
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrderBuilder;
+
+/**
+ * Class AddressRepositoryTest
+ * @package Magento\Sales\Model\Order]
+ * @magentoDbIsolation enabled
+ */
+class AddressRepositoryTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var AddressRepository */
+    protected $repository;
+
+    /** @var  SortOrderBuilder */
+    private $sortOrderBuilder;
+
+    /** @var FilterBuilder */
+    private $filterBuilder;
+
+    /** @var SearchCriteriaBuilder */
+    private $searchCriteriaBuilder;
+
+    protected function setUp()
+    {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->repository = $objectManager->create(AddressRepository::class);
+        $this->searchCriteriaBuilder = $objectManager->create(
+            \Magento\Framework\Api\SearchCriteriaBuilder::class
+        );
+        $this->filterBuilder = $objectManager->get(
+            \Magento\Framework\Api\FilterBuilder::class
+        );
+        $this->sortOrderBuilder = $objectManager->get(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/address_list.php
+     */
+    public function testGetListWithMultipleFiltersAndSorting()
+    {
+        $filter1 = $this->filterBuilder
+            ->setField('postcode')
+            ->setConditionType('neq')
+            ->setValue('ZX0789A')
+            ->create();
+        $filter2 = $this->filterBuilder
+            ->setField('address_type')
+            ->setValue('billing')
+            ->create();
+        $filter3 = $this->filterBuilder
+            ->setField('city')
+            ->setValue('Ena4ka')
+            ->create();
+        $sortOrder = $this->sortOrderBuilder
+            ->setField('region_id')
+            ->setDirection('DESC')
+            ->create();
+
+        $this->searchCriteriaBuilder->addFilters([$filter1]);
+        $this->searchCriteriaBuilder->addFilters([$filter2, $filter3]);
+        $this->searchCriteriaBuilder->addSortOrder($sortOrder);
+        $searchCriteria = $this->searchCriteriaBuilder->create();
+        /** @var \Magento\Sales\Api\Data\OrderAddressSearchResultInterface $result */
+        $result = $this->repository->getList($searchCriteria);
+        $items = $result->getItems();
+        $this->assertCount(2, $items);
+        $this->assertEquals('ZX0789', array_shift($items)->getPostcode());
+        $this->assertEquals('47676', array_shift($items)->getPostcode());
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Payment/RepositoryTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Payment/RepositoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..9d82e36478743a47ccc12bb67e244b141e1a1646
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Payment/RepositoryTest.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Sales\Model\Order\Payment;
+
+use Magento\TestFramework\Helper\Bootstrap;
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrderBuilder;
+
+/**
+ * Class RepositoryTest
+ * @package Magento\Sales\Model\Order\Payment\
+ * @magentoDbIsolation enabled
+ */
+class RepositoryTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var Repository */
+    protected $repository;
+
+    /** @var  SortOrderBuilder */
+    private $sortOrderBuilder;
+
+    /** @var FilterBuilder */
+    private $filterBuilder;
+
+    /** @var SearchCriteriaBuilder */
+    private $searchCriteriaBuilder;
+
+    protected function setUp()
+    {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->repository = $objectManager->create(Repository::class);
+        $this->searchCriteriaBuilder = $objectManager->create(
+            \Magento\Framework\Api\SearchCriteriaBuilder::class
+        );
+        $this->filterBuilder = $objectManager->get(
+            \Magento\Framework\Api\FilterBuilder::class
+        );
+        $this->sortOrderBuilder = $objectManager->get(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/order_payment_list.php
+     */
+    public function testGetListWithMultipleFiltersAndSorting()
+    {
+        $filter1 = $this->filterBuilder
+            ->setField('cc_ss_start_year')
+            ->setValue('2014')
+            ->create();
+        $filter2 = $this->filterBuilder
+            ->setField('cc_exp_month')
+            ->setValue('09')
+            ->create();
+        $filter3 = $this->filterBuilder
+            ->setField('method')
+            ->setValue('checkmo')
+            ->create();
+        $sortOrder = $this->sortOrderBuilder
+            ->setField('cc_exp_month')
+            ->setDirection('DESC')
+            ->create();
+
+        $this->searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $this->searchCriteriaBuilder->addFilters([$filter3]);
+        $this->searchCriteriaBuilder->addSortOrder($sortOrder);
+        $searchCriteria = $this->searchCriteriaBuilder->create();
+        /** @var \Magento\Sales\Api\Data\OrderPaymentSearchResultInterface $result */
+        $result = $this->repository->getList($searchCriteria);
+        $items = $result->getItems();
+        $this->assertCount(2, $items);
+        $this->assertEquals('456', array_shift($items)->getCcLast4());
+        $this->assertEquals('123', array_shift($items)->getCcLast4());
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/address_list.php b/dev/tests/integration/testsuite/Magento/Sales/_files/address_list.php
new file mode 100644
index 0000000000000000000000000000000000000000..d48a97b8b3b74eda1eed9b67cf0510c250b6e463
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/address_list.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+$addresses = [
+    [
+        'telephone' => 3234676,
+        'postcode' => 47676,
+        'country_id' => 'US',
+        'city' => 'CityX',
+        'street' => ['Black str, 48'],
+        'lastname' => 'Smith',
+        'firstname' => 'John',
+        'address_type' => 'shipping',
+        'email' => 'some_email@mail.com',
+        'region_id' => 1,
+    ],
+    [
+        'telephone' => 3234676,
+        'postcode' => '47676',
+        'country_id' => 'US',
+        'city' => 'CityX',
+        'street' => ['Black str, 48'],
+        'lastname' => 'Smith',
+        'firstname' => 'John',
+        'address_type' => 'billing',
+        'email' => 'some_email@mail.com',
+        'region_id' => 1,
+    ],
+    [
+        'telephone' => 123123,
+        'postcode' => 'ZX0789',
+        'country_id' => 'US',
+        'city' => 'Ena4ka',
+        'street' => ['Black', 'White'],
+        'lastname' => 'Doe',
+        'firstname' => 'John',
+        'address_type' => 'billing',
+        'email' => 'some_email@mail.com',
+        'region_id' => 2,
+    ],
+    [
+        'telephone' => 123123,
+        'postcode' => 'ZX0789A',
+        'country_id' => 'US',
+        'city' => 'Ena4ka',
+        'street' => ['Black', 'White'],
+        'lastname' => 'Doe',
+        'firstname' => 'John',
+        'address_type' => 'shipping',
+        'email' => 'some_email@mail.com',
+        'region_id' => 1,
+    ]
+];
+
+/** @var array $addresses */
+foreach ($addresses as $addressData) {
+    /** @var $address \Magento\Sales\Model\Order\Address */
+    $address = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+        \Magento\Sales\Model\Order\Address::class
+    );
+    $address
+        ->setData($addressData)
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/address_list_rollback.php b/dev/tests/integration/testsuite/Magento/Sales/_files/address_list_rollback.php
new file mode 100644
index 0000000000000000000000000000000000000000..248f6469ad870606278f6a70f4939dd9db37bbde
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/address_list_rollback.php
@@ -0,0 +1,7 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+require 'default_rollback.php';
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_comments_for_search.php b/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_comments_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..1b94872792995e89b935e8956c1763cf3bcb3d80
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_comments_for_search.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\Order\Creditmemo;
+use Magento\Sales\Model\Order\Creditmemo\Comment;
+use Magento\Sales\Model\Order\CreditmemoFactory;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require 'default_rollback.php';
+require __DIR__ . '/order.php';
+
+/** @var Order $order */
+$order = Bootstrap::getObjectManager()->create(Order::class);
+$order->loadByIncrementId('100000001');
+
+/** @var CreditmemoFactory $creditmemoFactory */
+$creditmemoFactory = Bootstrap::getObjectManager()->get(CreditmemoFactory::class);
+
+/** @var Creditmemo $creditmemo */
+$creditmemo = $creditmemoFactory->createByOrder($order, $order->getData());
+$creditmemo->setOrder($order);
+$creditmemo->setState(Creditmemo::STATE_OPEN);
+$creditmemo->setIncrementId('100000001');
+$creditmemo->save();
+
+$comments = [
+    [
+        'comment' => 'comment 1',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 2',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 3',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 4',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 5',
+        'is_visible_on_front' => 0,
+        'is_customer_notified' => 1,
+    ],
+];
+
+foreach ($comments as $data) {
+    /** @var $comment Comment */
+    $comment = Bootstrap::getObjectManager()->create(Comment::class);
+    $comment->setParentId($creditmemo->getId());
+    $comment->setComment($data['comment']);
+    $comment->setIsVisibleOnFront($data['is_visible_on_front']);
+    $comment->setIsCustomerNotified($data['is_customer_notified']);
+    $comment->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_items_for_search.php b/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_items_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..2fd9b45f98602c95dd291ec161ac5422bd45d84f
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_items_for_search.php
@@ -0,0 +1,108 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\Order\Creditmemo;
+use Magento\Sales\Model\Order\Creditmemo\Item;
+use Magento\Sales\Model\Order\Creditmemo\ItemFactory;
+use Magento\Sales\Model\Order\CreditmemoFactory;
+use Magento\Sales\Model\Order\Item as OrderItem;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require 'default_rollback.php';
+require __DIR__ . '/order.php';
+
+$orderCollection = Bootstrap::getObjectManager()->create(Order::class)->getCollection();
+/** @var \Magento\Sales\Model\Order $order */
+$order = $orderCollection->getFirstItem();
+
+/** @var ItemFactory $creditmemoItemFactory */
+$creditmemoItemFactory = Bootstrap::getObjectManager()->create(ItemFactory::class);
+/** @var CreditmemoFactory $creditmemoFactory */
+$creditmemoFactory = Bootstrap::getObjectManager()->get(CreditmemoFactory::class);
+/** @var Creditmemo $creditmemo */
+$creditmemo = $creditmemoFactory->createByOrder($order, $order->getData());
+$creditmemo->setOrder($order);
+$creditmemo->setState(Creditmemo::STATE_OPEN);
+$creditmemo->save();
+
+$items = [
+    [
+        'name' => 'item 1',
+        'base_price' => 10,
+        'price' => 10,
+        'row_total' => 10,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 2',
+        'base_price' => 20,
+        'price' => 20,
+        'row_total' => 20,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 3',
+        'base_price' => 30,
+        'price' => 30,
+        'row_total' => 30,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 4',
+        'base_price' => 40,
+        'price' => 40,
+        'row_total' => 40,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 5',
+        'base_price' => 50,
+        'price' => 50,
+        'row_total' => 50,
+        'product_type' => 'simple',
+        'qty' => 2,
+        'qty_invoiced' => 20,
+        'qty_refunded' => 2,
+    ],
+];
+
+foreach ($items as $data) {
+    /** @var OrderItem $orderItem */
+    $orderItem = $objectManager->create(OrderItem::class);
+    $orderItem->setProductId($product->getId())->setQtyOrdered(10);
+    $orderItem->setBasePrice($data['base_price']);
+    $orderItem->setPrice($data['price']);
+    $orderItem->setRowTotal($data['row_total']);
+    $orderItem->setProductType($data['product_type']);
+    $orderItem->setQtyRefunded(1);
+    $orderItem->setQtyInvoiced(10);
+    $orderItem->setOriginalPrice(20);
+
+    $order->addItem($orderItem);
+    $order->save();
+
+    /** @var Item $creditmemoItem */
+    $creditmemoItem = $creditmemoItemFactory->create();
+    $creditmemoItem->setCreditmemo($creditmemo)
+        ->setName($data['name'])
+        ->setOrderItemId($orderItem->getItemId())
+        ->setQty($data['qty'])
+        ->setPrice($data['price'])
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_list.php b/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_list.php
new file mode 100644
index 0000000000000000000000000000000000000000..08b7ebbaa65c0d060766d95743dfd163bb20d201
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_list.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order;
+
+require 'order.php';
+/** @var Order $order */
+
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+$creditMemos = [
+    [
+        'store_id' => 1,
+        'grand_total' =>  280.00,
+        'order_id' => $order->getId(),
+        'email_sent' => 0,
+        'send_email' => 0,
+        'increment_id' => '123',
+        'creditmemo_status' => 1,
+        'state'     => 1
+    ],
+    [
+        'store_id' => 1,
+        'grand_total' =>  450.00,
+        'order_id' => $order->getId(),
+        'email_sent' => 1,
+        'send_email' => 1,
+        'increment_id' => '456',
+        'creditmemo_status' => 1,
+        'state'     => 1
+    ],
+    [
+        'store_id' => 1,
+        'grand_total' =>  10.00,
+        'order_id' => $order->getId(),
+        'email_sent' => 1,
+        'send_email' => 1,
+        'increment_id' => '789',
+        'creditmemo_status' => 0,
+        'state'     => 1
+    ],
+    [
+        'store_id' => 1,
+        'grand_total' =>  1110.00,
+        'order_id' => $order->getId(),
+        'email_sent' => 1,
+        'increment_id' => '012',
+        'send_email' => 1,
+        'creditmemo_status' => 1,
+        'state'     => 0
+    ],
+];
+
+/** @var array $creditMemoData */
+foreach ($creditMemos as $creditMemoData) {
+    /** @var \Magento\Sales\Model\Order\Creditmemo $creditMemo */
+    $creditMemo = $objectManager->create(\Magento\Sales\Model\Order\Creditmemo::class);
+    $creditMemo
+        ->setData($creditMemoData)
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_list_rollback.php b/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_list_rollback.php
new file mode 100644
index 0000000000000000000000000000000000000000..248f6469ad870606278f6a70f4939dd9db37bbde
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/creditmemo_list_rollback.php
@@ -0,0 +1,7 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+require 'default_rollback.php';
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_comments_for_search.php b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_comments_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..bc10027fb35f0eaaae93e0a7af916180daf5e6d0
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_comments_for_search.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Framework\DB\Transaction;
+use Magento\Sales\Api\InvoiceManagementInterface;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\Order\Invoice;
+use Magento\Sales\Model\Order\Invoice\Comment;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require 'default_rollback.php';
+require __DIR__ . '/order.php';
+
+/** @var InvoiceManagementInterface $orderService */
+$orderService = Bootstrap::getObjectManager()->create(InvoiceManagementInterface::class);
+/** @var Invoice $invoice */
+$invoice = $orderService->prepareInvoice($order);
+$invoice->register();
+/** @var Order $order */
+$order = $invoice->getOrder();
+$order->setIsInProcess(true);
+/** @var Transaction $transactionSave */
+$transactionSave = Bootstrap::getObjectManager()->create(Transaction::class);
+$transactionSave->addObject($invoice)->addObject($order)->save();
+
+$comments = [
+    [
+        'comment' => 'comment 1',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 2',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 3',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 4',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 5',
+        'is_visible_on_front' => 0,
+        'is_customer_notified' => 1,
+    ],
+];
+
+foreach ($comments as $data) {
+    /** @var $comment Comment */
+    $comment = Bootstrap::getObjectManager()->create(Comment::class);
+    $comment->setParentId($invoice->getId());
+    $comment->setComment($data['comment']);
+    $comment->setIsVisibleOnFront($data['is_visible_on_front']);
+    $comment->setIsCustomerNotified($data['is_customer_notified']);
+    $comment->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_items_for_search.php b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_items_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..737baec6cb6e1439ef5db18586362a09f108acea
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_items_for_search.php
@@ -0,0 +1,111 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Framework\DB\Transaction;
+use Magento\Sales\Api\InvoiceManagementInterface;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\Order\Invoice;
+use Magento\Sales\Model\Order\Invoice\Item;
+use Magento\Sales\Model\Order\Invoice\ItemFactory;
+use Magento\Sales\Model\Order\InvoiceFactory;
+use Magento\Sales\Model\Order\Item as OrderItem;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require 'default_rollback.php';
+require __DIR__ . '/order.php';
+
+/** @var InvoiceManagementInterface $orderService */
+$orderService = Bootstrap::getObjectManager()->create(InvoiceManagementInterface::class);
+/** @var Invoice $invoice */
+$invoice = $orderService->prepareInvoice($order);
+$invoice->register();
+/** @var Order $order */
+$order = $invoice->getOrder();
+$order->setIsInProcess(true);
+/** @var Transaction $transactionSave */
+$transactionSave = Bootstrap::getObjectManager()->create(Transaction::class);
+$transactionSave->addObject($invoice)->addObject($order)->save();
+
+/** @var ItemFactory $invoiceItemFactory */
+$invoiceItemFactory = Bootstrap::getObjectManager()->create(ItemFactory::class);
+
+$items = [
+    [
+        'name' => 'item 1',
+        'base_price' => 10,
+        'price' => 10,
+        'row_total' => 10,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 2',
+        'base_price' => 20,
+        'price' => 20,
+        'row_total' => 20,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 3',
+        'base_price' => 30,
+        'price' => 30,
+        'row_total' => 30,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 4',
+        'base_price' => 40,
+        'price' => 40,
+        'row_total' => 40,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 5',
+        'base_price' => 50,
+        'price' => 50,
+        'row_total' => 50,
+        'product_type' => 'simple',
+        'qty' => 2,
+        'qty_invoiced' => 20,
+        'qty_refunded' => 2,
+    ],
+];
+
+foreach ($items as $data) {
+    /** @var OrderItem $orderItem */
+    $orderItem = $objectManager->create(OrderItem::class);
+    $orderItem->setProductId($product->getId())->setQtyOrdered(10);
+    $orderItem->setBasePrice($data['base_price']);
+    $orderItem->setPrice($data['price']);
+    $orderItem->setRowTotal($data['row_total']);
+    $orderItem->setProductType($data['product_type']);
+    $orderItem->setQtyRefunded(1);
+    $orderItem->setQtyInvoiced(10);
+    $orderItem->setOriginalPrice(20);
+
+    $order->addItem($orderItem);
+    $order->save();
+
+    /** @var Item $invoiceItem */
+    $invoiceItem = $invoiceItemFactory->create();
+    $invoiceItem->setInvoice($invoice)
+        ->setName($data['name'])
+        ->setOrderItemId($orderItem->getItemId())
+        ->setQty($data['qty'])
+        ->setPrice($data['price'])
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_list.php b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_list.php
new file mode 100644
index 0000000000000000000000000000000000000000..41ed4fc2206eeac7670a9678746a0ea0d95f814b
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_list.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order;
+
+require 'order.php';
+/** @var Order $order */
+
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+$invoices = [
+    [
+        'store_id' => 1,
+        'grand_total' =>  280.00,
+        'order_id' => $order->getId(),
+        'email_sent' => 0,
+        'send_email' => 0,
+        'increment_id' => '123',
+        'can_void_flag' => 1,
+        'state'     => 1
+    ],
+    [
+        'store_id' => 1,
+        'grand_total' =>  450.00,
+        'order_id' => $order->getId(),
+        'email_sent' => 1,
+        'send_email' => 1,
+        'increment_id' => '456',
+        'can_void_flag' => 1,
+        'state'     => 1
+    ],
+    [
+        'store_id' => 0,
+        'grand_total' =>  10.00,
+        'order_id' => $order->getId(),
+        'email_sent' => 1,
+        'send_email' => 1,
+        'increment_id' => '789',
+        'can_void_flag' => 0,
+        'state'     => 1
+    ],
+    [
+        'store_id' => 1,
+        'grand_total' =>  1110.00,
+        'order_id' => $order->getId(),
+        'email_sent' => 1,
+        'increment_id' => '012',
+        'send_email' => 1,
+        'can_void_flag' => 1,
+        'state'     => 0
+    ],
+];
+
+/** @var array $creditMemoData */
+foreach ($invoices as $invoiceData) {
+    /** @var \Magento\Sales\Model\Order\Creditmemo $creditMemo */
+    $invoice = $objectManager->create(\Magento\Sales\Model\Order\Invoice::class);
+    $invoice
+        ->setData($invoiceData)
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_list_rollback.php b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_list_rollback.php
new file mode 100644
index 0000000000000000000000000000000000000000..248f6469ad870606278f6a70f4939dd9db37bbde
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_list_rollback.php
@@ -0,0 +1,7 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+require 'default_rollback.php';
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_item_list.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_item_list.php
new file mode 100644
index 0000000000000000000000000000000000000000..06fe62997ebba4cc975c82e2f73db096c99b0968
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_item_list.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+require 'order.php';
+/** @var \Magento\Catalog\Model\Product $product */
+/** @var \Magento\Sales\Model\Order $order */
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+
+$orderItems = [
+    [
+        'product_id' => 1,
+        'order_id' => $order->getId(),
+        'base_price' => 90,
+        'price' => 90,
+        'row_total' => 92,
+        'product_type' => 'configurable'
+    ],
+    [
+        'product_id' => 1,
+        'base_price' => 100,
+        'order_id' => $order->getId(),
+        'price' => 100,
+        'row_total' => 102,
+        'product_type' => 'configurable'
+    ],
+    [
+        'product_id' => 12,
+        'base_price' => 110,
+        'order_id' => $order->getId(),
+        'price' => 110,
+        'row_total' => 112,
+        'product_type' => 'virtual'
+    ],
+    [
+        'product_id' => 13,
+        'base_price' => 123,
+        'order_id' => $order->getId(),
+        'price' => 123,
+        'row_total' => 126,
+        'product_type' => 'simple'
+    ]
+];
+
+
+/** @var array $orderItemData */
+foreach ($orderItems as $orderItemData) {
+    /** @var $orderItem \Magento\Sales\Model\Order\Item */
+    $orderItem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+        \Magento\Sales\Model\Order\Item::class
+    );
+    $orderItem
+        ->setData($orderItemData)
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_list.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_list.php
new file mode 100644
index 0000000000000000000000000000000000000000..58ebcae4935ae878bb806d7da5a6e0f3e2d9c23f
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_list.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order;
+
+require 'order.php';
+/** @var Order $order */
+/** @var  Order\Payment $payment */
+/** @var  Order\Item $orderItem */
+/** @var  Order\Address $billingAddress */
+/** @var  Order\Address $shippingAddress */
+$orders = [
+    [
+        'increment_id' => '100000002',
+        'state' => \Magento\Sales\Model\Order::STATE_NEW,
+        'status' => 'processing',
+        'grand_total' => 120.00,
+        'subtotal' => 120.00,
+        'base_grand_total' => 120.00,
+        'store_id' => 1,
+        'website_id' => 1,
+        'payment' => $payment
+    ],
+    [
+        'increment_id' => '100000003',
+        'state' => \Magento\Sales\Model\Order::STATE_PROCESSING,
+        'status' => 'processing',
+        'grand_total' => 140.00,
+        'base_grand_total' => 140.00,
+        'subtotal' => 140.00,
+        'store_id' => 0,
+        'website_id' => 0,
+        'payment' => $payment
+    ],
+    [
+        'increment_id' => '100000004',
+        'state' => \Magento\Sales\Model\Order::STATE_PROCESSING,
+        'status' => 'closed',
+        'grand_total' => 140.00,
+        'base_grand_total' => 140.00,
+        'subtotal' => 140.00,
+        'store_id' => 1,
+        'website_id' => 1,
+        'payment' => $payment
+    ],
+];
+
+/** @var array $orderData */
+foreach ($orders as $orderData) {
+    /** @var $order \Magento\Sales\Model\Order */
+    $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+        \Magento\Sales\Model\Order::class
+    );
+    $order
+        ->setData($orderData)
+        ->addItem($orderItem)
+        ->setBillingAddress($billingAddress)
+        ->setBillingAddress($shippingAddress)
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_list_rollback.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_list_rollback.php
new file mode 100644
index 0000000000000000000000000000000000000000..bec218557ce9dfb0673f2a1e92ca42a2b4761a75
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_list_rollback.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order;
+
+require 'default_rollback.php';
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_payment_list.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_payment_list.php
new file mode 100644
index 0000000000000000000000000000000000000000..96312eb6577d64f50092affd9a4fa5272ef4fa87
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_payment_list.php
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order;
+
+require 'order.php';
+/** @var Order $order */
+
+$payments = [
+    [
+        'parent_id' => $order->getId(),
+        'cc_exp_month' => '06',
+        'cc_ss_start_year' => '2014',
+        'method' => 'checkmo',
+        'cc_last_4' => '123'
+    ],
+    [
+        'parent_id' => $order->getId(),
+        'cc_exp_month' => '07',
+        'cc_ss_start_year' => '2014',
+        'method' => 'checkmo',
+        'cc_last_4' => '456'
+    ],
+    [
+        'parent_id' => $order->getId(),
+        'cc_exp_month' => '08',
+        'cc_ss_start_year' => '2015',
+        'method' => 'checkmo'
+    ],
+    [
+        'parent_id' => $order->getId(),
+        'cc_exp_month' => '09',
+        'cc_ss_start_year' => '2016',
+        'method' => 'paypal_express'
+    ],
+];
+
+/** @var array $payments */
+foreach ($payments as $paymentData) {
+    /** @var $address \Magento\Sales\Model\Order\Payment */
+    $payment = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+        \Magento\Sales\Model\Order\Payment::class
+    );
+    $payment
+        ->setData($paymentData)
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_status_history_for_search.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_status_history_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..32d63edda1666ede462b1f354761867b22fbe754
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_status_history_for_search.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order\Status\History;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require 'default_rollback.php';
+require __DIR__ . '/order.php';
+
+$comments = [
+    [
+        'comment' => 'comment 1',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 2',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 3',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 4',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 5',
+        'is_visible_on_front' => 0,
+        'is_customer_notified' => 1,
+    ],
+];
+
+foreach ($comments as $data) {
+    /** @var $comment History */
+    $comment = Bootstrap::getObjectManager()->create(History::class);
+    $comment->setParentId($order->getId());
+    $comment->setComment($data['comment']);
+    $comment->setIsVisibleOnFront($data['is_visible_on_front']);
+    $comment->setIsCustomerNotified($data['is_customer_notified']);
+    $comment->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_comments_for_search.php b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_comments_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..a588d7b5accd765fc2e1c0fbc33a55d578087f82
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_comments_for_search.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Payment\Helper\Data;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\Order\Shipment;
+use Magento\Sales\Model\Order\Shipment\Comment;
+use Magento\Sales\Model\Order\Shipment\Item;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require 'default_rollback.php';
+require __DIR__ . '/order.php';
+
+/** @var Order $order */
+$payment = $order->getPayment();
+$paymentInfoBlock = Bootstrap::getObjectManager()->get(Data::class)
+    ->getInfoBlock($payment);
+$payment->setBlockMock($paymentInfoBlock);
+
+/** @var Shipment $shipment */
+$shipment = Bootstrap::getObjectManager()->create(Shipment::class);
+$shipment->setOrder($order);
+
+/** @var Item $shipmentItem */
+$shipmentItem = Bootstrap::getObjectManager()->create(Item::class);
+$shipmentItem->setOrderItem($orderItem);
+$shipment->addItem($shipmentItem);
+$shipment->setPackages([['1'], ['2']]);
+$shipment->setShipmentStatus(\Magento\Sales\Model\Order\Shipment::STATUS_NEW);
+$shipment->save();
+
+$comments = [
+    [
+        'comment' => 'comment 1',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 2',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 3',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 4',
+        'is_visible_on_front' => 1,
+        'is_customer_notified' => 1,
+    ],
+    [
+        'comment' => 'comment 5',
+        'is_visible_on_front' => 0,
+        'is_customer_notified' => 1,
+    ],
+];
+
+foreach ($comments as $data) {
+    /** @var $comment Comment */
+    $comment = Bootstrap::getObjectManager()->create(Comment::class);
+    $comment->setParentId($shipment->getId());
+    $comment->setComment($data['comment']);
+    $comment->setIsVisibleOnFront($data['is_visible_on_front']);
+    $comment->setIsCustomerNotified($data['is_customer_notified']);
+    $comment->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_items_for_search.php b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_items_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..a61db84eeb68668633c92d8c76c52f932046e12a
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_items_for_search.php
@@ -0,0 +1,116 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Payment\Helper\Data;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\Order\Shipment;
+use Magento\Sales\Model\Order\Shipment\Item;
+use Magento\Sales\Model\Order\Shipment\ItemFactory;
+use Magento\Sales\Model\Order\Item as OrderItem;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require 'default_rollback.php';
+require __DIR__ . '/order.php';
+
+/** @var Order $order */
+$payment = $order->getPayment();
+$paymentInfoBlock = Bootstrap::getObjectManager()->get(Data::class)
+    ->getInfoBlock($payment);
+$payment->setBlockMock($paymentInfoBlock);
+
+/** @var Shipment $shipment */
+$shipment = Bootstrap::getObjectManager()->create(Shipment::class);
+$shipment->setOrder($order);
+
+/** @var Item $shipmentItem */
+$shipmentItem = Bootstrap::getObjectManager()->create(Item::class);
+$shipmentItem->setOrderItem($orderItem);
+$shipment->addItem($shipmentItem);
+$shipment->setPackages([['1'], ['2']]);
+$shipment->setShipmentStatus(\Magento\Sales\Model\Order\Shipment::STATUS_NEW);
+$shipment->save();
+
+/** @var ItemFactory $shipmentItemFactory */
+$shipmentItemFactory = Bootstrap::getObjectManager()->create(ItemFactory::class);
+
+$items = [
+    [
+        'name' => 'item 1',
+        'base_price' => 10,
+        'price' => 10,
+        'row_total' => 10,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 2',
+        'base_price' => 20,
+        'price' => 20,
+        'row_total' => 20,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 3',
+        'base_price' => 30,
+        'price' => 30,
+        'row_total' => 30,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 4',
+        'base_price' => 40,
+        'price' => 40,
+        'row_total' => 40,
+        'product_type' => 'simple',
+        'qty' => 10,
+        'qty_invoiced' => 10,
+        'qty_refunded' => 1,
+    ],
+    [
+        'name' => 'item 5',
+        'base_price' => 50,
+        'price' => 50,
+        'row_total' => 50,
+        'product_type' => 'simple',
+        'qty' => 2,
+        'qty_invoiced' => 20,
+        'qty_refunded' => 2,
+    ],
+];
+
+foreach ($items as $data) {
+    /** @var OrderItem $orderItem */
+    $orderItem = $objectManager->create(OrderItem::class);
+    $orderItem->setProductId($product->getId())->setQtyOrdered(10);
+    $orderItem->setBasePrice($data['base_price']);
+    $orderItem->setPrice($data['price']);
+    $orderItem->setRowTotal($data['row_total']);
+    $orderItem->setProductType($data['product_type']);
+    $orderItem->setQtyOrdered(100);
+    $orderItem->setQtyInvoiced(10);
+    $orderItem->setOriginalPrice(20);
+
+    $order->addItem($orderItem);
+    $order->save();
+
+    /** @var Item $shipmentItem */
+    $shipmentItem = $shipmentItemFactory->create();
+    $shipmentItem->setShipment($shipment)
+        ->setName($data['name'])
+        ->setOrderItem($orderItem)
+        ->setOrderItemId($orderItem->getItemId())
+        ->setQty($data['qty'])
+        ->setPrice($data['price'])
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_list.php b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_list.php
new file mode 100644
index 0000000000000000000000000000000000000000..fe84851c5442632cdea2674ad29872280873686c
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_list.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order;
+
+require 'order.php';
+
+/** @var Order $order */
+/** @var  Order\Payment $payment */
+/** @var  Order\Item $orderItem */
+
+$shipments = [
+    [
+        'increment_id' => '100000001',
+        'order_id' => $order->getId(),
+        'shipping_address_id' => 1,
+        'shipment_status' => \Magento\Sales\Model\Order\Shipment::STATUS_NEW,
+        'store_id' => 1,
+    ],
+    [
+        'increment_id' => '100000002',
+        'order_id' => $order->getId(),
+        'shipping_address_id' => 3,
+        'shipment_status' => \Magento\Sales\Model\Order\Shipment::STATUS_NEW,
+        'store_id' => 1,
+    ],
+    [
+        'increment_id' => '100000003',
+        'order_id' => $order->getId(),
+        'shipping_address_id' => 3,
+        'status' => \Magento\Sales\Model\Order\Shipment::STATUS_NEW,
+        'store_id' => 1,
+    ],
+    [
+        'increment_id' => '100000004',
+        'order_id' => $order->getId(),
+        'shipping_address_id' => 4,
+        'shipment_status' => 'closed',
+        'store_id' => 1,
+    ],
+];
+
+/** @var array $shipmentData */
+foreach ($shipments as $shipmentData) {
+    /** @var $shipment \Magento\Sales\Model\Order\Shipment */
+    $shipment = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+        \Magento\Sales\Model\Order\Shipment::class
+    );
+    /** @var \Magento\Sales\Model\Order\Shipment\Item $shipmentItem */
+    $shipmentItem = $objectManager->create(\Magento\Sales\Model\Order\Shipment\Item::class);
+    $shipmentItem->setParentId($order->getId());
+    $shipmentItem->setOrderItem($orderItem);
+    $shipment
+        ->setData($shipmentData)
+        ->addItem($shipmentItem)
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_list_rollback.php b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_list_rollback.php
new file mode 100644
index 0000000000000000000000000000000000000000..248f6469ad870606278f6a70f4939dd9db37bbde
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_list_rollback.php
@@ -0,0 +1,7 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+require 'default_rollback.php';
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_tracks_for_search.php b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_tracks_for_search.php
new file mode 100644
index 0000000000000000000000000000000000000000..200b1009daa3f790e60caf692f33aa96e6f6ae8b
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/shipment_tracks_for_search.php
@@ -0,0 +1,90 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Payment\Helper\Data;
+use Magento\Sales\Model\Order;
+use Magento\Sales\Model\Order\Shipment;
+use Magento\Sales\Model\Order\Shipment\Track;
+use Magento\Sales\Model\Order\Shipment\Item;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require 'default_rollback.php';
+require __DIR__ . '/order.php';
+
+/** @var Order $order */
+$payment = $order->getPayment();
+$paymentInfoBlock = Bootstrap::getObjectManager()->get(Data::class)
+    ->getInfoBlock($payment);
+$payment->setBlockMock($paymentInfoBlock);
+
+/** @var Shipment $shipment */
+$shipment = Bootstrap::getObjectManager()->create(Shipment::class);
+$shipment->setOrder($order);
+
+/** @var Item $shipmentItem */
+$shipmentItem = Bootstrap::getObjectManager()->create(Item::class);
+$shipmentItem->setOrderItem($orderItem);
+$shipment->addItem($shipmentItem);
+$shipment->setPackages([['1'], ['2']]);
+$shipment->setShipmentStatus(\Magento\Sales\Model\Order\Shipment::STATUS_NEW);
+$shipment->save();
+
+$tracks = [
+    [
+        'title' => 'title 1',
+        'carrier_code' => 'carrier code 1',
+        'track_number' => 'track number 1',
+        'description' => 'description 1',
+        'qty' => 1,
+        'weight' => 1,
+    ],
+    [
+        'title' => 'title 2',
+        'carrier_code' => 'carrier code 2',
+        'track_number' => 'track number 2',
+        'description' => 'description 2',
+        'qty' => 2,
+        'weight' => 1,
+    ],
+    [
+        'title' => 'title 3',
+        'carrier_code' => 'carrier code 3',
+        'track_number' => 'track number 3',
+        'description' => 'description 3',
+        'qty' => 3,
+        'weight' => 1,
+    ],
+    [
+        'title' => 'title 4',
+        'carrier_code' => 'carrier code 4',
+        'track_number' => 'track number 4',
+        'description' => 'description 4',
+        'qty' => 4,
+        'weight' => 1,
+    ],
+    [
+        'title' => 'title 5',
+        'carrier_code' => 'carrier code 5',
+        'track_number' => 'track number 5',
+        'description' => 'description 5',
+        'qty' => 5,
+        'weight' => 2,
+    ],
+];
+
+foreach ($tracks as $data) {
+    /** @var $track Track */
+    $track = Bootstrap::getObjectManager()->create(Track::class);
+    $track->setOrderId($order->getId());
+    $track->setParentId($shipment->getId());
+    $track->setTitle($data['title']);
+    $track->setCarrierCode($data['carrier_code']);
+    $track->setTrackNumber($data['track_number']);
+    $track->setDescription($data['description']);
+    $track->setQty($data['qty']);
+    $track->setWeight($data['weight']);
+    $track->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/transactions_list.php b/dev/tests/integration/testsuite/Magento/Sales/_files/transactions_list.php
new file mode 100644
index 0000000000000000000000000000000000000000..2c505d27dfcb4cef329dd765488def62e6949873
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/transactions_list.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Sales\Model\Order;
+
+require 'transactions_list_rollback.php';
+require 'transactions_detailed.php';
+
+/** @var Order $order */
+/** @var  Order\Payment $payment */
+
+$transactions = [
+    [
+        'transaction_id' => 'trx_auth1',
+        'is_transaction_closed' => 1,
+        'order_id' => $order->getId(),
+        'payment_id' => $payment->getId(),
+        'parent_transaction_id' => 'trx_auth1',
+        'txn_id' => 'aaabbbccc',
+    ],
+    [
+        'transaction_id' => 'trx_auth2',
+        'is_transaction_closed' => 1,
+        'parent_transaction_id' => 'trx_auth1',
+        'order_id' => $order->getId(),
+        'payment_id' => $payment->getId(),
+        'txn_id' => '123456',
+    ],
+    [
+        'transaction_id' => 'trx_auth3',
+        'is_transaction_closed' => 1,
+        'parent_transaction_id' => 'trx_auth1',
+        'order_id' => $order->getId(),
+        'payment_id' => $payment->getId(),
+        'txn_id' => 'wooooh',
+    ],
+    [
+        'transaction_id' => 'trx_auth4',
+        'is_transaction_closed' => 1,
+        'parent_transaction_id' => 'trx_auth2',
+        'order_id' => $order->getId(),
+        'payment_id' => $payment->getId(),
+        'txn_id' => '--09--',
+    ]
+];
+
+/** @var array $transactionData */
+foreach ($transactions as $transactionData) {
+    $payment->addData($transactionData);
+    $payment->addTransaction(\Magento\Sales\Model\Order\Payment\Transaction::TYPE_CAPTURE);
+}
+
+$order->save();
diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/transactions_list_rollback.php b/dev/tests/integration/testsuite/Magento/Sales/_files/transactions_list_rollback.php
new file mode 100644
index 0000000000000000000000000000000000000000..248f6469ad870606278f6a70f4939dd9db37bbde
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Sales/_files/transactions_list_rollback.php
@@ -0,0 +1,7 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+require 'default_rollback.php';
diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons.php
index 51724d6dc12db7fba7ab8f5835f882ce2e954811..4ff08627ea9275b30e0f46d25d5a31661ed61e0d 100644
--- a/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons.php
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons.php
@@ -19,7 +19,7 @@ $coupon->setRuleId($items[1]->getId())->setCode('autogenerated_2_1')->setType(1)
 $coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);
 $coupon->setRuleId($items[1]->getId())->setCode('autogenerated_2_2')->setType(1)->save();
 
-// type SPECIFIC with generated coupons
+// type SPECIFIC with generated coupons 
 $coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);
 $coupon->setRuleId($items[2]->getId())->setCode('autogenerated_3_1')->setType(1)->save();
 $coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);
diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php
new file mode 100644
index 0000000000000000000000000000000000000000..73b56b382b8c9b1ca524ea2cf09be6b3d2905778
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/coupons_advanced.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+require 'rules_advanced.php';
+
+$this->_collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+    \Magento\SalesRule\Model\ResourceModel\Rule\Collection::class
+);
+$items = array_values($this->_collection->getItems());
+
+// type SPECIFIC with code
+$coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);
+$coupon->setRuleId($items[0]->getId())->setCode('coupon_code')->setType(0)->save();
+
+// type NO_COUPON with non actual previously generated coupon codes
+$coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);
+$coupon->setRuleId($items[1]->getId())->setCode('autogenerated_2_1')->setType(1)->setIsPrimary(1)->save();
+$coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);
+$coupon->setRuleId($items[1]->getId())->setCode('autogenerated_2_2')->setType(1)->save();
+
+// type SPECIFIC with generated coupons 
+$coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);
+$coupon->setRuleId($items[2]->getId())->setCode('autogenerated_3_1')->setType(1)->save();
+$coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);
+$coupon->setRuleId($items[2]->getId())->setCode('autogenerated_3_2')->setType(1)->setIsPrimary(1)->save();
+
+// type AUTO
+$coupon = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Coupon::class);
+$coupon->setRuleId($items[3]->getId())->setCode('coupon_code_auto')->setType(0)->save();
diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/rules_advanced.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/rules_advanced.php
new file mode 100644
index 0000000000000000000000000000000000000000..a13cba853ce5e05d05078e61b74278c4e0b47e81
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/rules_advanced.php
@@ -0,0 +1,118 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+require 'rules_rollback.php';
+
+/** @var \Magento\SalesRule\Model\Rule $rule */
+$rule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Rule::class);
+$rule->setName(
+    '#1'
+)->setIsActive(
+    1
+)->setStopRulesProcessing(
+    0
+)->setIsAdvanced(
+    1
+)->setCouponType(
+    Magento\SalesRule\Model\Rule::COUPON_TYPE_SPECIFIC
+)->setUseAutoGeneration(
+    0
+)->setWebsiteIds(
+    '1'
+)
+->setUsesPerCoupon(2)
+->setIsRss(1)
+->setCustomerGroupIds(
+    '0'
+)->setDiscountStep(0)
+    ->save();
+
+/** @var \Magento\SalesRule\Model\Rule $rule */
+$rule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Rule::class);
+$rule->setName(
+    '#2'
+)->setIsActive(
+    1
+)->setStopRulesProcessing(
+    0
+)->setIsAdvanced(
+    1
+)->setCouponType(
+    Magento\SalesRule\Model\Rule::COUPON_TYPE_NO_COUPON
+)
+->setIsRss(1)
+->setUsesPerCoupon(2)
+->setUseAutoGeneration(
+    0
+)->setWebsiteIds(
+    '1'
+)->setCustomerGroupIds(
+    '0'
+)->setDiscountStep(0)
+    ->save();
+
+/** @var \Magento\SalesRule\Model\Rule $rule */
+$rule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Rule::class);
+$rule->setName(
+    '#3'
+)->setIsActive(
+    1
+)->setStopRulesProcessing(
+    0
+)->setIsAdvanced(
+    1
+)
+->setCouponType(
+    Magento\SalesRule\Model\Rule::COUPON_TYPE_SPECIFIC
+)->setUseAutoGeneration(
+    1
+)->setWebsiteIds(
+    '1'
+)->setCustomerGroupIds(
+    '0'
+)->setDiscountStep(0)
+    ->save();
+
+/** @var \Magento\SalesRule\Model\Rule $rule */
+$rule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Rule::class);
+$rule->setName(
+    '#4'
+)->setIsActive(
+    1
+)->setStopRulesProcessing(
+    0
+)->setIsAdvanced(
+    1
+)->setCouponType(
+    Magento\SalesRule\Model\Rule::COUPON_TYPE_AUTO
+)->setUseAutoGeneration(
+    0
+)->setWebsiteIds(
+    '1'
+)->setCustomerGroupIds(
+    '0'
+)->setDiscountStep(0)
+    ->save();
+
+/** @var \Magento\SalesRule\Model\Rule $rule */
+$rule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\SalesRule\Model\Rule::class);
+$rule->setName(
+    '#5'
+)->setIsActive(
+    1
+)->setStopRulesProcessing(
+    0
+)->setIsAdvanced(
+    1
+)->setCouponType(
+    Magento\SalesRule\Model\Rule::COUPON_TYPE_NO_COUPON
+)->setUseAutoGeneration(
+    0
+)->setWebsiteIds(
+    '1'
+)->setCustomerGroupIds(
+    '0'
+)->setDiscountStep(0)
+    ->save();
diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/rules_rollback.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/rules_rollback.php
new file mode 100644
index 0000000000000000000000000000000000000000..7d6d06978e8e2f8062c7e7f06d8a5e9fd4fcbf34
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/rules_rollback.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\SalesRule\Model\Rule;
+
+$collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+    ->get(\Magento\SalesRule\Model\ResourceModel\Rule\Collection::class);
+
+/** @var Rule $rule */
+foreach ($collection as $rule) {
+    $rule->delete();
+}
diff --git a/dev/tests/integration/testsuite/Magento/Ui/Api/BookmarkRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Ui/Api/BookmarkRepositoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..576cb3eaffe33e5459141828bb93bd10f99a3304
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Ui/Api/BookmarkRepositoryTest.php
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Ui\Api;
+
+use Magento\Ui\Model\ResourceModel\BookmarkRepository;
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrderBuilder;
+
+/**
+ * Class CarrierTest
+ * @package Magento\Ups\Model
+ * @magentoDbIsolation enabled
+ */
+class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var  BookmarkRepository */
+    private $repository;
+
+    /** @var  SortOrderBuilder */
+    private $sortOrderBuilder;
+
+    /** @var FilterBuilder */
+    private $filterBuilder;
+
+    /** @var SearchCriteriaBuilder */
+    private $searchCriteriaBuilder;
+
+    protected function setUp()
+    {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->repository = $objectManager->create(BookmarkRepository::class);
+        $this->searchCriteriaBuilder = $objectManager->create(
+            \Magento\Framework\Api\SearchCriteriaBuilder::class
+        );
+        $this->filterBuilder = $objectManager->get(
+            \Magento\Framework\Api\FilterBuilder::class
+        );
+        $this->sortOrderBuilder = $objectManager->get(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
+    }
+
+    /**
+     * @magentoDataFixture Magento/Ui/_files/bookmarks.php
+     */
+    public function testGetListWithMultipleFiltersAndSorting()
+    {
+        $filter1 = $this->filterBuilder
+            ->setField('namespace')
+            ->setValue('bm_namespace')
+            ->create();
+        $filter2 = $this->filterBuilder
+            ->setField('namespace')
+            ->setValue('new_namespace')
+            ->create();
+        $filter3 = $this->filterBuilder
+            ->setField('current')
+            ->setValue(1)
+            ->create();
+        $sortOrder = $this->sortOrderBuilder
+            ->setField('title')
+            ->setDirection('DESC')
+            ->create();
+
+        $this->searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $this->searchCriteriaBuilder->addFilters([$filter3]);
+        $this->searchCriteriaBuilder->addSortOrder($sortOrder);
+        $searchCriteria = $this->searchCriteriaBuilder->create();
+        /** @var \Magento\Ui\Api\Data\BookmarkSearchResultsInterface $result */
+        $result = $this->repository->getList($searchCriteria);
+        $this->assertCount(2, $result->getItems());
+        $this->assertEquals('Default View', $result->getItems()[0]->getTitle());
+        $this->assertEquals('Bb', $result->getItems()[1]->getTitle());
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Ui/_files/bookmarks.php b/dev/tests/integration/testsuite/Magento/Ui/_files/bookmarks.php
new file mode 100644
index 0000000000000000000000000000000000000000..046c833e1d6d548b271d4541501d2d59b0731673
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Ui/_files/bookmarks.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+use Magento\Ui\Api\Data\BookmarkInterface;
+use Magento\Ui\Model\Bookmark;
+
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+$bookmarks = [
+    [
+        'user_id' => 1,
+        'namespace' => 'bm_namespace',
+        'identifier' => 'first',
+        'current' => 1,
+        'config' => '{}',
+        'title' => 'Bb'
+    ],
+    [
+        'user_id' => 1,
+        'namespace' => 'bm_namespace',
+        'identifier' => 'second',
+        'current' => 0,
+        'config' => '{1}',
+        'title' => 'Aa'
+    ],
+    [
+        'user_id' => 1,
+        'namespace' => 'new_namespace',
+        'identifier' => 'third',
+        'current' => 1,
+        'config' => '{}',
+        'title' => 'Default View'
+    ],
+];
+
+foreach ($bookmarks as $bookmarkData) {
+    /** @var Bookmark $bookmark */
+    $bookmark = $objectManager->create(BookmarkInterface::class);
+    $bookmark
+        ->setData($bookmarkData)
+        ->save();
+}
diff --git a/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/SelectorTest.php b/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/SelectorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..15e949123a2a12541bc8ec1bfb56d47582bf4551
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/SelectorTest.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\UrlRewrite\Block;
+
+/**
+ * Test for \Magento\UrlRewrite\Block\Selector
+ * @magentoAppArea adminhtml
+ */
+class SelectorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @magentoAppIsolation enabled
+     */
+    public function testGetModeUrl()
+    {
+        /** @var $layout \Magento\Framework\View\LayoutInterface */
+        $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            \Magento\Framework\View\LayoutInterface::class
+        );
+
+        /** @var $block \Magento\UrlRewrite\Block\Selector */
+        $block = $layout->createBlock(\Magento\UrlRewrite\Block\Selector::class);
+
+        $modeUrl = $block->getModeUrl('mode');
+        $this->assertEquals(1, preg_match('/admin\/index\/index\/key\/[0-9a-zA-Z]+\/mode/', $modeUrl));
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Vault/Model/PaymentTokenRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Vault/Model/PaymentTokenRepositoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..cfb126fd9ee4ab53a1104681c929626911e3a249
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Vault/Model/PaymentTokenRepositoryTest.php
@@ -0,0 +1,80 @@
+<?php
+/***
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Vault\Model;
+
+use Magento\Framework\Api\FilterBuilder;
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Api\SortOrderBuilder;
+
+/**
+ * Class PaymentTokenRepositoryTest
+ * @package Magento\Vault\Model
+ * @magentoDbIsolation enabled
+ */
+class PaymentTokenRepositoryTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var  PaymentTokenRepository */
+    private $repository;
+
+    /** @var  SortOrderBuilder */
+    private $sortOrderBuilder;
+
+    /** @var FilterBuilder */
+    private $filterBuilder;
+
+    /** @var SearchCriteriaBuilder */
+    private $searchCriteriaBuilder;
+
+    public function setUp()
+    {
+        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->repository = $objectManager->create(PaymentTokenRepository::class);
+        $this->searchCriteriaBuilder = $objectManager->create(
+            \Magento\Framework\Api\SearchCriteriaBuilder::class
+        );
+        $this->filterBuilder = $objectManager->get(
+            \Magento\Framework\Api\FilterBuilder::class
+        );
+        $this->sortOrderBuilder = $objectManager->get(
+            \Magento\Framework\Api\SortOrderBuilder::class
+        );
+    }
+
+    /**
+     * @magentoDataFixture Magento/Vault/_files/payment_tokens.php
+     */
+    public function testGetListWithMultipleFiltersAndSorting()
+    {
+        $filter1 = $this->filterBuilder
+            ->setField('type')
+            ->setValue('simple')
+            ->create();
+        $filter2 = $this->filterBuilder
+            ->setField('is_active')
+            ->setValue(1)
+            ->create();
+        $filter3 = $this->filterBuilder
+            ->setField('expires_at')
+            ->setConditionType('lt')
+            ->setValue('2016-11-04 10:18:15')
+            ->create();
+        $sortOrder = $this->sortOrderBuilder
+            ->setField('public_hash')
+            ->setDirection('DESC')
+            ->create();
+
+        $this->searchCriteriaBuilder->addFilters([$filter1, $filter2]);
+        $this->searchCriteriaBuilder->addFilters([$filter3]);
+        $this->searchCriteriaBuilder->addSortOrder($sortOrder);
+        $searchCriteria = $this->searchCriteriaBuilder->create();
+        /** @var \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterface $result */
+        $result = $this->repository->getList($searchCriteria);
+        $items = $result->getItems();
+        $this->assertCount(2, $items);
+        $this->assertEquals('second', array_shift($items)->getPaymentMethodCode());
+        $this->assertEquals('first', array_shift($items)->getPaymentMethodCode());
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Vault/Model/ResourceModel/PaymentTokenTest.php b/dev/tests/integration/testsuite/Magento/Vault/Model/ResourceModel/PaymentTokenTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..88974f0d9cc5e4d09ad6cd173edf9ff5052711bb
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Vault/Model/ResourceModel/PaymentTokenTest.php
@@ -0,0 +1,114 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Vault\Model\ResourceModel;
+
+use Magento\Braintree\Model\Ui\PayPal\ConfigProvider as PayPalConfigProvider;
+use Magento\Framework\App\ResourceConnection;
+use Magento\Framework\DB\Adapter\AdapterInterface;
+use Magento\Framework\ObjectManagerInterface;
+use Magento\Sales\Model\Order;
+use Magento\TestFramework\Helper\Bootstrap;
+use Magento\Vault\Model\PaymentTokenManagement;
+use Magento\Vault\Setup\InstallSchema;
+
+class PaymentTokenTest extends \PHPUnit_Framework_TestCase
+{
+    const CUSTOMER_ID = 1;
+    const TOKEN = 'mx29vk';
+    const ORDER_INCREMENT_ID = '100000001';
+
+    /**
+     * @var ObjectManagerInterface
+     */
+    private $objectManager;
+
+    /**
+     * @var PaymentToken
+     */
+    private $paymentToken;
+
+    /**
+     * @var ResourceConnection
+     */
+    private $resource;
+
+    /**
+     * @var AdapterInterface
+     */
+    private $connection;
+
+    /**
+     * @var PaymentTokenManagement
+     */
+    private $paymentTokenManagement;
+
+    /**
+     * @var Order
+     */
+    private $order;
+
+    protected function setUp()
+    {
+        $this->objectManager = Bootstrap::getObjectManager();
+        $this->order = $this->objectManager->create(Order::class);
+        $this->paymentToken = $this->objectManager->create(PaymentToken::class);
+        $this->paymentTokenManagement = $this->objectManager->get(PaymentTokenManagement::class);
+
+        $this->resource = $this->objectManager->get(ResourceConnection::class);
+        $this->connection = $this->resource->getConnection();
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/order.php
+     * @magentoDataFixture Magento/Braintree/_files/paypal_vault_token.php
+     */
+    public function testAddLinkToOrderPaymentExists()
+    {
+        $this->order->loadByIncrementId(self::ORDER_INCREMENT_ID);
+        $paymentToken = $this->paymentTokenManagement
+            ->getByGatewayToken(self::TOKEN, PayPalConfigProvider::PAYPAL_CODE, self::CUSTOMER_ID);
+
+        $this->connection->insert(
+            $this->resource->getTableName(InstallSchema::ORDER_PAYMENT_TO_PAYMENT_TOKEN_TABLE),
+            [
+                'order_payment_id' => $this->order->getPayment()->getEntityId(),
+                'payment_token_id' => $paymentToken->getEntityId()
+            ]
+        );
+
+        static::assertTrue(
+            $this->paymentToken->addLinkToOrderPayment(
+                $paymentToken->getEntityId(),
+                $this->order->getPayment()->getEntityId()
+            )
+        );
+    }
+
+    /**
+     * @magentoDataFixture Magento/Sales/_files/order.php
+     * @magentoDataFixture Magento/Braintree/_files/paypal_vault_token.php
+     */
+    public function testAddLinkToOrderPaymentCreate()
+    {
+        $this->order->loadByIncrementId(self::ORDER_INCREMENT_ID);
+        $paymentToken = $this->paymentTokenManagement
+            ->getByGatewayToken(self::TOKEN, PayPalConfigProvider::PAYPAL_CODE, self::CUSTOMER_ID);
+
+        $select = $this->connection->select()
+            ->from($this->resource->getTableName(InstallSchema::ORDER_PAYMENT_TO_PAYMENT_TOKEN_TABLE))
+            ->where('order_payment_id = ?', (int) $this->order->getPayment()->getEntityId())
+            ->where('payment_token_id =?', (int) $paymentToken->getEntityId());
+
+        static::assertEmpty($this->connection->fetchRow($select));
+        static::assertTrue(
+            $this->paymentToken->addLinkToOrderPayment(
+                $paymentToken->getEntityId(),
+                $this->order->getPayment()->getEntityId()
+            )
+        );
+        static::assertNotEmpty($this->connection->fetchRow($select));
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Vault/_files/customer.php b/dev/tests/integration/testsuite/Magento/Vault/_files/customer.php
new file mode 100644
index 0000000000000000000000000000000000000000..4a799bb4575e84d206c545de213b80fbdb9ec89b
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Vault/_files/customer.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+use Magento\Customer\Model\CustomerRegistry;
+
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+/** @var $repository \Magento\Customer\Api\CustomerRepositoryInterface */
+$repository = $objectManager->create(\Magento\Customer\Api\CustomerRepositoryInterface::class);
+$customer = $objectManager->create(\Magento\Customer\Model\Customer::class);
+/** @var CustomerRegistry $customerRegistry */
+$customerRegistry = $objectManager->get(CustomerRegistry::class);
+/** @var Magento\Customer\Model\Customer $customer */
+$customer->setWebsiteId(1)
+    ->setId(1)
+    ->setEmail('customer@example.com')
+    ->setPassword('password')
+    ->setGroupId(1)
+    ->setStoreId(1)
+    ->setIsActive(1)
+    ->setPrefix('Mr.')
+    ->setFirstname('John')
+    ->setMiddlename('A')
+    ->setLastname('Smith')
+    ->setSuffix('Esq.')
+    ->setDefaultBilling(1)
+    ->setDefaultShipping(1)
+    ->setTaxvat('12')
+    ->setGender(0);
+
+$customer->isObjectNew(true);
+$customer->save();
+$customerRegistry->remove($customer->getId());
diff --git a/dev/tests/integration/testsuite/Magento/Vault/_files/payment_tokens.php b/dev/tests/integration/testsuite/Magento/Vault/_files/payment_tokens.php
new file mode 100644
index 0000000000000000000000000000000000000000..e021dc7d4372c7342b7fdf0324cd09c1883ccbf7
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Vault/_files/payment_tokens.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+include "customer.php";
+
+use Magento\Customer\Model\Customer;
+use Magento\Vault\Model\PaymentToken;
+
+$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+$paymentTokens = [
+    [
+        'customer_id' => 1,
+        'public_hash' => '1234',
+        'payment_method_code' => 'first',
+        'type' => 'simple',
+        'expires_at' => '2016-09-04 10:18:15',
+        'is_active' => 1
+    ],
+    [
+        'customer_id' => 1,
+        'public_hash' => '12345',
+        'payment_method_code' => 'second',
+        'type' => 'simple',
+        'expires_at' => '2016-10-04 10:18:15',
+        'is_active' => 1
+    ],
+    [
+        'customer_id' => 1,
+        'public_hash' => '23456',
+        'payment_method_code' => 'third',
+        'type' => 'notsimple',
+        'expires_at' => '2016-11-04 10:18:15',
+        'is_active' => 1
+    ],
+    [
+        'customer_id' => 1,
+        'public_hash' => '234567',
+        'payment_method_code' => 'fourth',
+        'type' => 'simple',
+        'expires_at' => '2016-12-04 10:18:15',
+        'is_active' => 0
+    ],
+];
+/** @var array $tokenData */
+foreach ($paymentTokens as $tokenData) {
+    /** @var PaymentToken $bookmark */
+    $paymentToken = $objectManager->create(PaymentToken::class);
+    $paymentToken
+        ->setData($tokenData)
+        ->save();
+}
diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/XssOutputValidator.php b/dev/tests/static/framework/Magento/TestFramework/Utility/XssOutputValidator.php
index 908489008b4ca04604e136ffef609b4b85abafc2..1e0d684c1242df370293b16bfdcb225a35f71e94 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Utility/XssOutputValidator.php
+++ b/dev/tests/static/framework/Magento/TestFramework/Utility/XssOutputValidator.php
@@ -17,16 +17,25 @@ class XssOutputValidator
 
     /**
      * Store origin for replacements
+     *
      * @var array
      */
     private $origins = [];
 
     /**
      * Store replacements
+     *
      * @var array
      */
     private $replacements = [];
 
+    /**
+     * Array of escape functions
+     *
+     * @var string[]
+     */
+    private $escapeFunctions = ['escapeHtml', 'escapeHtmlAttr', 'escapeUrl', 'escapeJs', 'escapeCss'];
+
     /**
      *
      * @param string $file
@@ -122,8 +131,13 @@ class XssOutputValidator
         foreach ($echoCommands as $echoCommand) {
             if ($this->isNotEscapeMarkedCommand($echoCommand)) {
                 $echoCommand = preg_replace('/^(.*?)echo/sim', 'echo', $echoCommand);
+                $preparedEchoCommand = $this->prepareEchoCommand($echoCommand);
+                $isEscapeFunctionArgument = preg_match(
+                    '/->(' . implode('|', $this->escapeFunctions) . ')\(.*?\)$/sim',
+                    $preparedEchoCommand
+                );
                 $xssUnsafeCommands = array_filter(
-                    explode('.', $this->prepareEchoCommand($echoCommand)),
+                    $isEscapeFunctionArgument ? [$preparedEchoCommand] : explode('.', $preparedEchoCommand),
                     [$this, 'isXssUnsafeCommand']
                 );
                 if (count($xssUnsafeCommands)) {
@@ -202,7 +216,7 @@ class XssOutputValidator
         switch (true)
         {
             case preg_match(
-                '/->(escapeHtmlAttr|escapeUrl|escapeJs|escapeCss|.*html.*)\(/simU',
+                '/->(' . implode('|', $this->escapeFunctions) . '|.*html.*)\(/simU',
                 $this->getLastMethod($command)
             ):
                 return false;
diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Utility/_files/xss_safe.phtml b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Utility/_files/xss_safe.phtml
index d81636496797d6ca93ed855f30415bb7cc56ed17..ae9b09dd9c631e1b3b7c656b66371e670107763d 100644
--- a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Utility/_files/xss_safe.phtml
+++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Utility/_files/xss_safe.phtml
@@ -44,3 +44,5 @@ echo $var;
 /* foreach ($block->getColumns() as $_column): ?>
     <col <?php echo $_column->getProperty() ?> />
 <?php endforeach; */ ?>
+
+<?php echo $block->escapeHtmlAttr($block->getParamValue('title_' . $store['value'])); ?>
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ModuleDBChangeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ModuleDBChangeTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..4029454ee523052fedcc9592b778fea9704b7abf
--- /dev/null
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ModuleDBChangeTest.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+/**
+ * Scan source code for DB schema or data updates for patch releases in non-actual branches
+ * Backwards compatibility test
+ */
+namespace Magento\Test\Legacy;
+
+class ModuleDBChangeTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var string
+     */
+    protected static $changedFilesPattern = __DIR__ . '/../_files/changed_files*';
+
+    /**
+     * @var string
+     */
+    protected static $changedFileList = '';
+
+    /**
+     *  Set changed files paths and list for all projects
+     */
+    public static function setUpBeforeClass()
+    {
+        foreach (glob(self::$changedFilesPattern) as $changedFile) {
+            self::$changedFileList .= file_get_contents($changedFile) . PHP_EOL;
+        }
+    }
+
+    /**
+     * Test changes for module.xml files
+     */
+    public function testModuleXmlFiles()
+    {
+        preg_match_all('|etc/module\.xml$|mi', self::$changedFileList, $matches);
+        $this->assertEmpty(
+            reset($matches),
+            'module.xml changes for patch releases in non-actual branches are not allowed:' . PHP_EOL .
+            implode(PHP_EOL, array_values(reset($matches)))
+        );
+    }
+
+    /**
+     * Test changes for files in Module Setup dir
+     */
+    public function testModuleSetupFiles()
+    {
+        preg_match_all('|app/code/Magento/[^/]+/Setup/[^/]+$|mi', self::$changedFileList, $matches);
+        $this->assertEmpty(
+            reset($matches),
+            'Code with changes for DB schema or data in non-actual branches are not allowed:' . PHP_EOL .
+            implode(PHP_EOL, array_values(reset($matches)))
+        );
+    }
+}
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/XssPhtmlTemplateTest.php b/dev/tests/static/testsuite/Magento/Test/Php/XssPhtmlTemplateTest.php
index 33db1aeee6c92305a8575c8263e76695e270234c..4c7eebecaac2a35619e230777651d937bb0a2c0b 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/XssPhtmlTemplateTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Php/XssPhtmlTemplateTest.php
@@ -8,6 +8,7 @@ namespace Magento\Test\Php;
 
 use Magento\Framework\App\Utility\Files;
 use Magento\TestFramework\Utility\XssOutputValidator;
+use Magento\Framework\Component\ComponentRegistrar;
 
 /**
  * Find not escaped output in phtml templates
@@ -50,4 +51,41 @@ class XssPhtmlTemplateTest extends \PHPUnit_Framework_TestCase
             Files::init()->getPhtmlFiles()
         );
     }
+
+    /**
+     * @return void
+     */
+    public function testAbsenceOfEscapeNotVerifiedAnnotationInRefinedModules()
+    {
+        $componentRegistrar = new ComponentRegistrar();
+        $exemptModules = [];
+        foreach (array_diff(scandir(__DIR__ . '/_files/whitelist/exempt_modules'), ['..', '.']) as $file) {
+            $exemptModules = array_merge(
+                $exemptModules,
+                include(__DIR__ . '/_files/whitelist/exempt_modules/' . $file)
+            );
+        }
+
+        $result = "";
+        foreach ($componentRegistrar->getPaths(ComponentRegistrar::MODULE) as $moduleName => $modulePath) {
+            if (in_array($moduleName, $exemptModules)) {
+                continue;
+            }
+            foreach (Files::init()->getFiles([$modulePath], '*.phtml') as $file) {
+                $fileContents = file_get_contents($file);
+                $pattern = "/\\/* @escapeNotVerified \\*\\/ echo (?!__).+/";
+                $instances = preg_grep($pattern, explode("\n", $fileContents));
+                if (!empty($instances)) {
+                    foreach (array_keys($instances) as $line) {
+                        $result .= $file . ':' . ($line + 1) . "\n";
+                    }
+                }
+            }
+        }
+        $this->assertEmpty(
+            $result,
+            "@escapeNotVerified annotation detected.\n" .
+            "Please use the correct escape strategy and remove annotation at:\n" . $result
+        );
+    }
 }
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/exempt_modules/ce.php b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/exempt_modules/ce.php
new file mode 100644
index 0000000000000000000000000000000000000000..077bc4138d199ff78c760f8e8a305facfa7595f9
--- /dev/null
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/exempt_modules/ce.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+/* These are the modules that have not been refactored from @escapeNotVerified yet. */
+return [
+    'Magento_AdminNotification',
+    'Magento_Backend',
+    'Magento_Backup',
+    'Magento_Bundle',
+    'Magento_Catalog',
+    'Magento_CatalogInventory',
+    'Magento_CatalogRule',
+    'Magento_CatalogSearch',
+    'Magento_CatalogWidget',
+    'Magento_Checkout',
+    'Magento_CheckoutAgreements',
+    'Magento_Cms',
+    'Magento_Config',
+    'Magento_ConfigurableProduct',
+    'Magento_CurrencySymbol',
+    'Magento_Directory',
+    'Magento_Downloadable',
+    'Magento_Email',
+    'Magento_GiftMessage',
+    'Magento_GoogleAdwords',
+    'Magento_GoogleAnalytics',
+    'Magento_GroupedProduct',
+    'Magento_ImportExport',
+    'Magento_Integration',
+    'Magento_LayeredNavigation',
+    'Magento_Marketplace',
+    'Magento_MediaStorage',
+    'Magento_Msrp',
+    'Magento_Multishipping',
+    'Magento_PageCache',
+    'Magento_Paypal',
+    'Magento_ProductVideo',
+    'Magento_Reports',
+    'Magento_Sales',
+    'Magento_Search',
+    'Magento_Security',
+    'Magento_Shipping',
+    'Magento_Store',
+    'Magento_Swagger',
+    'Magento_Swatches',
+    'Magento_Tax',
+    'Magento_TaxImportExport',
+    'Magento_Theme',
+    'Magento_Translation',
+    'Magento_Ui',
+    'Magento_UrlRewrite',
+    'Magento_User',
+    'Magento_Weee',
+    'Magento_Widget',
+];
diff --git a/dev/tools/grunt/configs/clean.js b/dev/tools/grunt/configs/clean.js
index 792981a632ce638624a4142327298cb27e48fed8..53bcd8a1d830ebda056e59c6ba592106abcdde72 100644
--- a/dev/tools/grunt/configs/clean.js
+++ b/dev/tools/grunt/configs/clean.js
@@ -5,7 +5,7 @@
 
 'use strict';
 
-var themes = require('./themes'),
+var themes = require('../tools/files-router').get('themes'),
     _      = require('underscore');
 
 var themeOptions = {};
diff --git a/dev/tools/grunt/configs/combo.js b/dev/tools/grunt/configs/combo.js
index 930b2fd68715c7efbfe12906c5e291a35ae49e99..6dcbe7e36a667699bb830387aaea27e7932525f3 100644
--- a/dev/tools/grunt/configs/combo.js
+++ b/dev/tools/grunt/configs/combo.js
@@ -5,7 +5,7 @@
 
 'use strict';
 
-var theme = require('./themes'),
+var theme = require('../tools/files-router').get('themes'),
     path = require('./path');
 
 /**
diff --git a/dev/tools/grunt/configs/exec.js b/dev/tools/grunt/configs/exec.js
index a26a0d95a54c63814d0a3d4f73001354e3d09d8a..3e675ff9b5d81328e94b6e906495c67d43a90597 100644
--- a/dev/tools/grunt/configs/exec.js
+++ b/dev/tools/grunt/configs/exec.js
@@ -6,7 +6,7 @@
 'use strict';
 
 var combo = require('./combo'),
-    themes = require('./themes'),
+    themes = require('../tools/files-router').get('themes'),
     _      = require('underscore');
 
 var themeOptions = {};
diff --git a/dev/tools/grunt/configs/less.js b/dev/tools/grunt/configs/less.js
index 4071b47fa2b7ca347287564d412eb1702b3a5041..7a849577127408fbddeeef91c0d97fa452377fc8 100644
--- a/dev/tools/grunt/configs/less.js
+++ b/dev/tools/grunt/configs/less.js
@@ -6,7 +6,7 @@
 'use strict';
 
 var combo  = require('./combo'),
-    themes = require('./themes'),
+    themes = require('../tools/files-router').get('themes'),
     _      = require('underscore');
 
 var themeOptions = {};
diff --git a/dev/tools/grunt/configs/watch.js b/dev/tools/grunt/configs/watch.js
index 014b6b065a96fe3bdfa2d51136f24080fd144884..84657ae7c4d8073ea9a0e8db3b58285c9b1f26cc 100644
--- a/dev/tools/grunt/configs/watch.js
+++ b/dev/tools/grunt/configs/watch.js
@@ -6,7 +6,7 @@
 'use strict';
 
 var combo  = require('./combo'),
-    themes = require('./themes'),
+    themes = require('../tools/files-router').get('themes'),
     _      = require('underscore');
 
 var themeOptions = {};
diff --git a/dev/tools/grunt/tools/files-router.js b/dev/tools/grunt/tools/files-router.js
new file mode 100644
index 0000000000000000000000000000000000000000..2bf6f9d8cc2e902dcd5cd9283b158ff2775d85d9
--- /dev/null
+++ b/dev/tools/grunt/tools/files-router.js
@@ -0,0 +1,83 @@
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+'use strict';
+
+var defaultConfig = {},
+
+    /**
+     * Generates full path to file.
+     *
+     * @param {String} path - relative path to file.
+     *
+     * @returns {String} Full path to file
+     */
+    getFullPath = function (path) {
+        return process.cwd() + '/' + path;
+    },
+
+    /**
+     * Returns file.
+     *
+     * @param {String} path - relative path to file.
+     *
+     * @returns {Object|Null} File or NULL
+     */
+    getFile = function (path) {
+        try {
+            return require(getFullPath(path));
+        } catch (error) {
+            return null;
+        }
+    },
+
+    /**
+     * Immediately invoked function.
+     * Loads user config file.
+     */
+    userConfig = (function () {
+        try {
+            return require(process.cwd() + '/grunt-config');
+        } catch (error) {
+            return null;
+        }
+    })();
+
+module.exports = {
+
+    /**
+     * Loads file.
+     * Load priority:
+     *      From user config;
+     *      From default config with ".loc" suffix ;
+     *      From default config;
+     *
+     * @param {String} alias
+     *
+     * @returns {Object} themes file or error
+     */
+    get: function (alias) {
+        var tmp;
+
+        if (userConfig && userConfig[alias]) {
+            return require(getFullPath(userConfig[alias]));
+        } else if (tmp = getFile(defaultConfig[alias] + '.loc') ||  getFile(defaultConfig[alias])) {
+            return tmp;
+        } else {
+            throw new Error('Cannot find file. Alias "' + alias + '" not set. ' +
+                'Use "filesRouter.set" method to set it.').stack;
+        }
+    },
+
+    /**
+     * Sets file alias.
+     *
+     * @param {String} alias
+     * @param {String} path
+     */
+    set: function (alias, path) {
+        defaultConfig[alias] = path;
+    }
+};
diff --git a/grunt-config.json.sample b/grunt-config.json.sample
new file mode 100644
index 0000000000000000000000000000000000000000..7ef28a856f92529f71daac39e511a26d853184e2
--- /dev/null
+++ b/grunt-config.json.sample
@@ -0,0 +1,3 @@
+{
+    "themes": "dev/tools/grunt/configs/local-themes"
+}
diff --git a/lib/internal/Magento/Framework/Api/Search/SearchCriteriaBuilder.php b/lib/internal/Magento/Framework/Api/Search/SearchCriteriaBuilder.php
index 6f4611d71facb2c9b622eb27cf2f1394f55f31ce..5f595802a98258318b4e7dfc36bd1287fcf2dafc 100644
--- a/lib/internal/Magento/Framework/Api/Search/SearchCriteriaBuilder.php
+++ b/lib/internal/Magento/Framework/Api/Search/SearchCriteriaBuilder.php
@@ -25,6 +25,11 @@ class SearchCriteriaBuilder extends AbstractSimpleObjectBuilder
      */
     protected $filterGroupBuilder;
 
+    /**
+     * @var array
+     */
+    private $filters = [];
+
     /**
      * @param ObjectFactory $objectFactory
      * @param FilterGroupBuilder $filterGroupBuilder
@@ -47,7 +52,11 @@ class SearchCriteriaBuilder extends AbstractSimpleObjectBuilder
      */
     public function create()
     {
-        $this->data[SearchCriteria::FILTER_GROUPS] = [$this->filterGroupBuilder->create()];
+        foreach ($this->filters as $filter) {
+            $this->data[SearchCriteria::FILTER_GROUPS][] = $this->filterGroupBuilder->setFilters([])
+                ->addFilter($filter)
+                ->create();
+        }
         $this->data[SearchCriteria::SORT_ORDERS] = [$this->sortOrderBuilder->create()];
         return parent::create();
     }
@@ -60,7 +69,7 @@ class SearchCriteriaBuilder extends AbstractSimpleObjectBuilder
      */
     public function addFilter(\Magento\Framework\Api\Filter $filter)
     {
-        $this->filterGroupBuilder->addFilter($filter);
+        $this->filters[] = $filter;
         return $this;
     }
 
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor.php
new file mode 100644
index 0000000000000000000000000000000000000000..e4769769a971a2294076358b56cd12ab6b6e4448
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\SearchCriteria;
+
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class CollectionProcessor implements CollectionProcessorInterface
+{
+    /**
+     * @var CollectionProcessorInterface[]
+     */
+    private $processors;
+
+    /**
+     * @param CollectionProcessorInterface[] $processors
+     */
+    public function __construct(
+        array $processors
+    ) {
+        $this->processors = $processors;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function process(SearchCriteriaInterface $searchCriteria, AbstractDb $collection)
+    {
+        foreach ($this->processors as $name => $processor) {
+            if (!($processor instanceof CollectionProcessorInterface)) {
+                throw new \InvalidArgumentException(
+                    sprintf('Processor %s must implement %s interface.', $name, CollectionProcessorInterface::class)
+                );
+            }
+            $processor->process($searchCriteria, $collection);
+        }
+    }
+}
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php
new file mode 100644
index 0000000000000000000000000000000000000000..6b2f5705278a05b9f1b36f1c4e9c30a1b526da8d
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor.php
@@ -0,0 +1,119 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\SearchCriteria\CollectionProcessor;
+
+use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class FilterProcessor implements CollectionProcessorInterface
+{
+    /**
+     * @var CustomFilterInterface[]
+     */
+    private $customFilters;
+
+    /**
+     * @var array
+     */
+    private $fieldMapping;
+
+    /**
+     * @param CustomFilterInterface[] $customFilters
+     * @param array $fieldMapping
+     */
+    public function __construct(
+        array $customFilters = [],
+        array $fieldMapping = []
+    ) {
+        $this->customFilters = $customFilters;
+        $this->fieldMapping = $fieldMapping;
+    }
+
+    /**
+     * Apply Search Criteria Filters to collection
+     *
+     * @param SearchCriteriaInterface $searchCriteria
+     * @param AbstractDb $collection
+     * @return void
+     */
+    public function process(SearchCriteriaInterface $searchCriteria, AbstractDb $collection)
+    {
+        foreach ($searchCriteria->getFilterGroups() as $group) {
+            $this->addFilterGroupToCollection($group, $collection);
+        }
+    }
+
+    /**
+     * Add FilterGroup to the collection
+     *
+     * @param FilterGroup $filterGroup
+     * @param AbstractDb $collection
+     * @return void
+     */
+    private function addFilterGroupToCollection(
+        FilterGroup $filterGroup,
+        AbstractDb $collection
+    ) {
+        $fields = [];
+        $conditions = [];
+        foreach ($filterGroup->getFilters() as $filter) {
+            $isApplied = false;
+            $customFilter = $this->getCustomFilterForField($filter->getField());
+            if ($customFilter) {
+                $isApplied = $customFilter->apply($filter, $collection);
+            }
+
+            if (!$isApplied) {
+                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
+                $fields[] = $this->getFieldMapping($filter->getField());
+                $conditions[] = [$condition => $filter->getValue()];
+            }
+        }
+        
+        if ($fields) {
+            $collection->addFieldToFilter($fields, $conditions);
+        }
+    }
+
+    /**
+     * Return custom filters for field if exists
+     *
+     * @param string $field
+     * @return CustomFilterInterface|null
+     * @throws \InvalidArgumentException
+     */
+    private function getCustomFilterForField($field)
+    {
+        $filter = null;
+        if (isset($this->customFilters[$field])) {
+            $filter = $this->customFilters[$field];
+            if (!($this->customFilters[$field] instanceof CustomFilterInterface)) {
+                throw new \InvalidArgumentException(
+                    sprintf(
+                        'Filter for %s must implement %s interface.',
+                        $field,
+                        CustomFilterInterface::class
+                    )
+                );
+            }
+        }
+        return $filter;
+    }
+
+    /**
+     * Return mapped field name
+     *
+     * @param string $field
+     * @return string
+     */
+    private function getFieldMapping($field)
+    {
+        return isset($this->fieldMapping[$field]) ? $this->fieldMapping[$field] : $field;
+    }
+}
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor/CustomFilterInterface.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor/CustomFilterInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..63755d061a9ce9dbeb74b043a4f50caf3cbd4d7a
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor/CustomFilterInterface.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+/**
+ * @api
+ */
+interface CustomFilterInterface
+{
+    /**
+     * Apply Custom Filter to Collection
+     *
+     * @param Filter $filter
+     * @param AbstractDb $collection
+     * @return bool Whether the filter was applied
+     */
+    public function apply(Filter $filter, AbstractDb $collection);
+}
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor.php
new file mode 100644
index 0000000000000000000000000000000000000000..7cf9020f1727830c60a9618b2597111d9b398834
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor.php
@@ -0,0 +1,125 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\SearchCriteria\CollectionProcessor;
+
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor\CustomJoinInterface;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class JoinProcessor implements CollectionProcessorInterface
+{
+    /**
+     * @var CustomJoinInterface[]
+     */
+    private $joins;
+
+    /**
+     * @var array
+     */
+    private $fieldMapping;
+
+    /** @var array  */
+    private $appliedFields = [];
+
+    /**
+     * @param CustomJoinInterface[] $customFilters
+     * @param array $fieldMapping
+     */
+    public function __construct(
+        array $customJoins = [],
+        array $fieldMapping = []
+    ) {
+        $this->joins = $customJoins;
+        $this->fieldMapping = $fieldMapping;
+    }
+
+    /**
+     * Apply Search Criteria Filters to collection only if we need this
+     *
+     * @param SearchCriteriaInterface $searchCriteria
+     * @param AbstractDb $collection
+     * @return void
+     */
+    public function process(SearchCriteriaInterface $searchCriteria, AbstractDb $collection)
+    {
+        if ($searchCriteria->getFilterGroups()) {
+            //Process filters
+            foreach ($searchCriteria->getFilterGroups() as $group) {
+                foreach ($group->getFilters() as $filter) {
+                    if (!isset($this->appliedFields[$filter->getField()])) {
+                        $this->applyCustomJoin($filter->getField(), $collection);
+                        $this->appliedFields[$filter->getField()] = true;
+                    }
+                }
+            }
+        }
+
+        if ($searchCriteria->getSortOrders()) {
+            // Process Sortings
+            foreach ($searchCriteria->getSortOrders() as $order) {
+                if (!isset($this->appliedFields[$order->getField()])) {
+                    $this->applyCustomJoin($order->getField(), $collection);
+                    $this->appliedFields[$order->getField()] = true;
+                }
+            }
+        }
+    }
+
+    /**
+     * Apply join to collection
+     *
+     * @param string $field
+     * @param AbstractDb $collection
+     * @return void
+     */
+    private function applyCustomJoin($field, AbstractDb $collection)
+    {
+        $field = $this->getFieldMapping($field);
+        $customJoin = $this->getCustomJoin($field);
+
+        if ($customJoin) {
+            $customJoin->apply($collection);
+        }
+    }
+
+    /**
+     * Return custom filters for field if exists
+     *
+     * @param string $field
+     * @return CustomJoinInterface|null
+     * @throws \InvalidArgumentException
+     */
+    private function getCustomJoin($field)
+    {
+        $filter = null;
+        if (isset($this->joins[$field])) {
+            $filter = $this->joins[$field];
+            if (!($this->joins[$field] instanceof CustomJoinInterface)) {
+                throw new \InvalidArgumentException(
+                    sprintf(
+                        'Custom join for %s must implement %s interface.',
+                        $field,
+                        CustomJoinInterface::class
+                    )
+                );
+            }
+        }
+        return $filter;
+    }
+
+    /**
+     * Return mapped field name
+     *
+     * @param string $field
+     * @return string
+     */
+    private function getFieldMapping($field)
+    {
+        return isset($this->fieldMapping[$field]) ? $this->fieldMapping[$field] : $field;
+    }
+}
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor/CustomJoinInterface.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor/CustomJoinInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..97692c4805e82b795374269e89ef53bbea1a98ab
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor/CustomJoinInterface.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor;
+
+use Magento\Framework\Data\Collection\AbstractDb;
+
+/**
+ * @api
+ */
+interface CustomJoinInterface
+{
+    /**
+     * Make custom joins to collection
+     *
+     * @param AbstractDb $collection
+     * @return bool
+     */
+    public function apply(AbstractDb $collection);
+}
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/PaginationProcessor.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/PaginationProcessor.php
new file mode 100644
index 0000000000000000000000000000000000000000..781bbc7b92f74d7e368486d299b696a30ae5dd0d
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/PaginationProcessor.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\SearchCriteria\CollectionProcessor;
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class PaginationProcessor implements CollectionProcessorInterface
+{
+    /**
+     * Apply Search Criteria Pagination to collection
+     *
+     * @param SearchCriteriaInterface $searchCriteria
+     * @param AbstractDb $collection
+     * @return void
+     */
+    public function process(SearchCriteriaInterface $searchCriteria, AbstractDb $collection)
+    {
+        $collection->setCurPage($searchCriteria->getCurrentPage());
+        $collection->setPageSize($searchCriteria->getPageSize());
+    }
+}
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/SortingProcessor.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/SortingProcessor.php
new file mode 100644
index 0000000000000000000000000000000000000000..9e27ce9612a8d2f9fcfa33853f7cacf97f2ca454
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/SortingProcessor.php
@@ -0,0 +1,100 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\SearchCriteria\CollectionProcessor;
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Data\Collection;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class SortingProcessor implements CollectionProcessorInterface
+{
+    /**
+     * @var array
+     */
+    private $fieldMapping;
+
+    /**
+     * @var array
+     */
+    private $defaultOrders;
+
+    /**
+     * @param array $fieldMapping
+     * @param array $defaultOrders
+     */
+    public function __construct(
+        array $fieldMapping = [],
+        array $defaultOrders = []
+    ) {
+        $this->fieldMapping = $fieldMapping;
+        $this->defaultOrders = $defaultOrders;
+    }
+
+    /**
+     * Apply Search Criteria Sorting Orders to collection
+     *
+     * @param SearchCriteriaInterface $searchCriteria
+     * @param AbstractDb $collection
+     * @return void
+     */
+    public function process(SearchCriteriaInterface $searchCriteria, AbstractDb $collection)
+    {
+        if ($searchCriteria->getSortOrders()) {
+            $this->applyOrders($searchCriteria->getSortOrders(), $collection);
+        } elseif ($this->defaultOrders) {
+            $this->applyDefaultOrders($collection);
+        }
+    }
+
+    /**
+     * Return mapped field name
+     *
+     * @param string $field
+     * @return string
+     */
+    private function getFieldMapping($field)
+    {
+        return isset($this->fieldMapping[$field]) ? $this->fieldMapping[$field] : $field;
+    }
+
+    /**
+     * Apply sort orders to collection
+     *
+     * @param SortOrder[] $sortOrders
+     * @param AbstractDb $collection
+     * @return void
+     */
+    private function applyOrders(array $sortOrders, AbstractDb $collection)
+    {
+        /** @var SortOrder $sortOrder */
+        foreach ($sortOrders as $sortOrder) {
+            $field = $this->getFieldMapping($sortOrder->getField());
+            $order = $sortOrder->getDirection() == SortOrder::SORT_ASC
+                ? Collection::SORT_ORDER_ASC
+                : Collection::SORT_ORDER_DESC;
+            $collection->addOrder($field, $order);
+        }
+    }
+
+    /**
+     * Apply default orders to collection
+     *
+     * @param AbstractDb $collection
+     * @return void
+     */
+    private function applyDefaultOrders(AbstractDb $collection)
+    {
+        foreach ($this->defaultOrders as $field => $direction) {
+            $field = $this->getFieldMapping($field);
+            $order = $direction == SortOrder::SORT_ASC
+                ? Collection::SORT_ORDER_ASC
+                : Collection::SORT_ORDER_DESC;
+            $collection->addOrder($field, $order);
+        }
+    }
+}
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessorInterface.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessorInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..dd8ec1d0a29a850c81870f94cf49488896e6de84
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessorInterface.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\SearchCriteria;
+
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+/**
+ * @api
+ */
+interface CollectionProcessorInterface
+{
+    /**
+     * Apply Search Criteria to Collection
+     *
+     * @param SearchCriteriaInterface $searchCriteria
+     * @param AbstractDb $collection
+     * @throws \InvalidArgumentException
+     * @return void
+     */
+    public function process(SearchCriteriaInterface $searchCriteria, AbstractDb $collection);
+}
diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/FilterProcessorTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/FilterProcessorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d15e34774b303bd131e28761586ab5853f16f44a
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/FilterProcessorTest.php
@@ -0,0 +1,204 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\Test\Unit\SearchCriteria\CollectionProcessor;
+
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class FilterProcessorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Return model
+     *
+     * @param CustomFilterInterface[] $customFilters
+     * @param array $fieldMapping
+     * @return FilterProcessor
+     */
+    private function getModel(array $customFilters, array $fieldMapping)
+    {
+        return new FilterProcessor($customFilters, $fieldMapping);
+    }
+
+    /**
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
+     */
+    public function testProcess()
+    {
+        /** @var CustomFilterInterface|\PHPUnit_Framework_MockObject_MockObject $customFilterMock */
+        $customFilterMock = $this->getMockBuilder(CustomFilterInterface::class)
+            ->getMock();
+
+        $customFilterField = 'customFilterField';
+        $customFilters = [$customFilterField => $customFilterMock];
+
+        $otherFilterField = 'otherFilterField';
+        $otherFilterFieldMapped = 'otherFilterFieldMapped';
+        $fieldMapping = [$otherFilterField => $otherFilterFieldMapped];
+        $otherFilterFieldValue = 'otherFilterFieldValue';
+        $otherFilterFieldCondition = 'gt';
+
+        $thirdField = 'thirdField';
+        $thirdFieldValue = 'thirdFieldValue';
+        $thirdFieldCondition = '';
+
+        $resultFieldsOne = [
+            $otherFilterFieldMapped,
+        ];
+        $resultConditionsOne = [
+            [
+                $otherFilterFieldCondition => $otherFilterFieldValue,
+            ],
+        ];
+        $resultFieldsTwo = [
+            $thirdField,
+        ];
+        $resultConditionsTwo = [
+            [
+                'eq' => $thirdFieldValue,
+            ],
+        ];
+
+        $model = $this->getModel($customFilters, $fieldMapping);
+
+        /** @var FilterGroup|\PHPUnit_Framework_MockObject_MockObject $filterGroupOneMock */
+        $filterGroupOneMock = $this->getMockBuilder(FilterGroup::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        /** @var FilterGroup|\PHPUnit_Framework_MockObject_MockObject $filterGroupTwoMock */
+        $filterGroupTwoMock = $this->getMockBuilder(FilterGroup::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterOneMock */
+        $filterOneMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterOneMock->expects($this->once())
+            ->method('getField')
+            ->willReturn($customFilterField);
+
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterTwoMock */
+        $filterTwoMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterTwoMock->expects($this->exactly(2))
+            ->method('getField')
+            ->willReturn($otherFilterField);
+        $filterTwoMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($otherFilterFieldValue);
+        $filterTwoMock->expects($this->exactly(2))
+            ->method('getConditionType')
+            ->willReturn($otherFilterFieldCondition);
+
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterThreeMock */
+        $filterThreeMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterThreeMock->expects($this->exactly(2))
+            ->method('getField')
+            ->willReturn($thirdField);
+        $filterThreeMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn($thirdFieldValue);
+        $filterThreeMock->expects($this->once())
+            ->method('getConditionType')
+            ->willReturn($thirdFieldCondition);
+
+        $filterGroupOneMock->expects($this->once())
+            ->method('getFilters')
+            ->willReturn([$filterOneMock, $filterTwoMock]);
+
+        $filterGroupTwoMock->expects($this->once())
+            ->method('getFilters')
+            ->willReturn([$filterThreeMock]);
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        $searchCriteriaMock->expects($this->once())
+            ->method('getFilterGroups')
+            ->willReturn([$filterGroupOneMock, $filterGroupTwoMock]);
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $customFilterMock->expects($this->once())
+            ->method('apply')
+            ->with($filterOneMock, $collectionMock)
+            ->willReturn(true);
+
+        $collectionMock->expects($this->exactly(2))
+            ->method('addFieldToFilter')
+            ->withConsecutive(
+                [$resultFieldsOne, $resultConditionsOne],
+                [$resultFieldsTwo, $resultConditionsTwo]
+            )->willReturnSelf();
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testProcessWithException()
+    {
+        /** @var \stdClass|\PHPUnit_Framework_MockObject_MockObject $customFilterMock */
+        $customFilterMock = $this->getMockBuilder(\stdClass::class)
+            ->getMock();
+
+        $customFilterField = 'customFilterField';
+        $customFilters = [$customFilterField => $customFilterMock];
+
+        $model = $this->getModel($customFilters, []);
+
+        /** @var FilterGroup|\PHPUnit_Framework_MockObject_MockObject $filterGroupOneMock */
+        $filterGroupOneMock = $this->getMockBuilder(FilterGroup::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        /** @var Filter|\PHPUnit_Framework_MockObject_MockObject $filterOneMock */
+        $filterOneMock = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filterOneMock->expects($this->once())
+            ->method('getField')
+            ->willReturn($customFilterField);
+
+        $filterGroupOneMock->expects($this->once())
+            ->method('getFilters')
+            ->willReturn([$filterOneMock]);
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        $searchCriteriaMock->expects($this->once())
+            ->method('getFilterGroups')
+            ->willReturn([$filterGroupOneMock]);
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $customFilterMock->expects($this->never())
+            ->method('apply');
+
+        $collectionMock->expects($this->never())
+            ->method('addFieldToFilter');
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+}
diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/JoinProcessorTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/JoinProcessorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d704f92f70e030cb086d7635d91ff5105fd022e5
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/JoinProcessorTest.php
@@ -0,0 +1,125 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\Test\Unit\SearchCriteria\CollectionProcessor;
+
+use Magento\Framework\Api\Filter;
+use Magento\Framework\Api\Search\FilterGroup;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor\CustomJoinInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class JoinProcessorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Return model
+     *
+     * @param CustomJoinInterface[] $customJoins
+     * @param array $fieldMapping
+     * @return JoinProcessor
+     */
+    private function getModel(array $customJoins, array $fieldMapping)
+    {
+        return new JoinProcessor($customJoins, $fieldMapping);
+    }
+
+    /**
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
+     */
+    public function testProcess()
+    {
+        /** @var \PHPUnit_Framework_MockObject_MockObject $customJoinMock */
+        $customJoinMock = $this->getMock(
+            \Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor\CustomJoinInterface::class
+        );
+
+        $customField = 'customJoinField';
+        $joins = [$customField => $customJoinMock];
+        $fieldMapping = [
+            'customJoinFieldAzaza' => 'customJoinField'
+        ];
+
+        $model = $this->getModel($joins, $fieldMapping);
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        /** @var FilterGroup |\PHPUnit_Framework_MockObject_MockObject $JoinGroupOneMock */
+        $filterGroup = $this->getMockBuilder(FilterGroup::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        /** @var Filter |\PHPUnit_Framework_MockObject_MockObject $JoinThreeMock */
+        $filter1 = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filter1->expects($this->atLeastOnce())
+            ->method('getField')
+            ->willReturn('customJoinFieldAzaza');
+        $filter2 = $this->getMockBuilder(Filter::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filter2->expects($this->atLeastOnce())
+            ->method('getField')
+            ->willReturn('someOtherField');
+        $filterGroup->expects($this->once())
+            ->method('getFilters')
+            ->willReturn([$filter1, $filter2]);
+
+        $searchCriteriaMock->expects($this->exactly(2))
+            ->method('getFilterGroups')
+            ->willReturn([$filterGroup]);
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $customJoinMock->expects($this->once())
+            ->method('apply')
+            ->with($collectionMock)
+            ->willReturn(true);
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testProcessWithException()
+    {
+        /** @var \PHPUnit_Framework_MockObject_MockObject $customJoinMock */
+        $customJoinMock = $this->getMockBuilder(\stdClass::class)
+            ->getMock();
+
+        $customField = 'customJoinField';
+        $joins = [$customField => $customJoinMock];
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        $model = $this->getModel($joins, []);
+        /** @var SortOrder |\PHPUnit_Framework_MockObject_MockObject $JoinGroupOneMock */
+        $sortOrder = $this->getMockBuilder(SortOrder::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $sortOrder->expects($this->atLeastOnce())
+            ->method('getField')
+            ->willReturn('customJoinField');
+        $searchCriteriaMock->expects($this->exactly(2))
+            ->method('getSortOrders')
+            ->willReturn([$sortOrder]);
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+}
diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/PaginationProcessorTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/PaginationProcessorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..57b2ccf3382f043d1b69f98c2aeef5f2a79c07c3
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/PaginationProcessorTest.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\Test\Unit\SearchCriteria\CollectionProcessor;
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\PaginationProcessor;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class PaginationProcessorTest extends \PHPUnit_Framework_TestCase
+{
+    public function testProcess()
+    {
+        $model = new PaginationProcessor;
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+        $searchCriteriaMock->expects($this->once())
+            ->method('getCurrentPage')
+            ->willReturn(22);
+        $searchCriteriaMock->expects($this->once())
+            ->method('getPageSize')
+            ->willReturn(33);
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $collectionMock->expects($this->once())
+            ->method('setCurPage')
+            ->with(22)
+            ->willReturnSelf();
+        $collectionMock->expects($this->once())
+            ->method('setPageSize')
+            ->with(33)
+            ->willReturnSelf();
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+}
diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/SortingProcessorTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/SortingProcessorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..68b4d6cee69610f02b84676e7558ae8f08894c63
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessor/SortingProcessorTest.php
@@ -0,0 +1,148 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\Test\Unit\SearchCriteria\CollectionProcessor;
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor\SortingProcessor;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Api\SortOrder;
+use Magento\Framework\Data\Collection;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class SortingProcessorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Return model
+     *
+     * @param array $fieldMapping
+     * @param array $defaultOrders
+     * @return SortingProcessor
+     */
+    private function getModel(array $fieldMapping, array $defaultOrders)
+    {
+        return new SortingProcessor($fieldMapping, $defaultOrders);
+    }
+
+    public function testProcess()
+    {
+        $orderOneField = 'orderOneField';
+        $orderOneFieldMapped = 'orderOneFieldMapped';
+        $orderOneDirection = SortOrder::SORT_ASC;
+
+        $orderTwoField = 'orderTwoField';
+        $orderTwoDirection = SortOrder::SORT_DESC;
+
+        $orderThreeField = 'orderTwoField';
+        $orderThreeDirection = '!!@!@';
+
+        $fieldMapping = [$orderOneField => $orderOneFieldMapped];
+
+        $defaultOrders = ['orderTwoField' => 'DESC'];
+
+        $model = $this->getModel($fieldMapping, $defaultOrders);
+
+        /** @var SortOrder|\PHPUnit_Framework_MockObject_MockObject $sortOrderOneMock */
+        $sortOrderOneMock = $this->getMockBuilder(SortOrder::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $sortOrderOneMock->expects($this->once())
+            ->method('getField')
+            ->willReturn($orderOneField);
+        $sortOrderOneMock->expects($this->once())
+            ->method('getDirection')
+            ->willReturn($orderOneDirection);
+
+        /** @var SortOrder|\PHPUnit_Framework_MockObject_MockObject $sortOrderTwoMock */
+        $sortOrderTwoMock = $this->getMockBuilder(SortOrder::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $sortOrderTwoMock->expects($this->once())
+            ->method('getField')
+            ->willReturn($orderTwoField);
+        $sortOrderTwoMock->expects($this->once())
+            ->method('getDirection')
+            ->willReturn($orderTwoDirection);
+
+        /** @var SortOrder|\PHPUnit_Framework_MockObject_MockObject $sortOrderThreeMock */
+        $sortOrderThreeMock = $this->getMockBuilder(SortOrder::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $sortOrderThreeMock->expects($this->once())
+            ->method('getField')
+            ->willReturn($orderThreeField);
+        $sortOrderThreeMock->expects($this->once())
+            ->method('getDirection')
+            ->willReturn($orderThreeDirection);
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        $searchCriteriaMock->expects($this->exactly(2))
+            ->method('getSortOrders')
+            ->willReturn([$sortOrderOneMock, $sortOrderTwoMock, $sortOrderThreeMock]);
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $collectionMock->expects($this->exactly(3))
+            ->method('addOrder')
+            ->withConsecutive(
+                [$orderOneFieldMapped, $orderOneDirection],
+                [$orderTwoField, $orderTwoDirection],
+                [$orderThreeField, Collection::SORT_ORDER_DESC]
+            )->willReturnSelf();
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+
+    public function testProcessWithDefaults()
+    {
+        $defaultOneField = 'defaultOneField';
+        $defaultOneFieldMapped = 'defaultOneFieldMapped';
+        $defaultOneDirection = SortOrder::SORT_ASC;
+
+        $defaultTwoField = 'defaultTwoField';
+        $defaultTwoDirection = SortOrder::SORT_DESC;
+
+        $defaultThreeField = 'defaultThreeField';
+        $defaultThreeDirection = '$#%^';
+
+        $fieldMapping = [$defaultOneField => $defaultOneFieldMapped];
+
+        $defaultOrders = [
+            $defaultOneField => $defaultOneDirection,
+            $defaultTwoField => $defaultTwoDirection,
+            $defaultThreeField => $defaultThreeDirection,
+        ];
+
+        $model = $this->getModel($fieldMapping, $defaultOrders);
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        $searchCriteriaMock->expects($this->once())
+            ->method('getSortOrders')
+            ->willReturn([]);
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $collectionMock->expects($this->exactly(3))
+            ->method('addOrder')
+            ->withConsecutive(
+                [$defaultOneFieldMapped, $defaultOneDirection],
+                [$defaultTwoField, $defaultTwoDirection],
+                [$defaultThreeField, Collection::SORT_ORDER_DESC]
+            )->willReturnSelf();
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+}
diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessorTest.php b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..ae52d722e050cbf9dbf4fce39a308834c405c61e
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/Test/Unit/SearchCriteria/CollectionProcessorTest.php
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Api\Test\Unit\SearchCriteria;
+
+use Magento\Framework\Api\SearchCriteria\CollectionProcessor;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+use Magento\Framework\Api\SearchCriteriaInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+
+class CollectionProcessorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Return model
+     *
+     * @param CollectionProcessorInterface[] $processors
+     * @return CollectionProcessor
+     */
+    private function getModel(array $processors)
+    {
+        return new CollectionProcessor($processors);
+    }
+
+    public function testProcess()
+    {
+        /** @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject $customFilterMock */
+        $processorOneMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
+
+        /** @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject $processorTwoMock */
+        $processorTwoMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
+
+        $processors = [$processorOneMock, $processorTwoMock];
+
+        $model = $this->getModel($processors);
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $processorOneMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
+
+        $processorTwoMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testProcessWithException()
+    {
+        /** @var CollectionProcessorInterface|\PHPUnit_Framework_MockObject_MockObject $customFilterMock */
+        $processorOneMock = $this->getMockBuilder(CollectionProcessorInterface::class)
+            ->getMock();
+
+        /** @var \stdClass|\PHPUnit_Framework_MockObject_MockObject $processorTwoMock */
+        $processorTwoMock = $this->getMockBuilder(\stdClass::class)
+            ->getMock();
+
+        $processors = [$processorOneMock, $processorTwoMock];
+
+        $model = $this->getModel($processors);
+
+        /** @var SearchCriteriaInterface|\PHPUnit_Framework_MockObject_MockObject $searchCriteriaMock */
+        $searchCriteriaMock = $this->getMockBuilder(SearchCriteriaInterface::class)
+            ->getMock();
+
+        /** @var AbstractDb|\PHPUnit_Framework_MockObject_MockObject $searchCriteriarMock */
+        $collectionMock = $this->getMockBuilder(AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $processorOneMock->expects($this->once())
+            ->method('process')
+            ->with($searchCriteriaMock, $collectionMock);
+
+        $processorTwoMock->expects($this->never())
+            ->method('process');
+
+        $model->process($searchCriteriaMock, $collectionMock);
+    }
+}
diff --git a/lib/internal/Magento/Framework/App/Response/HttpInterface.php b/lib/internal/Magento/Framework/App/Response/HttpInterface.php
index cf51d7689a87593ee05f68a10fd4ef0d5f8468e1..a0b04b34a47f437d4aee1ac368ae50498e5a96b1 100644
--- a/lib/internal/Magento/Framework/App/Response/HttpInterface.php
+++ b/lib/internal/Magento/Framework/App/Response/HttpInterface.php
@@ -16,4 +16,88 @@ interface HttpInterface extends \Magento\Framework\App\ResponseInterface
      * @return void
      */
     public function setHttpResponseCode($code);
+
+    /**
+     * Get HTTP response code
+     *
+     * @return int
+     */
+    public function getHttpResponseCode();
+
+    /**
+     * Set a header
+     *
+     * If $replace is true, replaces any headers already defined with that $name.
+     *
+     * @param string $name
+     * @param string $value
+     * @param boolean $replace
+     * @return self
+     */
+    public function setHeader($name, $value, $replace = false);
+
+    /**
+     * Get header value by name
+     * 
+     * Returns first found header by passed name.
+     * If header with specified name was not found returns false.
+     *
+     * @param string $name
+     * @return \Zend\Http\Header\HeaderInterface|bool
+     */
+    public function getHeader($name);
+
+    /**
+     * Remove header by name from header stack
+     *
+     * @param string $name
+     * @return self
+     */
+    public function clearHeader($name);
+
+    /**
+     * Allow granular setting of HTTP response status code, version and phrase
+     * 
+     * For example, a HTTP response as the following:
+     *     HTTP 200 1.1 Your response has been served
+     * Can be set with the arguments
+     *     $httpCode = 200
+     *     $version = 1.1
+     *     $phrase = 'Your response has been served'
+     * 
+     * @param int|string $httpCode
+     * @param null|int|string $version
+     * @param null|string $phrase
+     * @return self
+     */
+    public function setStatusHeader($httpCode, $version = null, $phrase = null);
+
+    /**
+     * Append the given string to the response body
+     * 
+     * @param string $value
+     * @return self
+     */
+    public function appendBody($value);
+
+    /**
+     * Set the response body to the given value
+     * 
+     * Any previously set contents will be replaced by the new content.
+     * 
+     * @param string $value
+     * @return self
+     */
+    public function setBody($value);
+
+    /**
+     * Set redirect URL
+     *
+     * Sets Location header and response code. Forces replacement of any prior redirects.
+     *
+     * @param string $url
+     * @param int $code
+     * @return self
+     */
+    public function setRedirect($url, $code = 302);
 }
diff --git a/lib/internal/Magento/Framework/Controller/AbstractResult.php b/lib/internal/Magento/Framework/Controller/AbstractResult.php
index 2c62b1496191a7290379bd6254bc40f0002e5910..afcd4c776dccd500607ad0899e0b84e348ec90e6 100644
--- a/lib/internal/Magento/Framework/Controller/AbstractResult.php
+++ b/lib/internal/Magento/Framework/Controller/AbstractResult.php
@@ -7,6 +7,7 @@
 namespace Magento\Framework\Controller;
 
 use Magento\Framework\App\ResponseInterface;
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 
 abstract class AbstractResult implements ResultInterface
 {
@@ -83,10 +84,10 @@ abstract class AbstractResult implements ResultInterface
     }
 
     /**
-     * @param ResponseInterface $response
+     * @param HttpResponseInterface $response
      * @return $this
      */
-    protected function applyHttpHeaders(ResponseInterface $response)
+    protected function applyHttpHeaders(HttpResponseInterface $response)
     {
         if (!empty($this->httpResponseCode)) {
             $response->setHttpResponseCode($this->httpResponseCode);
@@ -105,17 +106,17 @@ abstract class AbstractResult implements ResultInterface
         }
         return $this;
     }
-
+    
     /**
-     * @param ResponseInterface $response
+     * @param HttpResponseInterface $response
      * @return $this
      */
-    abstract protected function render(ResponseInterface $response);
+    abstract protected function render(HttpResponseInterface $response);
 
     /**
      * Render content
      *
-     * @param ResponseInterface $response
+     * @param HttpResponseInterface|ResponseInterface $response
      * @return $this
      */
     public function renderResult(ResponseInterface $response)
diff --git a/lib/internal/Magento/Framework/Controller/Result/Forward.php b/lib/internal/Magento/Framework/Controller/Result/Forward.php
index 14b94f0b7fbeda7a2bfbf446c7ae65a4d540ea0f..e1d041d732810f34d42aaee0571f7e3353fa5cfa 100644
--- a/lib/internal/Magento/Framework/Controller/Result/Forward.php
+++ b/lib/internal/Magento/Framework/Controller/Result/Forward.php
@@ -7,7 +7,7 @@
 namespace Magento\Framework\Controller\Result;
 
 use Magento\Framework\App\RequestInterface;
-use Magento\Framework\App\ResponseInterface;
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 use Magento\Framework\Controller\AbstractResult;
 
 class Forward extends AbstractResult
@@ -99,7 +99,7 @@ class Forward extends AbstractResult
     /**
      * {@inheritdoc}
      */
-    protected function render(ResponseInterface $response)
+    protected function render(HttpResponseInterface $response)
     {
         return $this;
     }
diff --git a/lib/internal/Magento/Framework/Controller/Result/Json.php b/lib/internal/Magento/Framework/Controller/Result/Json.php
index aae0257048a90a8a0da34e1aa0984f3bc6fe8af5..1b53deb80cadc03333809a2fa98f0637af3604dc 100644
--- a/lib/internal/Magento/Framework/Controller/Result/Json.php
+++ b/lib/internal/Magento/Framework/Controller/Result/Json.php
@@ -6,7 +6,7 @@
 
 namespace Magento\Framework\Controller\Result;
 
-use Magento\Framework\App\ResponseInterface;
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 use Magento\Framework\Controller\AbstractResult;
 use Magento\Framework\Translate\InlineInterface;
 
@@ -61,10 +61,11 @@ class Json extends AbstractResult
     /**
      * {@inheritdoc}
      */
-    protected function render(ResponseInterface $response)
+    protected function render(HttpResponseInterface $response)
     {
         $this->translateInline->processResponseBody($this->json, true);
-        $response->representJson($this->json);
+        $response->setHeader('Content-Type', 'application/json', true);
+        $response->setBody($this->json);
         return $this;
     }
 }
diff --git a/lib/internal/Magento/Framework/Controller/Result/Raw.php b/lib/internal/Magento/Framework/Controller/Result/Raw.php
index 4cfbc1e02d4998d2bf3a44220f16d34375ae7875..cee562b8039172f707e1b768b3cb6bcca0df24ce 100644
--- a/lib/internal/Magento/Framework/Controller/Result/Raw.php
+++ b/lib/internal/Magento/Framework/Controller/Result/Raw.php
@@ -6,7 +6,7 @@
 
 namespace Magento\Framework\Controller\Result;
 
-use Magento\Framework\App\ResponseInterface;
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 use Magento\Framework\Controller\AbstractResult;
 
 /**
@@ -33,7 +33,7 @@ class Raw extends AbstractResult
     /**
      * {@inheritdoc}
      */
-    protected function render(ResponseInterface $response)
+    protected function render(HttpResponseInterface $response)
     {
         $response->setBody($this->contents);
         return $this;
diff --git a/lib/internal/Magento/Framework/Controller/Result/Redirect.php b/lib/internal/Magento/Framework/Controller/Result/Redirect.php
index 391beb84cd844ea7fb38f9c14fd5b426c85caf1c..5dd727ca0b0b74b98864a308acb03142a648d19d 100644
--- a/lib/internal/Magento/Framework/Controller/Result/Redirect.php
+++ b/lib/internal/Magento/Framework/Controller/Result/Redirect.php
@@ -7,6 +7,7 @@
 namespace Magento\Framework\Controller\Result;
 
 use Magento\Framework\App;
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 use Magento\Framework\Controller\AbstractResult;
 
 /**
@@ -92,7 +93,7 @@ class Redirect extends AbstractResult
     /**
      * {@inheritdoc}
      */
-    protected function render(App\ResponseInterface $response)
+    protected function render(HttpResponseInterface $response)
     {
         $response->setRedirect($this->url);
         return $this;
diff --git a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/JsonTest.php b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/JsonTest.php
index 2d43a4a72af393da914952d2923402e79a23e218..0d38131ce013c544103cc8ce342edf563820f411 100644
--- a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/JsonTest.php
+++ b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/JsonTest.php
@@ -24,13 +24,14 @@ class JsonTest extends \PHPUnit_Framework_TestCase
         /** @var \Magento\Framework\Translate\InlineInterface|\PHPUnit_Framework_MockObject_MockObject
          * $translateInline
          */
-        $translateInline = $this->getMock(\Magento\Framework\Translate\InlineInterface::class, [], [], '', false);
+        $translateInline = $this->getMock(\Magento\Framework\Translate\InlineInterface::class);
         $translateInline->expects($this->any())->method('processResponseBody')->with($json, true)->will(
             $this->returnValue($translatedJson)
         );
 
-        $response = $this->getMock(\Magento\Framework\App\Response\Http::class, ['representJson'], [], '', false);
-        $response->expects($this->atLeastOnce())->method('representJson')->with($json)->will($this->returnSelf());
+        $response = $this->getMock(\Magento\Framework\App\Response\HttpInterface::class);
+        $response->expects($this->atLeastOnce())->method('setHeader')->with('Content-Type', 'application/json', true);
+        $response->expects($this->atLeastOnce())->method('setBody')->with($json);
 
         /** @var \Magento\Framework\Controller\Result\Json $resultJson */
         $resultJson = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
diff --git a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RawTest.php b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RawTest.php
index 402838fb0910436baaca5adaace654ed5e951384..21e172b0dd46e111e8b9f730605bc3f9cd56bb5c 100644
--- a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RawTest.php
+++ b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RawTest.php
@@ -6,6 +6,7 @@
 
 namespace Magento\Framework\Controller\Test\Unit\Result;
 
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
 
 class RawTest extends \PHPUnit_Framework_TestCase
@@ -13,7 +14,7 @@ class RawTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Framework\Controller\Result\Raw */
     protected $raw;
 
-    /** @var \Magento\Framework\App\ResponseInterface|\PHPUnit_Framework_MockObject_MockObject*/
+    /** @var HttpResponseInterface|\PHPUnit_Framework_MockObject_MockObject*/
     protected $response;
 
     /** @var ObjectManagerHelper */
@@ -24,15 +25,13 @@ class RawTest extends \PHPUnit_Framework_TestCase
         $this->objectManagerHelper = new ObjectManagerHelper($this);
 
         $this->response = $this->getMock(
-            \Magento\Framework\App\ResponseInterface::class,
-            ['setBody', 'sendResponse'],
+            HttpResponseInterface::class,
+            [],
             [],
             '',
             false
         );
-        $this->raw = $this->objectManagerHelper->getObject(
-            \Magento\Framework\Controller\Result\Raw::class
-        );
+        $this->raw = $this->objectManagerHelper->getObject(\Magento\Framework\Controller\Result\Raw::class);
     }
 
     public function testSetContents()
diff --git a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php
index ce703f02bd702ce2755d85d02c9a955aef79b495..9b957818fff3305c1337396349b3c2db94da6963 100644
--- a/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php
+++ b/lib/internal/Magento/Framework/Controller/Test/Unit/Result/RedirectTest.php
@@ -6,6 +6,7 @@
 
 namespace Magento\Framework\Controller\Test\Unit\Result;
 
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 use \Magento\Framework\Controller\Result\Redirect;
 
 class RedirectTest extends \PHPUnit_Framework_TestCase
@@ -22,7 +23,7 @@ class RedirectTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Framework\UrlInterface|\PHPUnit_Framework_MockObject_MockObject */
     protected $urlInterface;
 
-    /** @var \Magento\Framework\App\ResponseInterface|\PHPUnit_Framework_MockObject_MockObject */
+    /** @var HttpResponseInterface|\PHPUnit_Framework_MockObject_MockObject */
     protected $response;
 
     protected function setUp()
@@ -49,8 +50,8 @@ class RedirectTest extends \PHPUnit_Framework_TestCase
             false
         );
         $this->response = $this->getMock(
-            \Magento\Framework\App\ResponseInterface::class,
-            ['setRedirect', 'sendResponse'],
+            HttpResponseInterface::class,
+            [],
             [],
             '',
             false
diff --git a/lib/internal/Magento/Framework/EntityManager/CustomAttributesMapper.php b/lib/internal/Magento/Framework/EntityManager/CustomAttributesMapper.php
index 9147d47f3d9dd8c21cec93ff47de2e065a13dd9d..fe3a199da86a32bdb866894b53831fe4c5e8a246 100644
--- a/lib/internal/Magento/Framework/EntityManager/CustomAttributesMapper.php
+++ b/lib/internal/Magento/Framework/EntityManager/CustomAttributesMapper.php
@@ -55,8 +55,9 @@ class CustomAttributesMapper implements MapperInterface
      */
     public function entityToDatabase($entityType, $data)
     {
-        $metadata = $this->metadataPool->getMetadata($entityType);
-        if (!$metadata->getEavEntityType()) {
+        if (!$this->metadataPool->hasConfiguration($entityType)
+            || !$this->metadataPool->getMetadata($entityType)->getEavEntityType()
+        ) {
             return $data;
         }
         if (isset($data[CustomAttributesDataInterface::CUSTOM_ATTRIBUTES])) {
diff --git a/lib/internal/Magento/Framework/EntityManager/Test/Unit/CustomAttributesMapperTest.php b/lib/internal/Magento/Framework/EntityManager/Test/Unit/CustomAttributesMapperTest.php
index a39ad4afaa6eed43f552f14b5bdb85c16fa712dc..56977af1dd6eb5c62872572ec22f2024f7479223 100644
--- a/lib/internal/Magento/Framework/EntityManager/Test/Unit/CustomAttributesMapperTest.php
+++ b/lib/internal/Magento/Framework/EntityManager/Test/Unit/CustomAttributesMapperTest.php
@@ -48,12 +48,18 @@ class CustomAttributesMapperTest extends \PHPUnit_Framework_TestCase
 
         $metadataPool = $this->getMockBuilder(\Magento\Framework\EntityManager\MetadataPool::class)
             ->disableOriginalConstructor()
-            ->setMethods(['getMetadata'])
+            ->setMethods(['getMetadata', 'hasConfiguration'])
             ->getMock();
+        $metadataPool->expects($this->any())
+            ->method('hasConfiguration')
+            ->willReturn(true);
         $metadataPool->expects($this->any())
             ->method('getMetadata')
             ->with($this->equalTo(\Magento\Customer\Api\Data\AddressInterface::class))
             ->will($this->returnValue($metadata));
+        $metadataPool->expects($this->once())
+            ->method('hasConfiguration')
+            ->willReturn(true);
 
         $searchCriteriaBuilder = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaBuilder::class)
             ->disableOriginalConstructor()
@@ -76,6 +82,7 @@ class CustomAttributesMapperTest extends \PHPUnit_Framework_TestCase
                 'metadataPool' => $metadataPool,
                 'searchCriteriaBuilder' => $searchCriteriaBuilder
             ]);
+
         $actual = $customAttributesMapper->entityToDatabase(
             \Magento\Customer\Api\Data\AddressInterface::class,
             [
diff --git a/lib/internal/Magento/Framework/EntityManager/TypeResolver.php b/lib/internal/Magento/Framework/EntityManager/TypeResolver.php
index 28e2bdaa7094223d604cf174cd627982b6ecd0e9..2718162e80d669acfbc70eb78310b5911d7a668b 100644
--- a/lib/internal/Magento/Framework/EntityManager/TypeResolver.php
+++ b/lib/internal/Magento/Framework/EntityManager/TypeResolver.php
@@ -20,7 +20,8 @@ class TypeResolver
      */
     private $typeMapping = [
         \Magento\SalesRule\Model\Rule::class => \Magento\SalesRule\Api\Data\RuleInterface::class,
-        \Magento\SalesRule\Model\Rule\Interceptor::class => \Magento\SalesRule\Api\Data\RuleInterface::class
+        \Magento\SalesRule\Model\Rule\Interceptor::class => \Magento\SalesRule\Api\Data\RuleInterface::class,
+        \Magento\SalesRule\Model\Rule\Proxy::class => \Magento\SalesRule\Api\Data\RuleInterface::class
     ];
 
     /**
@@ -50,8 +51,7 @@ class TypeResolver
         $dataInterfaces = [];
         foreach ($interfaceNames as $interfaceName) {
             if (strpos($interfaceName, '\Api\Data\\')) {
-                $dataInterfaces[] = isset($this->config[$interfaceName])
-                    ? $this->config[$interfaceName] : $interfaceName;
+                $dataInterfaces[] = $interfaceName;
             }
         }
 
@@ -64,7 +64,9 @@ class TypeResolver
                 $this->typeMapping[$className] = $dataInterface;
             }
         }
-
+        if (empty($this->typeMapping[$className])) {
+            $this->typeMapping[$className] = reset($dataInterfaces);
+        }
         return $this->typeMapping[$className];
     }
 }
diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php
index 64566aea2d2dfb23fa5082d8e45722b7c6d86aaf..fe88e2b079277ee91111a74bc40d7548fbceeb2c 100644
--- a/lib/internal/Magento/Framework/Escaper.php
+++ b/lib/internal/Magento/Framework/Escaper.php
@@ -54,7 +54,7 @@ class Escaper
     public function escapeHtmlAttr($string, $escapeSingleQuote = true)
     {
         if ($escapeSingleQuote) {
-            return $this->getEscaper()->escapeHtmlAttr($string);
+            return $this->getEscaper()->escapeHtmlAttr((string) $string);
         }
         return htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false);
     }
diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
index 8c8a90ae6536cd18e6aafb142863d947048e3438..f077635122afd71f08460e96a8c7e2caf6acab0f 100644
--- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
+++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
@@ -16,12 +16,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
     protected $isRedirect = false;
 
     /**
-     * Get header value by name.
-     * Returns first found header by passed name.
-     * If header with specified name was not found returns false.
-     *
-     * @param string $name
-     * @return \Zend\Http\Header\HeaderInterface|bool
+     * {@inheritdoc}
      */
     public function getHeader($name)
     {
@@ -45,8 +40,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
     }
 
     /**
-     * @param string $value
-     * @return $this
+     * {@inheritdoc}
      */
     public function appendBody($value)
     {
@@ -56,8 +50,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
     }
 
     /**
-     * @param string $value
-     * @return $this
+     * {@inheritdoc}
      */
     public function setBody($value)
     {
@@ -76,15 +69,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
     }
 
     /**
-     * Set a header
-     *
-     * If $replace is true, replaces any headers already defined with that
-     * $name.
-     *
-     * @param string $name
-     * @param string $value
-     * @param boolean $replace
-     * @return $this
+     * {@inheritdoc}
      */
     public function setHeader($name, $value, $replace = false)
     {
@@ -99,10 +84,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
     }
 
     /**
-     * Remove header by name from header stack
-     *
-     * @param string $name
-     * @return $this
+     * {@inheritdoc}
      */
     public function clearHeader($name)
     {
@@ -117,6 +99,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
 
     /**
      * Remove all headers
+     * 
      * @return $this
      */
     public function clearHeaders()
@@ -128,14 +111,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
     }
 
     /**
-     * Set redirect URL
-     *
-     * Sets Location header and response code. Forces replacement of any prior
-     * redirects.
-     *
-     * @param string $url
-     * @param int $code
-     * @return $this
+     * {@inheritdoc}
      */
     public function setRedirect($url, $code = 302)
     {
@@ -146,10 +122,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
     }
 
     /**
-     * Set HTTP response code to use with headers
-     *
-     * @param int $code
-     * @return $this
+     * {@inheritdoc}
      */
     public function setHttpResponseCode($code)
     {
@@ -164,10 +137,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
     }
 
     /**
-     * @param int|string $httpCode
-     * @param null|int|string $version
-     * @param null|string $phrase
-     * @return $this
+     * {@inheritdoc}
      */
     public function setStatusHeader($httpCode, $version = null, $phrase = null)
     {
@@ -182,9 +152,7 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr
     }
 
     /**
-     * Get response code
-     *
-     * @return int
+     * {@inheritdoc}
      */
     public function getHttpResponseCode()
     {
diff --git a/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php b/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php
index 1ff11552533b1e6514409402e778687483ae6d18..93945c607b53d7498a9031fbb475f30e015ecb6c 100644
--- a/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php
+++ b/lib/internal/Magento/Framework/Interception/Code/InterfaceValidator.php
@@ -111,13 +111,13 @@ class InterfaceValidator
                     );
                     break;
                 case self::METHOD_AFTER:
-                    // TODO: Remove this condition check in scope of MAGETWO-56123
                     if (count($pluginMethodParameters) > 1) {
                         // remove result
                         array_shift($pluginMethodParameters);
+                        $matchedParameters = array_intersect_key($originMethodParameters, $pluginMethodParameters);
                         $this->validateMethodsParameters(
                             $pluginMethodParameters,
-                            $originMethodParameters,
+                            $matchedParameters,
                             $pluginClass,
                             $pluginMethod->getName()
                         );
diff --git a/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php b/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php
index 6f312529c12b40eaacc9d815411d4f065999b2d3..850d64b14ae0cd7efc4c067f919eb99245ba0414 100644
--- a/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php
+++ b/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php
@@ -1,22 +1,24 @@
 <?php
 /**
- * Validation of DB up to date state
- *
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
-// @codingStandardsIgnoreFile
-
 namespace Magento\Framework\Module\Plugin;
 
-use Magento\Framework\Cache\FrontendInterface;
+use Magento\Framework\Cache\FrontendInterface as FrontendCacheInterface;
 use Magento\Framework\Module\DbVersionInfo;
+use Magento\Framework\App\FrontController;
+use Magento\Framework\App\RequestInterface;
+use Magento\Framework\Exception\LocalizedException;
+use Magento\Framework\Phrase;
 
+/**
+ * Validation of DB up to date state
+ */
 class DbStatusValidator
 {
     /**
-     * @var FrontendInterface
+     * @var FrontendCacheInterface
      */
     private $cache;
 
@@ -26,47 +28,40 @@ class DbStatusValidator
     private $dbVersionInfo;
 
     /**
-     * @param FrontendInterface $cache
+     * @param FrontendCacheInterface $cache
      * @param DbVersionInfo $dbVersionInfo
      */
-    public function __construct(
-        FrontendInterface $cache,
-        DbVersionInfo $dbVersionInfo
-    ) {
+    public function __construct(FrontendCacheInterface $cache, DbVersionInfo $dbVersionInfo)
+    {
         $this->cache = $cache;
         $this->dbVersionInfo = $dbVersionInfo;
     }
 
     /**
-     * @param \Magento\Framework\App\FrontController $subject
-     * @param \Closure $proceed
-     * @param \Magento\Framework\App\RequestInterface $request
+     * Perform check if DB is up to date
+     *
+     * @param FrontController $subject
+     * @param RequestInterface $request
+     * @return void
+     * @throws LocalizedException
      *
-     * @throws \Magento\Framework\Exception\LocalizedException
-     * @return \Magento\Framework\App\ResponseInterface
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function aroundDispatch(
-        \Magento\Framework\App\FrontController $subject,
-        \Closure $proceed,
-        \Magento\Framework\App\RequestInterface $request
-    ) {
+    public function beforeDispatch(FrontController $subject, RequestInterface $request)
+    {
         if (!$this->cache->load('db_is_up_to_date')) {
             $errors = $this->dbVersionInfo->getDbVersionErrors();
+
             if ($errors) {
-                $formattedErrors = $this->formatErrors($errors);
-                throw new \Magento\Framework\Exception\LocalizedException(
-                    new \Magento\Framework\Phrase(
-                        'Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.'
-                        . ' %1The following modules are outdated:%2%3',
-                        [PHP_EOL, PHP_EOL, implode(PHP_EOL, $formattedErrors)]
-                    )
-                );
+                $message = 'Please upgrade your database: '
+                    . "Run \"bin/magento setup:upgrade\" from the Magento root directory.\n"
+                    . "The following modules are outdated:\n%1";
+
+                throw new LocalizedException(new Phrase($message, [implode("\n", $this->formatErrors($errors))]));
             } else {
                 $this->cache->save('true', 'db_is_up_to_date');
             }
         }
-        return $proceed($request);
     }
 
     /**
@@ -78,12 +73,13 @@ class DbStatusValidator
     private function formatErrors($errorsData)
     {
         $formattedErrors = [];
+
         foreach ($errorsData as $error) {
-            $formattedErrors[] = $error[DbVersionInfo::KEY_MODULE] .
-                ' ' . $error[DbVersionInfo::KEY_TYPE] .
-                ': current version - ' . $error[DbVersionInfo::KEY_CURRENT ] .
-                ', required version - ' . $error[DbVersionInfo::KEY_REQUIRED];
+            $formattedErrors[] = $error[DbVersionInfo::KEY_MODULE] . ' ' . $error[DbVersionInfo::KEY_TYPE]
+                . ': current version - ' . $error[DbVersionInfo::KEY_CURRENT]
+                . ', required version - ' . $error[DbVersionInfo::KEY_REQUIRED];
         }
+
         return $formattedErrors;
     }
 }
diff --git a/lib/internal/Magento/Framework/Module/Setup.php b/lib/internal/Magento/Framework/Module/Setup.php
index 0b0bbb20a33d504b2c878e212cdf3c39c0771f1d..7bd12bc89f1e90ce7010388dcbdaeeab18d572af 100644
--- a/lib/internal/Magento/Framework/Module/Setup.php
+++ b/lib/internal/Magento/Framework/Module/Setup.php
@@ -9,6 +9,7 @@ namespace Magento\Framework\Module;
 
 use Magento\Framework\Setup\ModuleDataSetupInterface;
 use Magento\Framework\Setup\SetupInterface;
+use Magento\Framework\App\ResourceConnection;
 
 class Setup implements SetupInterface
 {
@@ -57,9 +58,27 @@ class Setup implements SetupInterface
     /**
      * Get connection object
      *
+     * @param string|null $connectionName
      * @return \Magento\Framework\DB\Adapter\AdapterInterface
      */
-    public function getConnection()
+    public function getConnection($connectionName = null)
+    {
+        if ($connectionName !== null) {
+            try {
+                return $this->resourceModel->getConnectionByName($connectionName);
+            } catch (\DomainException $exception) {
+                //Fallback to default connection
+            }
+        }
+        return $this->getDefaultConnection();
+    }
+
+    /**
+     * Returns default setup connection instance
+     *
+     * @return \Magento\Framework\DB\Adapter\AdapterInterface
+     */
+    private function getDefaultConnection()
     {
         if (null === $this->connection) {
             $this->connection = $this->resourceModel->getConnection($this->connectionName);
@@ -95,13 +114,14 @@ class Setup implements SetupInterface
      * Get table name (validated by db adapter) by table placeholder
      *
      * @param string|array $tableName
+     * @param string $connectionName
      * @return string
      */
-    public function getTable($tableName)
+    public function getTable($tableName, $connectionName = ResourceConnection::DEFAULT_CONNECTION)
     {
         $cacheKey = $this->_getTableCacheName($tableName);
         if (!isset($this->tables[$cacheKey])) {
-            $this->tables[$cacheKey] = $this->resourceModel->getTableName($tableName);
+            $this->tables[$cacheKey] = $this->resourceModel->getTableName($tableName, $connectionName);
         }
         return $this->tables[$cacheKey];
     }
@@ -124,12 +144,13 @@ class Setup implements SetupInterface
      * Check is table exists
      *
      * @param string $table
+     * @param string $connectionName
      * @return bool
      */
-    public function tableExists($table)
+    public function tableExists($table, $connectionName = ResourceConnection::DEFAULT_CONNECTION)
     {
-        $table = $this->getTable($table);
-        return $this->getConnection()->isTableExists($table);
+        $table = $this->getTable($table, $connectionName);
+        return $this->getConnection($connectionName)->isTableExists($table);
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/Plugin/DbStatusValidatorTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/Plugin/DbStatusValidatorTest.php
index fee050560815c293a1f7a724de0653e606e21fc8..c0563020110daa8b4ef5a4e7cd3824dee2a5d3b0 100644
--- a/lib/internal/Magento/Framework/Module/Test/Unit/Plugin/DbStatusValidatorTest.php
+++ b/lib/internal/Magento/Framework/Module/Test/Unit/Plugin/DbStatusValidatorTest.php
@@ -21,11 +21,6 @@ class DbStatusValidatorTest extends \PHPUnit_Framework_TestCase
      */
     protected $_cacheMock;
 
-    /**
-     * @var \Closure
-     */
-    protected $closureMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -49,9 +44,6 @@ class DbStatusValidatorTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_cacheMock = $this->getMock(\Magento\Framework\Cache\FrontendInterface::class);
-        $this->closureMock = function () {
-            return 'Expected';
-        };
         $this->requestMock = $this->getMock(\Magento\Framework\App\RequestInterface::class);
         $this->subjectMock = $this->getMock(\Magento\Framework\App\FrontController::class, [], [], '', false);
         $moduleList = $this->getMockForAbstractClass(\Magento\Framework\Module\ModuleListInterface::class);
@@ -85,8 +77,8 @@ class DbStatusValidatorTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValueMap($returnMap));
 
         $this->assertEquals(
-            'Expected',
-            $this->_model->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock)
+            null,
+            $this->_model->beforeDispatch($this->subjectMock, $this->requestMock)
         );
     }
 
@@ -101,8 +93,8 @@ class DbStatusValidatorTest extends \PHPUnit_Framework_TestCase
         $this->moduleManager->expects($this->never())
             ->method('isDbDataUpToDate');
         $this->assertEquals(
-            'Expected',
-            $this->_model->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock)
+            null,
+            $this->_model->beforeDispatch($this->subjectMock, $this->requestMock)
         );
     }
 
@@ -125,7 +117,7 @@ class DbStatusValidatorTest extends \PHPUnit_Framework_TestCase
             ->method('getDbVersionErrors')
             ->will($this->returnValue($dbVersionErrors));
 
-        $this->_model->aroundDispatch($this->subjectMock, $this->closureMock, $this->requestMock);
+        $this->_model->beforeDispatch($this->subjectMock, $this->requestMock);
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/SetupTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/SetupTest.php
index 63b5d54e2e7d42ad3875d430c385a2df3cbe47c5..984c9a073fb3957ab0fe4270f966d1cec8454429 100644
--- a/lib/internal/Magento/Framework/Module/Test/Unit/SetupTest.php
+++ b/lib/internal/Magento/Framework/Module/Test/Unit/SetupTest.php
@@ -34,7 +34,11 @@ class SetupTest extends \PHPUnit_Framework_TestCase
         $this->resourceModel->expects($this->any())
             ->method('getConnection')
             ->with(self::CONNECTION_NAME)
-            ->will($this->returnValue($this->connection));
+            ->willReturn($this->connection);
+        $this->resourceModel->expects($this->any())
+            ->method('getConnectionByName')
+            ->with(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION)
+            ->willReturn($this->connection);
         $this->object = new Setup($this->resourceModel, self::CONNECTION_NAME);
     }
 
diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php
index c520835f09f8cc987caeba798678ea08b5e6d5c5..0c825a5ed5ac50915fbaaee27a5a23717f1b7d9c 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php
@@ -8,6 +8,9 @@
 
 namespace Magento\Framework\ObjectManager\Code\Generator;
 
+use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface;
+use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
+
 /**
  * Class Repository
  */
@@ -82,7 +85,21 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract
                         [
                             'name' => 'var',
                             'description' =>
-                                '\\' . \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface::class,
+                                '\\' . JoinProcessorInterface::class,
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'name' => 'collectionProcessor',
+                'visibility' => 'private',
+                'docblock' => [
+                    'shortDescription' => 'Search Criteria Collection processor.',
+                    'tags' => [
+                        [
+                            'name' => 'var',
+                            'description' =>
+                                '\\' . CollectionProcessorInterface::class,
                         ],
                     ],
                 ]
@@ -154,7 +171,7 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract
                 ],
                 [
                     'name' => 'extensionAttributesJoinProcessor',
-                    'type' => '\\' . \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface::class,
+                    'type' => '\\' . JoinProcessorInterface::class,
                 ],
             ],
             'body' => "\$this->"
@@ -175,12 +192,11 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract
                     [
                         'name' => 'param',
                         'description' => $this->_getCollectionFactoryClassName()
-                            . " \$" . $this->_getSourceCollectionFactoryPropertyName()
+                            . " \$" . $this->_getSourceCollectionFactoryPropertyName(),
                     ],
                     [
                         'name' => 'param',
-                        'description' => '\\' . \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface::class
-                            . " \$extensionAttributesJoinProcessor"
+                        'description' => '\\' . JoinProcessorInterface::class . " \$extensionAttributesJoinProcessor",
                     ],
                 ],
             ]
@@ -468,14 +484,7 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract
     {
         $body = "\$collection = \$this->" . $this->_getSourceCollectionFactoryPropertyName() . "->create();\n"
         . "\$this->extensionAttributesJoinProcessor->process(\$collection);\n"
-        . "foreach (\$searchCriteria->getFilterGroups() as \$filterGroup) {\n"
-        . "    foreach (\$filterGroup->getFilters() as \$filter) {\n"
-        . "        \$condition = \$filter->getConditionType() ? \$filter->getConditionType() : 'eq';\n"
-        . "        \$collection->addFieldToFilter(\$filter->getField(), [\$condition => \$filter->getValue()]);\n"
-        . "    }\n"
-        . "}\n"
-        . "\$collection->setCurPage(\$searchCriteria->getCurrentPage());\n"
-        . "\$collection->setPageSize(\$searchCriteria->getPageSize());\n"
+        . "\$this->getCollectionProcessor()->process(\$searchCriteria, \$collection);\n"
         . "return \$collection;\n";
         return [
             'name' => 'getList',
@@ -502,6 +511,39 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract
         ];
     }
 
+    /**
+     * Returns getList() method
+     *
+     * @return string
+     */
+    private function _getGetCollectionProcessorMethod()
+    {
+        $body = "if (!\$this->collectionProcessor) {\n"
+            . "    \$this->collectionProcessor = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\n"
+            . "        \\" . CollectionProcessorInterface::class . "::class\n"
+            . "    );\n"
+            . "}\n"
+            . "return \$this->collectionProcessor;\n";
+        return [
+            'name' => 'getCollectionProcessor',
+            'visibility' => 'private',
+            'parameters' => [],
+            'body' => $body,
+            'docblock' => [
+                'shortDescription' => 'Retrieve collection processor',
+                'tags' => [
+                    [
+                        'name' => 'deprecated',
+                    ],
+                    [
+                        'name' => 'return',
+                        'description' => "\\" . CollectionProcessorInterface::class,
+                    ],
+                ],
+            ]
+        ];
+    }
+
     /**
      * Returns list of methods for class generator
      *
@@ -519,7 +561,8 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract
             $this->_getDeleteMethod(),
             $this->_getDeleteByIdMethod(),
             $this->_getFlushMethod(),
-            $this->_getSaveMethod()
+            $this->_getSaveMethod(),
+            $this->_getGetCollectionProcessorMethod(),
         ];
     }
 
diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt
index b56cf46027540e1027d61d10a395bd14f6b76955..4ddebf82816cd7fa57ddec33ca62ad1e306afd74 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt
+++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt
@@ -35,6 +35,13 @@ class SampleRepository implements \Magento\Framework\ObjectManager\Code\Generato
      */
     protected $extensionAttributesJoinProcessor = null;
 
+    /**
+     * Search Criteria Collection processor.
+     *
+     * @var \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface
+     */
+    private $collectionProcessor = null;
+
     /**
      * Repository constructor
      *
@@ -104,14 +111,7 @@ class SampleRepository implements \Magento\Framework\ObjectManager\Code\Generato
     {
         $collection = $this->sampleInterfaceSearchResultFactory->create();
         $this->extensionAttributesJoinProcessor->process($collection);
-        foreach ($searchCriteria->getFilterGroups() as $filterGroup) {
-            foreach ($filterGroup->getFilters() as $filter) {
-                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
-                $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]);
-            }
-        }
-        $collection->setCurPage($searchCriteria->getCurrentPage());
-        $collection->setPageSize($searchCriteria->getPageSize());
+        $this->getCollectionProcessor()->process($searchCriteria, $collection);
         return $collection;
     }
 
@@ -172,4 +172,20 @@ class SampleRepository implements \Magento\Framework\ObjectManager\Code\Generato
         $this->sampleInterfacePersistor->doPersistEntity($entity);
         return $entity;
     }
+
+    /**
+     * Retrieve collection processor
+     *
+     * @deprecated
+     * @return \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface
+     */
+    private function getCollectionProcessor()
+    {
+        if (!$this->collectionProcessor) {
+            $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
+                \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class
+            );
+        }
+        return $this->collectionProcessor;
+    }
 }
diff --git a/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php b/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..f22192639f77e62f52ccae93906b096b733934ba
--- /dev/null
+++ b/lib/internal/Magento/Framework/Test/Unit/Module/Plugin/DbStatusValidatorTest.php
@@ -0,0 +1,137 @@
+<?php
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Framework\Test\Unit\Module\Plugin;
+
+use Magento\Framework\Module\Plugin\DbStatusValidator as DbStatusValidatorPlugin;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\Framework\Cache\FrontendInterface as FrontendCacheInterface;
+use Magento\Framework\Module\DbVersionInfo;
+use Magento\Framework\App\FrontController;
+use Magento\Framework\App\RequestInterface;
+use Magento\Framework\Exception\LocalizedException;
+
+class DbStatusValidatorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var DbStatusValidatorPlugin
+     */
+    private $plugin;
+
+    /**
+     * @var ObjectManagerHelper
+     */
+    private $objectManagerHelper;
+
+    /**
+     * @var FrontendCacheInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $cacheMock;
+
+    /**
+     * @var DbVersionInfo|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $dbVersionInfoMock;
+
+    /**
+     * @var FrontController|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $frontControllerMock;
+
+    /**
+     * @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $requestMock;
+
+    protected function setUp()
+    {
+        $this->cacheMock = $this->getMockBuilder(FrontendCacheInterface::class)
+            ->getMockForAbstractClass();
+        $this->dbVersionInfoMock = $this->getMockBuilder(DbVersionInfo::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->frontControllerMock = $this->getMockBuilder(FrontController::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->requestMock = $this->getMockBuilder(RequestInterface::class)
+            ->getMockForAbstractClass();
+
+        $this->objectManagerHelper = new ObjectManagerHelper($this);
+        $this->plugin = $this->objectManagerHelper->getObject(
+            DbStatusValidatorPlugin::class,
+            [
+                'cache' => $this->cacheMock,
+                'dbVersionInfo' => $this->dbVersionInfoMock
+            ]
+        );
+    }
+
+    public function testBeforeDispatchUpToDate()
+    {
+        $this->cacheMock->expects(static::any())
+            ->method('load')
+            ->with('db_is_up_to_date')
+            ->willReturn('cache_data');
+        $this->dbVersionInfoMock->expects(static::never())
+            ->method('getDbVersionErrors');
+        $this->cacheMock->expects(static::never())
+            ->method('save');
+
+        $this->plugin->beforeDispatch($this->frontControllerMock, $this->requestMock);
+    }
+
+    public function testBeforeDispatchOutOfDateNoErrors()
+    {
+        $this->cacheMock->expects(static::any())
+            ->method('load')
+            ->with('db_is_up_to_date')
+            ->willReturn(false);
+        $this->dbVersionInfoMock->expects(static::once())
+            ->method('getDbVersionErrors')
+            ->willReturn([]);
+        $this->cacheMock->expects(static::once())
+            ->method('save')
+            ->with('true', 'db_is_up_to_date', [], null)
+            ->willReturn(true);
+
+        $this->plugin->beforeDispatch($this->frontControllerMock, $this->requestMock);
+    }
+
+    public function testBeforeDispatchOutOfDateWithErrors()
+    {
+        $errors = [
+            [
+                DbVersionInfo::KEY_MODULE => 'Magento_Module1',
+                DbVersionInfo::KEY_TYPE => 'schema',
+                DbVersionInfo::KEY_CURRENT => '3.3.3',
+                DbVersionInfo::KEY_REQUIRED => '4.4.4'
+            ],
+            [
+                DbVersionInfo::KEY_MODULE => 'Magento_Module2',
+                DbVersionInfo::KEY_TYPE => 'data',
+                DbVersionInfo::KEY_CURRENT => '2.8.7',
+                DbVersionInfo::KEY_REQUIRED => '5.1.6'
+            ]
+        ];
+        $message = 'Please upgrade your database: '
+            . "Run \"bin/magento setup:upgrade\" from the Magento root directory.\n"
+            . "The following modules are outdated:\n"
+            . "Magento_Module1 schema: current version - 3.3.3, required version - 4.4.4\n"
+            . "Magento_Module2 data: current version - 2.8.7, required version - 5.1.6";
+
+        $this->cacheMock->expects(static::any())
+            ->method('load')
+            ->with('db_is_up_to_date')
+            ->willReturn(false);
+        $this->dbVersionInfoMock->expects(static::once())
+            ->method('getDbVersionErrors')
+            ->willReturn($errors);
+        $this->cacheMock->expects(static::never())
+            ->method('save');
+
+        $this->setExpectedException(LocalizedException::class, $message);
+        $this->plugin->beforeDispatch($this->frontControllerMock, $this->requestMock);
+    }
+}
diff --git a/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php b/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php
index c61b851356d55b6e89d6bbc7c0af33f8d9782bab..88a28dbc513eeae894fe4a0f16fffc46e12fc553 100644
--- a/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php
@@ -170,6 +170,22 @@ string',
         $mock->getDataUsingMethod('test_data');
     }
 
+    /**
+     * Test documenting current behaviour of getDataUsingMethod
+     * _underscore assumes an underscore before any digit
+     */
+    public function testGetDataUsingMethodWithoutUnderscore()
+    {
+        $this->_object->setData('key_1', 'value1');
+        $this->assertTrue($this->_object->hasData('key_1'));
+        $this->assertEquals('value1', $this->_object->getDataUsingMethod('key_1'));
+
+        $this->_object->setData('key2', 'value2');
+        $this->assertEquals('value2', $this->_object->getData('key2'));
+        $this->assertEquals(null, $this->_object->getKey2());
+        $this->assertEquals(null, $this->_object->getDataUsingMethod('key2'));
+    }
+
     /**
      * Tests \Magento\Framework\DataObject->hasData()
      */
diff --git a/lib/internal/Magento/Framework/View/Element/Template.php b/lib/internal/Magento/Framework/View/Element/Template.php
index 11f31e707a0481655c273435e4bd40b20ebd725f..d1b65b5ea907be657c2261a78ddddb8fafa398bf 100644
--- a/lib/internal/Magento/Framework/View/Element/Template.php
+++ b/lib/internal/Magento/Framework/View/Element/Template.php
@@ -139,7 +139,7 @@ class Template extends AbstractBlock
     }
 
     /**
-     * Set template context. Sets the object that should represent $this in template
+     * Set template context. Sets the object that should represent $block in template
      *
      * @param \Magento\Framework\View\Element\BlockInterface $templateContext
      * @return void
diff --git a/lib/internal/Magento/Framework/View/Result/Layout.php b/lib/internal/Magento/Framework/View/Result/Layout.php
index 4094f1dc60ca704ba6a2d1151512aba6b1891b0b..7bff972271c85c3eed613af3aac9807b78c82aef 100644
--- a/lib/internal/Magento/Framework/View/Result/Layout.php
+++ b/lib/internal/Magento/Framework/View/Result/Layout.php
@@ -7,6 +7,7 @@
 namespace Magento\Framework\View\Result;
 
 use Magento\Framework;
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 use Magento\Framework\App\ResponseInterface;
 use Magento\Framework\Controller\AbstractResult;
 use Magento\Framework\View;
@@ -15,6 +16,8 @@ use Magento\Framework\View;
  * A generic layout response can be used for rendering any kind of layout
  * So it comprises a response body from the layout elements it has and sets it to the HTTP response
  *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ *
  * @api
  */
 class Layout extends AbstractResult
@@ -101,7 +104,7 @@ class Layout extends AbstractResult
     /**
      * Get layout instance for current page
      *
-     * @return \Magento\Framework\View\Layout
+     * @return \Magento\Framework\View\LayoutInterface
      */
     public function getLayout()
     {
@@ -152,19 +155,19 @@ class Layout extends AbstractResult
     /**
      * Render current layout
      *
-     * @param ResponseInterface $response
+     * @param HttpResponseInterface|ResponseInterface $httpResponse
      * @return $this
      */
-    public function renderResult(ResponseInterface $response)
+    public function renderResult(ResponseInterface $httpResponse)
     {
         \Magento\Framework\Profiler::start('LAYOUT');
         \Magento\Framework\Profiler::start('layout_render');
-        
+
         $this->eventManager->dispatch('layout_render_before');
         $this->eventManager->dispatch('layout_render_before_' . $this->request->getFullActionName());
-        
-        $this->applyHttpHeaders($response);
-        $this->render($response);
+
+        $this->applyHttpHeaders($httpResponse);
+        $this->render($httpResponse);
 
         \Magento\Framework\Profiler::stop('layout_render');
         \Magento\Framework\Profiler::stop('LAYOUT');
@@ -172,12 +175,9 @@ class Layout extends AbstractResult
     }
 
     /**
-     * Render current layout
-     *
-     * @param ResponseInterface $response
-     * @return $this
+     * {@inheritdoc}
      */
-    protected function render(ResponseInterface $response)
+    protected function render(HttpResponseInterface $response)
     {
         $output = $this->layout->getOutput();
         $this->translateInline->processResponseBody($output);
diff --git a/lib/internal/Magento/Framework/View/Result/Page.php b/lib/internal/Magento/Framework/View/Result/Page.php
index 952dcabddc19e6c0aca4816ba7558cae26e5090a..6fc7fcbf9f230e41dba99174566958814b6e60b7 100644
--- a/lib/internal/Magento/Framework/View/Result/Page.php
+++ b/lib/internal/Magento/Framework/View/Result/Page.php
@@ -7,7 +7,7 @@
 namespace Magento\Framework\View\Result;
 
 use Magento\Framework;
-use Magento\Framework\App\ResponseInterface;
+use Magento\Framework\App\Response\HttpInterface as HttpResponseInterface;
 use Magento\Framework\View;
 
 /**
@@ -219,10 +219,9 @@ class Page extends Layout
     }
 
     /**
-     * @param ResponseInterface $response
-     * @return $this
+     * {@inheritdoc}
      */
-    protected function render(ResponseInterface $response)
+    protected function render(HttpResponseInterface $response)
     {
         $this->pageConfig->publicBuild();
         if ($this->getPageLayout()) {
diff --git a/lib/web/mage/backend/validation.js b/lib/web/mage/backend/validation.js
index ebdad945cd977515f7aa08bbb0a4130719423c67..62f8cf476b808264a59e6592b73a069f127c6ddb 100644
--- a/lib/web/mage/backend/validation.js
+++ b/lib/web/mage/backend/validation.js
@@ -224,7 +224,7 @@
                 }
                 return true;
             },
-            'Please enter a number greater 0 in this field.'
+            $.mage.__('Please enter a number greater 0 in this field.')
         ],
         'validate-rating': [
             function () {
@@ -236,7 +236,7 @@
                 });
                 return noError;
             },
-            'Please select one of each ratings above.'
+            $.mage.__('Please select one of each ratings above.')
         ],
         'validate-downloadable-file': [
             function (v, element) {
@@ -267,7 +267,7 @@
                 }
                 return true;
             },
-            'Please specify Url.'
+            $.mage.__('Please specify Url.')
         ]
     }, function (rule, i) {
         rule.unshift(i);
diff --git a/lib/web/mage/menu.js b/lib/web/mage/menu.js
index 4562285654c70f8b991e89866dfc82977842dd64..f0b67e3fb86657262b39f9354d9dac854f523fd9 100644
--- a/lib/web/mage/menu.js
+++ b/lib/web/mage/menu.js
@@ -275,6 +275,9 @@ define([
                     if (!target.hasClass('level-top') || !target.has(".ui-menu").length) {
                         window.location.href = target.find('> a').attr('href');
                     }
+                },
+                "click .ui-menu-item:has(.ui-state-active)": function (event) {
+                    this.collapseAll(event, true);
                 }
             });
 
@@ -390,6 +393,39 @@ define([
             };
             
             return setTimeout(handlerProxy, delay || 0);
+        },
+        expand: function( event ) {
+            var newItem = this.active &&
+                this.active
+                    .children( ".ui-menu " )
+                    .children( ".ui-menu-item" )
+                    .first();
+
+            if ( newItem && newItem.length ) {
+                if (newItem.closest( ".ui-menu" ).is( ":visible" )
+                    && newItem.closest( ".ui-menu" ).has( ".all-categories" )
+                ) {
+                    return;
+                }
+
+                this._open( newItem.parent() );
+
+                // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
+                this._delay(function() {
+                    this.focus( event, newItem );
+                });
+            }
+        },
+        select: function( event ) {
+            this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
+            if (this.active.is( ".all-category" )) {
+                this.active = $( event.target ).closest( ".ui-menu-item" );
+            }
+            var ui = { item: this.active };
+            if ( !this.active.has( ".ui-menu" ).length ) {
+                this.collapseAll( event, true );
+            }
+            this._trigger( "select", event, ui );
         }
     });
 
diff --git a/lib/web/mage/validation.js b/lib/web/mage/validation.js
index f61177188bdccc40393099e46defa5ddf4bb7168..6c8deba8164112a31939b11d1ed79b5c23dd7bc0 100644
--- a/lib/web/mage/validation.js
+++ b/lib/web/mage/validation.js
@@ -166,13 +166,13 @@
             function (value, element, params) {
                 return this.optional(element) || $.mage.stripHtml(value).match(/\b\w+\b/g).length < params;
             },
-            'Please enter {0} words or less.'
+            $.mage.__('Please enter {0} words or less.')
         ],
         "min-words": [
             function (value, element, params) {
                 return this.optional(element) || $.mage.stripHtml(value).match(/\b\w+\b/g).length >= params;
             },
-            'Please enter at least {0} words.'
+            $.mage.__('Please enter at least {0} words.')
         ],
         "range-words": [
             function (value, element, params) {
@@ -180,43 +180,43 @@
                     $.mage.stripHtml(value).match(/\b\w+\b/g).length >= params[0] &&
                     value.match(/bw+b/g).length < params[1];
             },
-            'Please enter between {0} and {1} words.'
+            $.mage.__('Please enter between {0} and {1} words.')
         ],
         "letters-with-basic-punc": [
             function (value, element) {
                 return this.optional(element) || /^[a-z\-.,()'\"\s]+$/i.test(value);
             },
-            'Letters or punctuation only please'
+            $.mage.__('Letters or punctuation only please')
         ],
         "alphanumeric": [
             function (value, element) {
                 return this.optional(element) || /^\w+$/i.test(value);
             },
-            'Letters, numbers, spaces or underscores only please'
+            $.mage.__('Letters, numbers, spaces or underscores only please')
         ],
         "letters-only": [
             function (value, element) {
                 return this.optional(element) || /^[a-z]+$/i.test(value);
             },
-            'Letters only please'
+            $.mage.__('Letters only please')
         ],
         "no-whitespace": [
             function (value, element) {
                 return this.optional(element) || /^\S+$/i.test(value);
             },
-            'No white space please'
+            $.mage.__('No white space please')
         ],
         "zip-range": [
             function (value, element) {
                 return this.optional(element) || /^90[2-5]-\d{2}-\d{4}$/.test(value);
             },
-            'Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx'
+            $.mage.__('Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx')
         ],
         "integer": [
             function (value, element) {
                 return this.optional(element) || /^-?\d+$/.test(value);
             },
-            'A positive or negative non-decimal number please'
+            $.mage.__('A positive or negative non-decimal number please')
         ],
         "vinUS": [
             function (v) {
@@ -259,7 +259,7 @@
                 }
                 return false;
             },
-            'The specified vehicle identification number (VIN) is invalid.'
+            $.mage.__('The specified vehicle identification number (VIN) is invalid.')
         ],
         "dateITA": [
             function (value, element) {
@@ -282,7 +282,7 @@
                 }
                 return this.optional(element) || check;
             },
-            'Please enter a correct date'
+            $.mage.__('Please enter a correct date')
         ],
         "dateNL": [
             function (value, element) {
@@ -294,13 +294,13 @@
             function (value, element) {
                 return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){0,2}$/.test(value);
             },
-            'Please enter a valid time, between 00:00 and 23:59'
+            $.mage.__('Please enter a valid time, between 00:00 and 23:59')
         ],
         "time12h": [
             function (value, element) {
                 return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$/i.test(value);
             },
-            'Please enter a valid time, between 00:00 am and 12:00 pm'
+            $.mage.__('Please enter a valid time, between 00:00 am and 12:00 pm')
         ],
         "phoneUS": [
             function (phone_number, element) {
@@ -308,27 +308,27 @@
                 return this.optional(element) || phone_number.length > 9 &&
                     phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
             },
-            'Please specify a valid phone number'
+            $.mage.__('Please specify a valid phone number')
         ],
         "phoneUK": [
             function (phone_number, element) {
                 return this.optional(element) || phone_number.length > 9 &&
                     phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
             },
-            'Please specify a valid phone number'
+            $.mage.__('Please specify a valid phone number')
         ],
         "mobileUK": [
             function (phone_number, element) {
                 return this.optional(element) || phone_number.length > 9 &&
                     phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/);
             },
-            'Please specify a valid mobile number'
+            $.mage.__('Please specify a valid mobile number')
         ],
         "stripped-min-length": [
             function (value, element, param) {
                 return value.length >= param;
             },
-            'Please enter at least {0} characters'
+            $.mage.__('Please enter at least {0} characters')
         ],
         "email2": [
             function (value, element) {
@@ -407,25 +407,25 @@
                 }
                 return false;
             },
-            'Please enter a valid credit card number.'
+            $.mage.__('Please enter a valid credit card number.')
         ],
         "ipv4": [
             function (value, element) {
                 return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value);
             },
-            'Please enter a valid IP v4 address.'
+            $.mage.__('Please enter a valid IP v4 address.')
         ],
         "ipv6": [
             function (value, element) {
                 return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
             },
-            'Please enter a valid IP v6 address.'
+            $.mage.__('Please enter a valid IP v6 address.')
         ],
         "pattern": [
             function (value, element, param) {
                 return this.optional(element) || param.test(value);
             },
-            'Invalid format.'
+            $.mage.__('Invalid format.')
         ],
         "allow-container-className": [
             function (element) {
@@ -439,67 +439,67 @@
             function (value) {
                 return !/<(\/)?\w+/.test(value);
             },
-            'HTML tags are not allowed.'
+            $.mage.__('HTML tags are not allowed.')
         ],
         "validate-select": [
             function (value) {
                 return ((value !== "none") && (value != null) && (value.length !== 0));
             },
-            'Please select an option.'
+            $.mage.__('Please select an option.')
         ],
         "validate-no-empty": [
             function (value) {
                 return !$.mage.isEmpty(value);
             },
-            'Empty Value.'
+            $.mage.__('Empty Value.')
         ],
         "validate-alphanum-with-spaces": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^[a-zA-Z0-9 ]+$/.test(v);
             },
-            'Please use only letters (a-z or A-Z), numbers (0-9) or spaces only in this field.'
+            $.mage.__('Please use only letters (a-z or A-Z), numbers (0-9) or spaces only in this field.')
         ],
         "validate-data": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^[A-Za-z]+[A-Za-z0-9_]+$/.test(v);
             },
-            'Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.'
+            $.mage.__('Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.')
         ],
         "validate-street": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^[ \w]{3,}([A-Za-z]\.)?([ \w]*\#\d+)?(\r\n| )[ \w]{3,}/.test(v);
             },
-            'Please use only letters (a-z or A-Z), numbers (0-9), spaces and "#" in this field.'
+            $.mage.__('Please use only letters (a-z or A-Z), numbers (0-9), spaces and "#" in this field.')
         ],
         "validate-phoneStrict": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/.test(v);
             },
-            'Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.'
+            $.mage.__('Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.')
         ],
         "validate-phoneLax": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^((\d[\-. ]?)?((\(\d{3}\))|\d{3}))?[\-. ]?\d{3}[\-. ]?\d{4}$/.test(v);
             },
-            'Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.'
+            $.mage.__('Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.')
         ],
         "validate-fax": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/.test(v);
             },
-            'Please enter a valid fax number (Ex: 123-456-7890).'
+            $.mage.__('Please enter a valid fax number (Ex: 123-456-7890).')
         ],
         "validate-email": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*@([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*\.(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,})$/i.test(v);
             },
-            'Please enter a valid email address (Ex: johndoe@domain.com).'
+            $.mage.__('Please enter a valid email address (Ex: johndoe@domain.com).')
         ],
         "validate-emailSender": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^[\S ]+$/.test(v);
             },
-            'Please enter a valid email address (Ex: johndoe@domain.com).'
+            $.mage.__('Please enter a valid email address (Ex: johndoe@domain.com).')
         ],
         "validate-password": [
             function (v) {
@@ -513,7 +513,7 @@
                 }
                 return !(pass.length > 0 && pass.length < 6);
             },
-            'Please enter 6 or more characters. Leading and trailing spaces will be ignored.'
+            $.mage.__('Please enter 6 or more characters. Leading and trailing spaces will be ignored.')
         ],
         "validate-admin-password": [
             function (v) {
@@ -533,7 +533,7 @@
                 }
                 return true;
             },
-            'Please enter 7 or more characters, using both numeric and alphabetic.'
+            $.mage.__('Please enter 7 or more characters, using both numeric and alphabetic.')
         ],
         "validate-customer-password": [
             function (v, elm) {
@@ -584,35 +584,35 @@
                 return (/^(http|https|ftp):\/\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\d+))?(\/[A-Z0-9~](([A-Z0-9_~-]|\.)*[A-Z0-9~]|))*\/?(.*)?$/i).test(v);
 
             },
-            'Please enter a valid URL. Protocol is required (http://, https:// or ftp://).'
+            $.mage.__('Please enter a valid URL. Protocol is required (http://, https:// or ftp://).')
         ],
         "validate-clean-url": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+.(com|org|net|dk|at|us|tv|info|uk|co.uk|biz|se)$)(:(\d+))?\/?/i.test(v) || /^(www)((\.[A-Z0-9][A-Z0-9_-]*)+.(com|org|net|dk|at|us|tv|info|uk|co.uk|biz|se)$)(:(\d+))?\/?/i.test(v);
 
             },
-            'Please enter a valid URL. For example http://www.example.com or www.example.com.'
+            $.mage.__('Please enter a valid URL. For example http://www.example.com or www.example.com.')
         ],
         "validate-xml-identifier": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^[A-Z][A-Z0-9_\/-]*$/i.test(v);
 
             },
-            'Please enter a valid XML-identifier (Ex: something_1, block5, id-4).'
+            $.mage.__('Please enter a valid XML-identifier (Ex: something_1, block5, id-4).')
         ],
         "validate-ssn": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^\d{3}-?\d{2}-?\d{4}$/.test(v);
 
             },
-            'Please enter a valid social security number (Ex: 123-45-6789).'
+            $.mage.__('Please enter a valid social security number (Ex: 123-45-6789).')
         ],
         "validate-zip-us": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /(^\d{5}$)|(^\d{5}-\d{4}$)/.test(v);
 
             },
-            'Please enter a valid zip code (Ex: 90602 or 90602-1234).'
+            $.mage.__('Please enter a valid zip code (Ex: 90602 or 90602-1234).')
         ],
         "validate-date-au": [
             function (v) {
@@ -629,14 +629,14 @@
                     parseInt(RegExp.$3, 10) === d.getFullYear();
 
             },
-            'Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.'
+            $.mage.__('Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.')
         ],
         "validate-currency-dollar": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^\$?\-?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}\d*(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/.test(v);
 
             },
-            'Please enter a valid $ amount. For example $100.00.'
+            $.mage.__('Please enter a valid $ amount. For example $100.00.')
         ],
         "validate-not-negative-number": [
             function (v) {
@@ -647,7 +647,7 @@
                 return !isNaN(v) && v >= 0;
 
             },
-            'Please enter a number 0 or greater in this field.'
+            $.mage.__('Please enter a number 0 or greater in this field.')
         ],
         // validate-not-negative-number should be replaced in all places with this one and then removed
         "validate-zero-or-greater": [
@@ -659,7 +659,7 @@
                 return !isNaN(v) && v >= 0;
 
             },
-            'Please enter a number 0 or greater in this field.'
+            $.mage.__('Please enter a number 0 or greater in this field.')
         ],
         "validate-greater-than-zero": [
             function (v) {
@@ -669,7 +669,7 @@
                 v = $.mage.parseNumber(v);
                 return !isNaN(v) && v > 0;
             },
-            'Please enter a number greater than 0 in this field.'
+            $.mage.__('Please enter a number greater than 0 in this field.')
         ],
         "validate-css-length": [
             function (v) {
@@ -678,20 +678,20 @@
                 }
                 return true;
             },
-            'Please input a valid CSS-length (Ex: 100px, 77pt, 20em, .5ex or 50%).'
+            $.mage.__('Please input a valid CSS-length (Ex: 100px, 77pt, 20em, .5ex or 50%).')
         ],
         /** @description Additional methods */
         "validate-number": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || (!isNaN($.mage.parseNumber(v)) && /^\s*-?\d*(\.\d*)?\s*$/.test(v));
             },
-            'Please enter a valid number in this field.'
+            $.mage.__('Please enter a valid number in this field.')
         ],
         "required-number": [
             function (v) {
                 return !!v.length;
             },
-            'Please enter a valid number in this field.'
+            $.mage.__('Please enter a valid number in this field.')
         ],
         "validate-number-range": [
             function (v, elm, param) {
@@ -731,14 +731,14 @@
 
                 return result;
             },
-            'The value is not within the specified range.',
+            $.mage.__('The value is not within the specified range.'),
             true
         ],
         "validate-digits": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || !/[^\d]/.test(v);
             },
-            'Please enter a valid number in this field.'
+            $.mage.__('Please enter a valid number in this field.')
         ],
         "validate-digits-range": [
             function (v, elm, param) {
@@ -778,7 +778,7 @@
 
                 return result;
             },
-            'The value is not within the specified range.',
+            $.mage.__('The value is not within the specified range.'),
             true
         ],
         'validate-range': [
@@ -819,31 +819,32 @@
                 }
                 return result;
             },
-            'The value is not within the specified range.'
+            $.mage.__('The value is not within the specified range.')
         ],
         "validate-alpha": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^[a-zA-Z]+$/.test(v);
             },
-            'Please use letters only (a-z or A-Z) in this field.'
+            $.mage.__('Please use letters only (a-z or A-Z) in this field.')
         ],
         "validate-code": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^[a-z]+[a-z0-9_]+$/.test(v);
             },
-            'Please use only letters (a-z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.'
+            $.mage.__('Please use only letters (a-z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.')
         ],
         "validate-alphanum": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^[a-zA-Z0-9]+$/.test(v);
             },
-            'Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.'
+            $.mage.__('Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.')
         ],
         "validate-date": [
             function (v) {
                 var test = new Date(v);
                 return $.mage.isEmptyNoTrim(v) || !isNaN(test);
-            }, 'Please enter a valid date.'
+            },
+            $.mage.__('Please enter a valid date.')
 
         ],
         "validate-date-range": [
@@ -866,7 +867,7 @@
                 return !dependentElements.length || $.mage.isEmptyNoTrim(dependentElements[0].value) ||
                     normalizedTime(v) <= normalizedTime(dependentElements[0].value);
             },
-            'Make sure the To Date is later than or the same as the From Date.'
+            $.mage.__('Make sure the To Date is later than or the same as the From Date.')
         ],
         "validate-cpassword": [
             function () {
@@ -887,13 +888,13 @@
                 }
                 return (pass.val() === conf.val());
             },
-            'Please make sure your passwords match.'
+            $.mage.__('Please make sure your passwords match.')
         ],
         "validate-identifier": [
             function (v) {
                 return $.mage.isEmptyNoTrim(v) || /^[a-z0-9][a-z0-9_\/-]+(\.[a-z0-9_-]+)?$/.test(v);
             },
-            'Please enter a valid URL Key (Ex: "example-page", "example-page.html" or "anotherlevel/example-page").'
+            $.mage.__('Please enter a valid URL Key (Ex: "example-page", "example-page.html" or "anotherlevel/example-page").')
         ],
         "validate-zip-international": [
             /*function(v) {
@@ -903,7 +904,7 @@
             function () {
                 return true;
             },
-            'Please enter a valid zip code.'
+            $.mage.__('Please enter a valid zip code.')
         ],
         "validate-one-required": [
             function (v, elm) {
@@ -913,13 +914,13 @@
                         return $(elm).val();
                     }).length > 0;
             },
-            'Please select one of the options above.'
+            $.mage.__('Please select one of the options above.')
         ],
         "validate-state": [
             function (v) {
                 return (v !== 0 || v === '');
             },
-            'Please select State/Province.'
+            $.mage.__('Please select State/Province.')
         ],
         "required-file": [
             function (v, elm) {
@@ -932,7 +933,7 @@
                 }
                 return result;
             },
-            'Please select a file.'
+            $.mage.__('Please select a file.')
         ],
         "validate-ajax-error": [
             function (v, element) {
@@ -961,7 +962,7 @@
                 }
                 return hasWithValue ^ hasWithNoValue;
             },
-            'The field isn\'t complete.'
+            $.mage.__('The field isn\'t complete.')
         ],
         "validate-required-datetime": [
             function (v, elm, param) {
@@ -973,7 +974,7 @@
                 }
                 return true;
             },
-            'This is a required field.'
+            $.mage.__('This is a required field.')
         ],
         "validate-one-required-by-name": [
             function (v, elm, selector) {
@@ -1024,7 +1025,8 @@
                     }
                 }
                 return true;
-            }, "Please enter valid email addresses, separated by commas. For example, johndoe@domain.com, johnsmith@domain.com."
+            },
+            $.mage.__("Please enter valid email addresses, separated by commas. For example, johndoe@domain.com, johnsmith@domain.com.")
         ],
 
         "validate-cc-type-select": [
@@ -1040,7 +1042,8 @@
                     return creditCartTypes[value][0].test($(params).val().replace(/\s+/g, ''));
                 }
                 return false;
-            }, 'Card type does not match credit card number.'
+            },
+            $.mage.__('Card type does not match credit card number.')
         ],
         "validate-cc-number": [
             /**
@@ -1053,7 +1056,8 @@
                     return validateCreditCard(value);
                 }
                 return false;
-            }, 'Please enter a valid credit card number.'
+            },
+            $.mage.__('Please enter a valid credit card number.')
         ],
         "validate-cc-type": [
             /**
@@ -1074,7 +1078,8 @@
                     }
                 }
                 return false;
-            }, 'Credit card number does not match credit card type.'
+            },
+            $.mage.__('Credit card number does not match credit card type.')
         ],
         "validate-cc-exp": [
             /**
@@ -1095,7 +1100,8 @@
                     isValid = !year || year > currentYear || (year == currentYear && month >= currentMonth);
                 }
                 return isValid;
-            }, 'Incorrect credit card expiration date.'
+            },
+            $.mage.__('Incorrect credit card expiration date.')
         ],
         "validate-cc-cvn": [
             /**
@@ -1113,7 +1119,8 @@
                     }
                 }
                 return false;
-            }, 'Please enter a valid credit card verification number.'
+            },
+            $.mage.__('Please enter a valid credit card verification number.')
         ],
         "validate-cc-ukss": [
             /**
@@ -1123,7 +1130,8 @@
              */
                 function (value) {
                 return value;
-            }, 'Please enter issue number or start date for switch/solo card type.'
+            },
+            $.mage.__('Please enter issue number or start date for switch/solo card type.')
         ],
 
         "validate-length": [
@@ -1166,7 +1174,7 @@
                 else
                     return true;
             },
-            'Please enter positive number in this field.'
+            $.mage.__('Please enter positive number in this field.')
         ],
         'validate-per-page-value-list': [
             function (v) {
@@ -1179,7 +1187,7 @@
                 }
                 return isValid;
             },
-            'Please enter a valid value, ex: 10,20,30'
+            $.mage.__('Please enter a valid value, ex: 10,20,30')
         ],
         'validate-per-page-value': [
             function (v, elm) {
@@ -1189,7 +1197,7 @@
                 var values = $('#' + elm.id + '_values').val().split(',');
                 return values.indexOf(v) != -1;
             },
-            'Please enter a valid value from list'
+            $.mage.__('Please enter a valid value from list')
         ],
         'validate-new-password': [
             function (v) {
@@ -1202,7 +1210,7 @@
                 }
                 return true;
             },
-            'Please enter 6 or more characters. Leading and trailing spaces will be ignored.'
+            $.mage.__('Please enter 6 or more characters. Leading and trailing spaces will be ignored.')
         ],
         'required-if-not-specified': [
             function (value, element, params) {
@@ -1226,7 +1234,7 @@
 
                 return valid;
             },
-            'This is a required field.'
+            $.mage.__('This is a required field.')
         ],
         'required-if-all-sku-empty-and-file-not-loaded': [
             function (value, element, params) {
@@ -1254,7 +1262,8 @@
                 });
 
                 return valid;
-            }, 'Please enter valid SKU key.'
+            },
+            $.mage.__('Please enter valid SKU key.')
         ],
         'required-if-specified': [
             function (value, element, params) {
@@ -1279,7 +1288,7 @@
 
                 return valid;
             },
-            'This is a required field.'
+            $.mage.__('This is a required field.')
         ],
         'required-number-if-specified': [
             function (value, element, params) {
@@ -1298,7 +1307,7 @@
 
                 return valid ? !!value.length : true;
             },
-            'Please enter a valid number.'
+            $.mage.__('Please enter a valid number.')
         ],
         'datetime-validation': [
             function (value, element) {
@@ -1311,19 +1320,19 @@
 
                 return isValid;
             },
-            'This is required field'
+            $.mage.__('This is required field')
         ],
         'required-text-swatch-entry': [
             tableSingleValidation,
-            'Admin is a required field in the each row.'
+            $.mage.__('Admin is a required field in the each row.')
         ],
         'required-visual-swatch-entry': [
             tableSingleValidation,
-            'Admin is a required field in the each row.'
+            $.mage.__('Admin is a required field in the each row.')
         ],
         'required-dropdown-attribute-entry': [
             tableSingleValidation,
-            'Admin is a required field in the each row.'
+            $.mage.__('Admin is a required field in the each row.')
         ],
         'validate-item-quantity': [
             function (value, element, params) {
@@ -1357,7 +1366,22 @@
         }
     });
     $.validator.messages = $.extend($.validator.messages, {
-        required: $.mage.__('This is a required field.')
+        required: $.mage.__('This is a required field.'),
+        remote: $.mage.__('Please fix this field.'),
+        email: $.mage.__('Please enter a valid email address.'),
+        url: $.mage.__('Please enter a valid URL.'),
+        date: $.mage.__('Please enter a valid date.'),
+        dateISO: $.mage.__('Please enter a valid date (ISO).'),
+        number: $.mage.__('Please enter a valid number.'),
+        digits: $.mage.__('Please enter only digits.'),
+        creditcard: $.mage.__('Please enter a valid credit card number.'),
+        equalTo: $.mage.__('Please enter the same value again.'),
+        maxlength: $.validator.format($.mage.__('Please enter no more than {0} characters.')),
+        minlength: $.validator.format($.mage.__('Please enter at least {0} characters.')),
+        rangelength: $.validator.format($.mage.__('Please enter a value between {0} and {1} characters long.')),
+        range: $.validator.format($.mage.__('Please enter a value between {0} and {1}.')),
+        max: $.validator.format($.mage.__('Please enter a value less than or equal to {0}.')),
+        min: $.validator.format($.mage.__('Please enter a value greater than or equal to {0}.'))
     });
 
     if ($.metadata) {
diff --git a/lib/web/mage/validation/validation.js b/lib/web/mage/validation/validation.js
index a60ca5e737b6d1e90d5b10f7661d2ca020cf9f7f..b1c4db994ed2a7d52ec78d45fecdebe6b6360512 100644
--- a/lib/web/mage/validation/validation.js
+++ b/lib/web/mage/validation/validation.js
@@ -36,7 +36,7 @@
                 });
                 return result && total > 0;
             },
-            'Please specify the quantity of product(s).'
+            $.mage.__('Please specify the quantity of product(s).')
         ],
         'validate-one-checkbox-required-by-name': [
             function (value, element, params) {
@@ -60,7 +60,7 @@
                     return false;
                 }
             },
-            'Please select one of the options.'
+            $.mage.__('Please select one of the options.')
         ],
         'validate-date-between': [
             function (value, element, params) {
@@ -89,7 +89,7 @@
                     yearVal = $(dob).find(params[2]).find('input:text').val(),
                     dobLength = dayVal.length + monthVal.length + yearVal.length;
                 if (params[3] && dobLength === 0) {
-                    this.dobErrorMessage = 'This is a required field.';
+                    this.dobErrorMessage = $.mage.__('This is a required field.');
                     return false;
                 }
                 if (!params[3] && dobLength === 0) {
@@ -100,11 +100,11 @@
                     year = parseInt(yearVal, 10) || 0,
                     curYear = (new Date()).getFullYear();
                 if (!day || !month || !year) {
-                    this.dobErrorMessage = 'Please enter a valid full date.';
+                    this.dobErrorMessage = $.mage.__('Please enter a valid full date.');
                     return false;
                 }
                 if (month < 1 || month > 12) {
-                    this.dobErrorMessage = 'Please enter a valid month (1-12).';
+                    this.dobErrorMessage = $.mage.__('Please enter a valid month (1-12).');
                     return false;
                 }
                 if (year < 1900 || year > curYear) {
diff --git a/nginx.conf.sample b/nginx.conf.sample
index 36adc71d0c3161412a7b4ba283b1a021ab3fcf5a..ec524374900f64b4ed0307ae8e17501e814a3f62 100644
--- a/nginx.conf.sample
+++ b/nginx.conf.sample
@@ -82,7 +82,7 @@ location ~* ^/update($|/) {
 }
 
 location / {
-    try_files $uri $uri/ /index.php?$args;
+    try_files $uri $uri/ /index.php$is_args$args;
 }
 
 location /pub/ {
@@ -127,7 +127,7 @@ location /static/ {
 }
 
 location /media/ {
-    try_files $uri $uri/ /get.php?$args;
+    try_files $uri $uri/ /get.php$is_args$args;
 
     location ~ ^/media/theme_customization/.*\.xml {
         deny all;
@@ -137,13 +137,13 @@ location /media/ {
         add_header Cache-Control "public";
         add_header X-Frame-Options "SAMEORIGIN";
         expires +1y;
-        try_files $uri $uri/ /get.php?$args;
+        try_files $uri $uri/ /get.php$is_args$args;
     }
     location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
         add_header Cache-Control "no-store";
         add_header X-Frame-Options "SAMEORIGIN";
         expires    off;
-        try_files $uri $uri/ /get.php?$args;
+        try_files $uri $uri/ /get.php$is_args$args;
     }
     add_header X-Frame-Options "SAMEORIGIN";
 }
diff --git a/setup/config/states.extensionManager.config.php b/setup/config/states.extensionManager.config.php
index 5c70105c721f2d870443b393d8855a57bd3e0e36..e46b83c50c3e9bab59eeaab69d4161ffbe8f759d 100644
--- a/setup/config/states.extensionManager.config.php
+++ b/setup/config/states.extensionManager.config.php
@@ -65,7 +65,7 @@ return [
             'templateUrl' => "$base/start-updater",
             'controller'  => 'startUpdaterController',
             'title'       => "Component \n Install",
-            'header'      => 'Step 3: Component Install',
+            'header'      => 'Step 3: Install',
             'nav'         => true,
             'order'       => 6,
             'type'        => 'install',
diff --git a/setup/config/states.update.config.php b/setup/config/states.update.config.php
index 38e2ca5bff5348a35b40e201a392aa7d3b487708..4e3970e086ab9ecca1c7ca101e3b89897ae79e71 100644
--- a/setup/config/states.update.config.php
+++ b/setup/config/states.update.config.php
@@ -60,8 +60,8 @@ return [
             'url'         => 'start-updater',
             'templateUrl' => "$base/start-updater",
             'controller'  => 'startUpdaterController',
-            'title'       => "Component \n Update",
-            'header'      => 'Step 3: Component Update',
+            'title'       => "Extension \n Update",
+            'header'      => 'Step 3: Extension Update',
             'nav'         => true,
             'order'       => 6,
             'type'        => 'update'
diff --git a/setup/pub/magento/setup/extension-grid.js b/setup/pub/magento/setup/extension-grid.js
index 255547cb5f7508298ce08729377d0bf080184940..e5fc525dbd1bc8f00f0a50d73b54f363ccadcdfc 100644
--- a/setup/pub/magento/setup/extension-grid.js
+++ b/setup/pub/magento/setup/extension-grid.js
@@ -129,7 +129,7 @@ angular.module('extension-grid', ['ngStorage'])
                         version: $scope.availableUpdatePackages[extension.name]['latestVersion']
                     }
                 ];
-                titleService.setTitle('update', extension.moduleName ? extension.moduleName : extension.name);
+                titleService.setTitle('update', extension);
                 $state.go('root.readiness-check-update');
             };
 
@@ -139,7 +139,7 @@ angular.module('extension-grid', ['ngStorage'])
                         name: extension.name
                     }
                 ];
-                titleService.setTitle('uninstall', extension.moduleName ? extension.moduleName : extension.name);
+                titleService.setTitle('uninstall', extension);
                 $localStorage.componentType = extension.type;
                 $state.go('root.readiness-check-uninstall');
             };
diff --git a/setup/pub/magento/setup/install-extension-grid.js b/setup/pub/magento/setup/install-extension-grid.js
index f4ed97baae386b4387f545d0d1b09fb16c6e8f0a..0ec3b66911f10fda24aaf75a3e2a6583f55ce0ce 100644
--- a/setup/pub/magento/setup/install-extension-grid.js
+++ b/setup/pub/magento/setup/install-extension-grid.js
@@ -5,20 +5,17 @@
 
 'use strict';
 angular.module('install-extension-grid', ['ngStorage', 'clickOut'])
-    .controller('installExtensionGridController', ['$scope', '$http', '$localStorage', 'authService', 'paginationService',
-        function ($scope, $http, $localStorage, authService, paginationService) {
+    .controller('installExtensionGridController', ['$scope', '$http', '$localStorage', 'authService', 'paginationService', 'multipleChoiceService',
+        function ($scope, $http, $localStorage, authService, paginationService, multipleChoiceService) {
 
             $http.get('index.php/installExtensionGrid/extensions').success(function(data) {
                 $scope.error = false;
                 $scope.errorMessage = '';
-                $scope.selectedExtensions = {};
-                $scope.allExtensions = {};
+                $scope.multipleChoiceService = multipleChoiceService;
+                $scope.multipleChoiceService.reset();
                 angular.forEach(data.extensions, function(value) {
-                    this[value.name] = {
-                        'name': value.name,
-                        'version': value.version
-                    };
-                }, $scope.allExtensions);
+                    $scope.multipleChoiceService.addExtension(value.name, value.version);
+                });
                 $scope.extensions = data.extensions;
                 $scope.total = data.total;
                 $scope.currentPage = 1;
@@ -28,31 +25,6 @@ angular.module('install-extension-grid', ['ngStorage', 'clickOut'])
 
             paginationService.initWatchers($scope);
 
-            $scope.updateSelectedExtensions = function($event, name, version) {
-                var checkbox = $event.target;
-                if (checkbox.checked) {
-                    $scope.selectedExtensions[name] = {
-                        'name': name,
-                        'version': version
-                    };
-                    if ($scope.getObjectSize($scope.selectedExtensions) == $scope.getObjectSize($scope.allExtensions)) {
-                        $scope.someExtensionsSelected = false;
-                        $scope.allExtensionsSelected = true;
-                    } else {
-                        $scope.someExtensionsSelected = true;
-                        $scope.allExtensionsSelected = false;
-                    }
-                } else {
-                    delete $scope.selectedExtensions[name];
-                    $scope.allExtensionsSelected = false;
-                    if ($scope.getObjectSize($scope.selectedExtensions) > 0) {
-                        $scope.someExtensionsSelected = true;
-                    } else {
-                        $scope.someExtensionsSelected = false;
-                    }
-                }
-            };
-
             $scope.predicate = 'name';
             $scope.reverse = false;
             $scope.order = function(predicate) {
@@ -60,58 +32,22 @@ angular.module('install-extension-grid', ['ngStorage', 'clickOut'])
                 $scope.predicate = predicate;
             };
 
-            $scope.getObjectSize = function(obj) {
-                var size = 0, key;
-                for (key in obj) {
-                    if (obj.hasOwnProperty(key)) {
-                        ++size;
-                    }
-                }
-                return size;
-            };
-
-            $scope.isNewExtensionsMenuVisible = false;
-            $scope.toggleNewExtensionsMenu = function() {
-                $scope.isNewExtensionsMenuVisible = !$scope.isNewExtensionsMenuVisible;
-            };
-            $scope.hideNewExtensionsMenu = function() {
-                $scope.isNewExtensionsMenuVisible = false;
-            };
-            $scope.someExtensionsSelected = false;
-            $scope.allExtensionsSelected = false;
-            $scope.selectAllExtensions = function() {
-                $scope.isNewExtensionsMenuVisible = false;
-                $scope.someExtensionsSelected = false;
-                $scope.allExtensionsSelected = true;
-                $scope.selectedExtensions = angular.copy($scope.allExtensions);
-            };
-            $scope.deselectAllExtensions = function() {
-                $scope.isNewExtensionsMenuVisible = false;
-                $scope.someExtensionsSelected = false;
-                $scope.allExtensionsSelected = false;
-                $scope.selectedExtensions = {};
-            };
-
             $scope.isHiddenSpinner = true;
             $scope.installAll = function() {
                 $scope.isHiddenSpinner = false;
                 authService.checkAuth({
                     success: function(response) {
                         $scope.isHiddenSpinner = true;
-                        if ($scope.getObjectSize($scope.selectedExtensions) > 0) {
-                            $scope.error = false;
-                            $scope.errorMessage = '';
-                            $localStorage.packages = $scope.selectedExtensions;
-                        } else {
-                            $scope.error = true;
-                            $scope.errorMessage = 'Please select at least one extension';
-                        }
+                        var result = $scope.multipleChoiceService.checkSelectedExtensions();
+                        $scope.error = result.error;
+                        $scope.errorMessage = result.errorMessage;
 
                         if (!$scope.error) {
                             $scope.nextState();
                         }
                     },
                     fail: function(response) {
+                        $scope.isHiddenSpinner = true;
                         authService.openAuthDialog($scope);
                     },
                     error: function() {
@@ -138,6 +74,7 @@ angular.module('install-extension-grid', ['ngStorage', 'clickOut'])
                                 }
                             ];
                             $localStorage.moduleName = extension.name;
+                            $localStorage.packageTitle = extension.package_title;
                             $scope.error = false;
                             $scope.errorMessage = '';
                         }
diff --git a/setup/pub/magento/setup/main.js b/setup/pub/magento/setup/main.js
index b62d03f990f5b4db60aab890d24e905d3599bd23..3f359df3232d7720be259d1b34f958973bdd3e6c 100644
--- a/setup/pub/magento/setup/main.js
+++ b/setup/pub/magento/setup/main.js
@@ -251,13 +251,19 @@ main.controller('navigationController',
 .service('titleService', ['$localStorage', '$rootScope',
     function ($localStorage, $rootScope) {
         return {
-            setTitle: function(type, moduleName) {
-                $localStorage.moduleName = moduleName;
+            setTitle: function(type, component) {
+                if (type === 'enable' || type === 'disable') {
+                    $localStorage.packageTitle = $localStorage.moduleName = component.moduleName;
+                } else {
+                    $localStorage.moduleName = component.moduleName ? component.moduleName : component.name;
+                    $localStorage.packageTitle = component.package_title;
+                }
+
                 if (typeof $localStorage.titles === 'undefined') {
                     $localStorage.titles = [];
                 }
                 $localStorage.titles[type] = type.charAt(0).toUpperCase() + type.slice(1) + ' '
-                    + $localStorage.moduleName;
+                    + ($localStorage.packageTitle ? $localStorage.packageTitle : $localStorage.moduleName);
                 $rootScope.titles = $localStorage.titles;
             }
         };
@@ -277,6 +283,91 @@ main.controller('navigationController',
         };
     }
 ])
+.service('multipleChoiceService', ['$localStorage',
+    function ($localStorage) {
+        return {
+            selectedExtensions: {},
+            allExtensions: {},
+            someExtensionsSelected: false,
+            allExtensionsSelected: false,
+            isNewExtensionsMenuVisible: false,
+
+            addExtension: function (name, version) {
+                this.allExtensions[name] = {
+                    'name': name,
+                    'version': version
+                };
+            },
+            reset: function () {
+                this.allExtensions = {};
+                this.selectedExtensions = {};
+                this.someExtensionsSelected = false;
+                this.allExtensionsSelected = false;
+                this.isNewExtensionsMenuVisible = false;
+            },
+            updateSelectedExtensions: function ($event, name, version) {
+                var checkbox = $event.target;
+                if (checkbox.checked) {
+                    this.selectedExtensions[name] = {
+                        'name': name,
+                        'version': version
+                    };
+                    if (this._getObjectSize(this.selectedExtensions) == this._getObjectSize(this.allExtensions)) {
+                        this.someExtensionsSelected = false;
+                        this.allExtensionsSelected = true;
+                    } else {
+                        this.someExtensionsSelected = true;
+                        this.allExtensionsSelected = false;
+                    }
+                } else {
+                    delete this.selectedExtensions[name];
+                    this.allExtensionsSelected = false;
+                    this.someExtensionsSelected = (this._getObjectSize(this.selectedExtensions) > 0);
+                }
+            },
+            toggleNewExtensionsMenu: function() {
+                this.isNewExtensionsMenuVisible = !this.isNewExtensionsMenuVisible;
+            },
+            hideNewExtensionsMenu: function() {
+                this.isNewExtensionsMenuVisible = false;
+            },
+            selectAllExtensions: function() {
+                this.isNewExtensionsMenuVisible = false;
+                this.someExtensionsSelected = false;
+                this.allExtensionsSelected = true;
+                this.selectedExtensions = angular.copy(this.allExtensions);
+            },
+            deselectAllExtensions: function() {
+                this.isNewExtensionsMenuVisible = false;
+                this.someExtensionsSelected = false;
+                this.allExtensionsSelected = false;
+                this.selectedExtensions = {};
+            },
+            checkSelectedExtensions: function() {
+                var result = {error: false, errorMessage: ''};
+                if (this._getObjectSize(this.selectedExtensions) > 0) {
+                    result.error = false;
+                    result.errorMessage = '';
+                    $localStorage.packages = this.selectedExtensions;
+                } else {
+                    result.error = true;
+                    result.errorMessage = 'Please select at least one extension';
+                }
+
+                return result;
+            },
+            _getObjectSize: function (obj) {
+                var size = 0, key;
+                for (key in obj) {
+                    if (obj.hasOwnProperty(key)) {
+                        ++size;
+                    }
+                }
+                return size;
+            }
+        };
+    }
+])
 .filter('startFrom', function () {
     return function (input, start) {
         if (input !== undefined && start !== 'NaN') {
diff --git a/setup/pub/magento/setup/module-grid.js b/setup/pub/magento/setup/module-grid.js
index 7b9f53ddcf2bffc571e0f768ffd21198330c80f4..21dec8795f13505ca5ca8a5bcd08ac603cad2d94 100644
--- a/setup/pub/magento/setup/module-grid.js
+++ b/setup/pub/magento/setup/module-grid.js
@@ -66,7 +66,7 @@ angular.module('module-grid', ['ngStorage'])
                         isComposerPackage: component.name !== 'unknown',
                     }
                 ];
-                titleService.setTitle(type, component.moduleName ? component.moduleName : component.name);
+                titleService.setTitle(type, component);
                 $localStorage.componentType = component.type;
                 $state.go('root.readiness-check-'+type);
             };
diff --git a/setup/pub/magento/setup/readiness-check.js b/setup/pub/magento/setup/readiness-check.js
index 167651b062091731b778a47e8c01ee54ff879ff0..1b89ea2be06a5121c53b2ea8a97a681db067d0df 100644
--- a/setup/pub/magento/setup/readiness-check.js
+++ b/setup/pub/magento/setup/readiness-check.js
@@ -4,13 +4,14 @@
  */
 
 'use strict';
-angular.module('readiness-check', [])
+angular.module('readiness-check', ['remove-dialog'])
     .constant('COUNTER', 1)
-    .controller('readinessCheckController', ['$rootScope', '$scope', '$localStorage', '$http', '$timeout', '$sce', '$state', 'COUNTER', function ($rootScope, $scope, $localStorage, $http, $timeout, $sce, $state, COUNTER) {
+    .controller('readinessCheckController', ['$rootScope', '$scope', '$localStorage', '$http', '$timeout', '$sce', '$state', 'COUNTER', 'ngDialog', function ($rootScope, $scope, $localStorage, $http, $timeout, $sce, $state, COUNTER, ngDialog) {
         $scope.Object = Object;
         $scope.titles = $localStorage.titles;
         $scope.moduleName = $localStorage.moduleName;
         $scope.progressCounter = COUNTER;
+        $rootScope.needReCheck = false;
         $scope.startProgress = function() {
             ++$scope.progressCounter;
         };
@@ -112,24 +113,6 @@ angular.module('readiness-check', [])
             updaterNoticeMessage: ''
         };
         $scope.items = {
-            'php-version': {
-                url:'index.php/environment/php-version',
-                params: $scope.actionFrom,
-                useGet: true,
-                show: function() {
-                    $scope.startProgress();
-                    $scope.version.visible = true;
-                },
-                process: function(data) {
-                    $scope.version.processed = true;
-                    angular.extend($scope.version, data);
-                    $scope.updateOnProcessed($scope.version.responseType);
-                    $scope.stopProgress();
-                },
-                fail: function() {
-                    $scope.requestFailedHandler($scope.version);
-                }
-            },
             'php-settings': {
                 url:'index.php/environment/php-settings',
                 params: $scope.actionFrom,
@@ -172,6 +155,24 @@ angular.module('readiness-check', [])
         };
 
         if ($scope.actionFrom === 'installer') {
+            $scope.items['php-version'] = {
+                url:'index.php/environment/php-version',
+                params: $scope.actionFrom,
+                useGet: true,
+                show: function() {
+                    $scope.startProgress();
+                    $scope.version.visible = true;
+                },
+                process: function(data) {
+                    $scope.version.processed = true;
+                    angular.extend($scope.version, data);
+                    $scope.updateOnProcessed($scope.version.responseType);
+                    $scope.stopProgress();
+                },
+                fail: function() {
+                    $scope.requestFailedHandler($scope.version);
+                }
+            };
             $scope.items['file-permissions'] = {
                 url:'index.php/environment/file-permissions',
                 show: function() {
@@ -259,22 +260,20 @@ angular.module('readiness-check', [])
                     }
                 };
             }
-
         }
 
         $scope.isCompleted = function() {
-            return $scope.version.processed
-                && $scope.settings.processed
+            var cronProcessed = (
+                $scope.cronScript.processed
+                && ($scope.componentDependency.processed || !$scope.componentDependency.enabled)
+                && $scope.updater.processed
+            );
+
+            return $scope.settings.processed
                 && $scope.extensions.processed
                 && ($scope.permissions.processed || ($scope.actionFrom === 'updater'))
-                && (
-                    (
-                        $scope.cronScript.processed
-                        && ($scope.componentDependency.processed || !$scope.componentDependency.enabled)
-                        && $scope.updater.processed
-                    )
-                    || ($scope.actionFrom !== 'updater')
-                );
+                && ($scope.version.processed || ($scope.actionFrom === 'updater'))
+                && (cronProcessed || ($scope.actionFrom !== 'updater'));
         };
 
         $scope.updateOnProcessed = function(value) {
@@ -352,7 +351,7 @@ angular.module('readiness-check', [])
         $scope.wordingOfReadinessCheckAction = function() {
             var $actionString = 'We\'re making sure your server environment is ready for ';
             if ($localStorage.moduleName) {
-                $actionString += $localStorage.moduleName;
+                $actionString += $localStorage.packageTitle ? $localStorage.packageTitle : $localStorage.moduleName;
             } else {
                 if($state.current.type === 'install' || $state.current.type === 'upgrade') {
                     $actionString += 'Magento';
@@ -361,6 +360,9 @@ angular.module('readiness-check', [])
                     }
                 } else {
                     $actionString += 'package';
+                    if ($scope.getObjectSize($localStorage.packages) > 1) {
+                        $actionString += 's';
+                    }
                 }
             }
             $actionString += " to be " + $state.current.type;
@@ -369,6 +371,58 @@ angular.module('readiness-check', [])
             } else {
                 $actionString +='ed';
             }
+
+            if ($localStorage.moduleName
+                && $localStorage.packageTitle
+                && $localStorage.moduleName != $localStorage.packageTitle
+            ) {
+                $actionString += ', which consists of the following packages:<br/>- ' + $localStorage.moduleName;
+            }
+
             return $actionString;
-        }
+        };
+
+        $scope.getExtensionsList = function () {
+            return $scope.componentDependency.packages ? $scope.componentDependency.packages : {};
+        };
+
+        $scope.openDialog = function (name) {
+            $scope.extensionToRemove = name;
+            ngDialog.open({scope: $scope, template: 'removeDialog', controller: 'removeDialogController'});
+        };
+
+        $scope.getCurrentVersion = function (name) {
+            if ($scope.getExtensionInfo(name).hasOwnProperty('currentVersion')) {
+                return $scope.getExtensionInfo(name)['currentVersion'];
+            }
+            
+            return '';
+        };
+
+        $scope.getVersionsList = function (name) {
+            if ($scope.getExtensionInfo(name).hasOwnProperty('versions')) {
+                return $scope.getExtensionInfo(name)['versions'];
+            }
+
+            return {};
+        };
+
+        $scope.getExtensionInfo = function (name) {
+            var extensionsVersions = $localStorage.extensionsVersions;
+            return extensionsVersions.hasOwnProperty(name) ? extensionsVersions[name] : {};
+        };
+
+        $scope.versionChanged = function () {
+            $rootScope.needReCheck = true;
+        };
+
+        $scope.getObjectSize = function (obj) {
+            var size = 0, key;
+            for (key in obj) {
+                if (obj.hasOwnProperty(key)) {
+                    ++size;
+                }
+            }
+            return size;
+        };
     }]);
diff --git a/setup/pub/magento/setup/remove-dialog.js b/setup/pub/magento/setup/remove-dialog.js
new file mode 100644
index 0000000000000000000000000000000000000000..96a63ec5193b2e04b5a384e406c938e3fedfc58e
--- /dev/null
+++ b/setup/pub/magento/setup/remove-dialog.js
@@ -0,0 +1,16 @@
+/**
+ * Copyright © 2016 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+'use strict';
+angular.module('remove-dialog', [])
+    .controller('removeDialogController', ['$rootScope', '$scope', '$localStorage',
+        function ($rootScope, $scope, $localStorage) {
+            $scope.removeExtension = function (name) {
+                delete $scope.componentDependency.packages[name];
+                $localStorage.packages = $scope.componentDependency.packages;
+                $rootScope.needReCheck = true;
+                $scope.closeThisDialog();
+            };
+        }]);
diff --git a/setup/pub/magento/setup/start-updater.js b/setup/pub/magento/setup/start-updater.js
index ee9bc1e1c0df7c61cfc68ed9f4da85eedad32f1c..5b90c5333cdd15c16eb7aec382f8ebfb5fed9c82 100644
--- a/setup/pub/magento/setup/start-updater.js
+++ b/setup/pub/magento/setup/start-updater.js
@@ -31,7 +31,7 @@ angular.module('start-updater', ['ngStorage'])
             var payLoad = {
                 'packages': $scope.packages,
                 'type': $state.current.type,
-                'headerTitle': $scope.title,
+                'headerTitle': $scope.packages.size == 1 ? $scope.title : 'Process extensions',
                 'dataOption': $localStorage.dataOption
             };
             $http.post('index.php/start-updater/update', payLoad)
diff --git a/setup/pub/magento/setup/update-extension-grid.js b/setup/pub/magento/setup/update-extension-grid.js
index f28e0aa385af478c5770b740410fef1dd5bd4f62..8f7149bf1645ee0e98f81783131468bb6af097a0 100644
--- a/setup/pub/magento/setup/update-extension-grid.js
+++ b/setup/pub/magento/setup/update-extension-grid.js
@@ -5,15 +5,23 @@
 
 'use strict';
 angular.module('update-extension-grid', ['ngStorage', 'clickOut'])
-    .controller('updateExtensionGridController', ['$scope', '$http', '$localStorage', 'titleService', 'paginationService',
-        function ($scope, $http, $localStorage, titleService, paginationService) {
+    .controller('updateExtensionGridController', ['$scope', '$http', '$localStorage', 'titleService', 'authService', 'paginationService', 'multipleChoiceService',
+        function ($scope, $http, $localStorage, titleService, authService, paginationService, multipleChoiceService) {
             $scope.isHiddenSpinner = false;
 
             $http.get('index.php/updateExtensionGrid/extensions').success(function(data) {
                 $scope.error = false;
                 $scope.errorMessage = '';
+                $scope.extensionsVersions = {};
+                $scope.multipleChoiceService = multipleChoiceService;
+                $scope.multipleChoiceService.reset();
                 angular.forEach(data.extensions, function(extension) {
                     extension.updateVersion = extension.latestVersion;
+                    $scope.multipleChoiceService.addExtension(extension.name, extension.latestVersion);
+                    $scope.extensionsVersions[extension.name] = {
+                        'currentVersion': extension.version,
+                        'versions': extension.versions
+                    };
                 });
                 $scope.extensions = data.extensions;
                 $scope.total = data.total;
@@ -21,6 +29,7 @@ angular.module('update-extension-grid', ['ngStorage', 'clickOut'])
                 $scope.rowLimit = 20;
                 $scope.numberOfPages = Math.ceil($scope.total / $scope.rowLimit);
                 $scope.isHiddenSpinner = true;
+                $localStorage.extensionsVersions = $scope.extensionsVersions;
             });
 
             paginationService.initWatchers($scope);
@@ -39,8 +48,33 @@ angular.module('update-extension-grid', ['ngStorage', 'clickOut'])
                         version: extension.updateVersion
                     }
                 ];
-                titleService.setTitle('update', extension.name);
+                titleService.setTitle('update', extension);
                 $scope.nextState();
             };
+            $scope.isHiddenSpinner = true;
+            $scope.updateAll = function() {
+                $scope.isHiddenSpinner = false;
+                authService.checkAuth({
+                    success: function(response) {
+                        $scope.isHiddenSpinner = true;
+                        var result = $scope.multipleChoiceService.checkSelectedExtensions();
+                        $scope.error = result.error;
+                        $scope.errorMessage = result.errorMessage;
+
+                        if (!$scope.error) {
+                            $scope.nextState();
+                        }
+                    },
+                    fail: function(response) {
+                        $scope.isHiddenSpinner = true;
+                        authService.openAuthDialog($scope);
+                    },
+                    error: function() {
+                        $scope.isHiddenSpinner = true;
+                        $scope.error = true;
+                        $scope.errorMessage = 'Internal server error';
+                    }
+                });
+            };
         }
     ]);
diff --git a/setup/pub/styles/setup.css b/setup/pub/styles/setup.css
index 4ee5d4979d214c22cdcc95d707542ffd4afe892f..61893c04c3f160f7290ba3dcb8bef288fd25d5fe 100644
--- a/setup/pub/styles/setup.css
+++ b/setup/pub/styles/setup.css
@@ -3,4 +3,4 @@
  * See COPYING.txt for license details.
  */
 
-.abs-action-delete,.abs-icon,.action-close:before,.action-next:before,.action-previous:before,.admin-user .admin__action-dropdown:before,.admin__action-multiselect-dropdown:before,.admin__action-multiselect-search-label:before,.admin__control-checkbox+label:before,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete:before,.admin__control-table .action-delete:before,.admin__current-filters-list .action-remove:before,.admin__data-grid-action-bookmarks .action-delete:before,.admin__data-grid-action-bookmarks .action-edit:before,.admin__data-grid-action-bookmarks .action-submit:before,.admin__data-grid-action-bookmarks .admin__action-dropdown:before,.admin__data-grid-action-columns .admin__action-dropdown:before,.admin__data-grid-action-export .admin__action-dropdown:before,.admin__field-fallback-reset:before,.admin__menu .level-0>a:before,.admin__page-nav-item-message .admin__page-nav-item-message-icon,.admin__page-nav-title._collapsible:after,.data-grid-filters-action-wrap .action-default:before,.data-grid-row-changed:after,.data-grid-row-parent>td .data-grid-checkbox-cell-inner:before,.data-grid-search-control-wrap .action-submit:before,.icon-failed:before,.icon-success:before,.notifications-action:before,.notifications-close:before,.page-actions .page-actions-buttons>button.action-back:before,.page-actions .page-actions-buttons>button.back:before,.page-actions>button.action-back:before,.page-actions>button.back:before,.page-title-jumbo-success:before,.search-global-label:before,.selectmenu .action-delete:before,.selectmenu .action-edit:before,.selectmenu .action-save:before,.setup-home-item:before,.sticky-header .data-grid-search-control-wrap .data-grid-search-label:before,.store-switcher .dropdown-menu .dropdown-toolbar a:before,.tooltip .help a:before,.tooltip .help span:before{-webkit-font-smoothing:antialiased;font-family:Icons;font-style:normal;font-weight:400;line-height:1;speak:none}.validation-symbol:after{color:#e22626;content:'*';font-weight:400;margin-left:3px}.abs-modal-overlay,.modals-overlay{background:rgba(0,0,0,.35);bottom:0;left:0;position:fixed;right:0;top:0}.abs-action-delete>span,.abs-visually-hidden,.action-multicheck-wrap .action-multicheck-toggle>span,.admin__actions-switch-checkbox,.admin__control-fields .admin__field:nth-child(n+2):not(.admin__field-option):not(.admin__field-group-show-label)>.admin__field-label,.admin__field-tooltip .admin__field-tooltip-action span,.customize-your-store .customize-your-store-default .legend,.form-el-checkbox,.form-el-radio,.selectmenu .action-delete>span,.selectmenu .action-edit>span,.selectmenu .action-save>span,.selectmenu-toggle span,.tooltip .help a span,.tooltip .help span span,[class*=admin__control-grouped]>.admin__field:nth-child(n+2):not(.admin__field-option):not(.admin__field-group-show-label):not(.admin__field-date)>.admin__field-label{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.abs-visually-hidden-reset,.admin__field-group-columns>.admin__field:nth-child(n+2):not(.admin__field-option):not(.admin__field-group-show-label):not(.admin__field-date)>.admin__field-label[class]{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.abs-clearfix:after,.abs-clearfix:before,.action-multicheck-wrap:after,.action-multicheck-wrap:before,.actions-split:after,.actions-split:before,.admin__control-table-pagination:after,.admin__control-table-pagination:before,.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-content:after,.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-content:before,.admin__data-grid-filters-footer:after,.admin__data-grid-filters-footer:before,.admin__data-grid-filters:after,.admin__data-grid-filters:before,.admin__data-grid-header-row:after,.admin__data-grid-header-row:before,.admin__field-complex:after,.admin__field-complex:before,.modal-slide .magento-message .insert-title-inner:after,.modal-slide .magento-message .insert-title-inner:before,.modal-slide .main-col .insert-title-inner:after,.modal-slide .main-col .insert-title-inner:before,.page-actions._fixed:after,.page-actions._fixed:before,.page-content:after,.page-content:before,.page-header-actions:after,.page-header-actions:before,.page-main-actions:not(._hidden):after,.page-main-actions:not(._hidden):before{content:'';display:table}.abs-clearfix:after,.action-multicheck-wrap:after,.actions-split:after,.admin__control-table-pagination:after,.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-content:after,.admin__data-grid-filters-footer:after,.admin__data-grid-filters:after,.admin__data-grid-header-row:after,.admin__field-complex:after,.modal-slide .magento-message .insert-title-inner:after,.modal-slide .main-col .insert-title-inner:after,.page-actions._fixed:after,.page-content:after,.page-header-actions:after,.page-main-actions:not(._hidden):after{clear:both}.abs-list-reset-styles{margin:0;padding:0;list-style:none}.abs-draggable-handle,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .draggable-handle,.admin__control-table .draggable-handle,.data-grid .data-grid-draggable-row-cell .draggable-handle{cursor:-webkit-grab;cursor:move;font-size:0;margin-top:-4px;padding:0 1rem 0 0;vertical-align:middle;display:inline-block;text-decoration:none}.abs-draggable-handle:before,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .draggable-handle:before,.admin__control-table .draggable-handle:before,.data-grid .data-grid-draggable-row-cell .draggable-handle:before{-webkit-font-smoothing:antialiased;font-size:1.8rem;line-height:inherit;color:#9e9e9e;content:'\e617';font-family:Icons;vertical-align:middle;display:inline-block;font-weight:400;overflow:hidden;speak:none;text-align:center}.abs-draggable-handle:hover:before,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .draggable-handle:hover:before,.admin__control-table .draggable-handle:hover:before,.data-grid .data-grid-draggable-row-cell .draggable-handle:hover:before{color:#858585}.abs-config-scope-label,.admin__field:not(.admin__field-option)>.admin__field-label span[data-config-scope]:before{bottom:-1.3rem;color:gray;content:attr(data-config-scope);font-size:1.1rem;font-weight:400;min-width:15rem;position:absolute;right:0;text-transform:lowercase}.abs-word-wrap,.admin__field:not(.admin__field-option)>.admin__field-label{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box}*,:after,:before{box-sizing:inherit}:focus{box-shadow:none;outline:0}._keyfocus :focus{box-shadow:0 0 0 1px #008bdb}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}embed,img,object,video{max-width:100%}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@font-face{font-family:'Open Sans';src:url(../fonts/opensans/light/opensans-300.eot);src:url(../fonts/opensans/light/opensans-300.eot?#iefix) format('embedded-opentype'),url(../fonts/opensans/light/opensans-300.woff2) format('woff2'),url(../fonts/opensans/light/opensans-300.woff) format('woff'),url(../fonts/opensans/light/opensans-300.ttf) format('truetype'),url('../fonts/opensans/light/opensans-300.svg#Open Sans') format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Open Sans';src:url(../fonts/opensans/regular/opensans-400.eot);src:url(../fonts/opensans/regular/opensans-400.eot?#iefix) format('embedded-opentype'),url(../fonts/opensans/regular/opensans-400.woff2) format('woff2'),url(../fonts/opensans/regular/opensans-400.woff) format('woff'),url(../fonts/opensans/regular/opensans-400.ttf) format('truetype'),url('../fonts/opensans/regular/opensans-400.svg#Open Sans') format('svg');font-weight:400;font-style:normal}@font-face{font-family:'Open Sans';src:url(../fonts/opensans/semibold/opensans-600.eot);src:url(../fonts/opensans/semibold/opensans-600.eot?#iefix) format('embedded-opentype'),url(../fonts/opensans/semibold/opensans-600.woff2) format('woff2'),url(../fonts/opensans/semibold/opensans-600.woff) format('woff'),url(../fonts/opensans/semibold/opensans-600.ttf) format('truetype'),url('../fonts/opensans/semibold/opensans-600.svg#Open Sans') format('svg');font-weight:600;font-style:normal}@font-face{font-family:'Open Sans';src:url(../fonts/opensans/bold/opensans-700.eot);src:url(../fonts/opensans/bold/opensans-700.eot?#iefix) format('embedded-opentype'),url(../fonts/opensans/bold/opensans-700.woff2) format('woff2'),url(../fonts/opensans/bold/opensans-700.woff) format('woff'),url(../fonts/opensans/bold/opensans-700.ttf) format('truetype'),url('../fonts/opensans/bold/opensans-700.svg#Open Sans') format('svg');font-weight:700;font-style:normal}html{font-size:62.5%}body{color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;line-height:1.36;font-size:1.4rem}h1{margin:0 0 2rem;color:#41362f;font-weight:400;line-height:1.2;font-size:2.8rem}h2{margin:0 0 2rem;color:#41362f;font-weight:400;line-height:1.2;font-size:2rem}h3{margin:0 0 2rem;color:#41362f;font-weight:600;line-height:1.2;font-size:1.7rem}h4,h5,h6{font-weight:600;margin-top:0}p{margin:0 0 1em}small{font-size:1.2rem}a{color:#008bdb;text-decoration:none}a:hover{color:#0fa7ff;text-decoration:underline}dl,ol,ul{padding-left:0}nav ol,nav ul{list-style:none;margin:0;padding:0}html{height:100%}body{background-color:#fff;min-height:100%;min-width:102.4rem}.page-wrapper{background-color:#fff;display:inline-block;margin-left:-4px;vertical-align:top;width:calc(100% - 8.8rem)}.page-content{padding-bottom:3rem;padding-left:3rem;padding-right:3rem}.notices-wrapper{margin:0 3rem}.notices-wrapper .messages{margin-bottom:0}.row{margin-left:0;margin-right:0}.row:after{clear:both;content:'';display:table}.col-l-1,.col-l-10,.col-l-11,.col-l-12,.col-l-2,.col-l-3,.col-l-4,.col-l-5,.col-l-6,.col-l-7,.col-l-8,.col-l-9,.col-m-1,.col-m-10,.col-m-11,.col-m-12,.col-m-2,.col-m-3,.col-m-4,.col-m-5,.col-m-6,.col-m-7,.col-m-8,.col-m-9,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{min-height:1px;padding-left:0;padding-right:0;position:relative}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}.row-gutter{margin-left:-1.5rem;margin-right:-1.5rem}.row-gutter>[class*=col-]{padding-left:1.5rem;padding-right:1.5rem}.abs-clearer:after,.extension-manager-content:after,.extension-manager-title:after,.form-row:after,.header:after,.nav:after,body:after{clear:both;content:'';display:table}.ng-cloak{display:none!important}.hide.hide{display:none}.show.show{display:block}.text-center{text-align:center}.text-right{text-align:right}@font-face{font-family:Icons;src:url(../fonts/icons/icons.eot);src:url(../fonts/icons/icons.eot?#iefix) format('embedded-opentype'),url(../fonts/icons/icons.woff2) format('woff2'),url(../fonts/icons/icons.woff) format('woff'),url(../fonts/icons/icons.ttf) format('truetype'),url(../fonts/icons/icons.svg#Icons) format('svg');font-weight:400;font-style:normal}[class*=icon-]{display:inline-block;line-height:1}.icon-failed:before,.icon-success:before,[class*=icon-]:after{font-family:Icons}.icon-success{color:#79a22e}.icon-success:before{content:'\e62d'}.icon-failed{color:#e22626}.icon-failed:before{content:'\e632'}.icon-success-thick:after{content:'\e62d'}.icon-collapse:after{content:'\e615'}.icon-failed-thick:after{content:'\e632'}.icon-expand:after{content:'\e616'}.icon-warning:after{content:'\e623'}.icon-failed-round,.icon-success-round{border-radius:100%;color:#fff;font-size:2.5rem;height:1em;position:relative;text-align:center;width:1em}.icon-failed-round:after,.icon-success-round:after{bottom:0;font-size:.5em;left:0;position:absolute;right:0;top:.45em}.icon-success-round{background-color:#79a22e}.icon-success-round:after{content:'\e62d'}.icon-failed-round{background-color:#e22626}.icon-failed-round:after{content:'\e632'}dl,ol,ul{margin-top:0}.list{padding-left:0}.list>li{display:block;margin-bottom:.75em;position:relative}.list>li>.icon-failed,.list>li>.icon-success{font-size:1.6em;left:-.1em;position:absolute;top:0}.list>li>.icon-success{color:#79a22e}.list>li>.icon-failed{color:#e22626}.list-item-failed,.list-item-icon,.list-item-success,.list-item-warning{padding-left:3.5rem}.list-item-failed:before,.list-item-success:before,.list-item-warning:before{left:-.1em;position:absolute}.list-item-success:before{color:#79a22e}.list-item-failed:before{color:#e22626}.list-item-warning:before{color:#ef672f}.list-definition{margin:0 0 3rem;padding:0}.list-definition>dt{clear:left;float:left}.list-definition>dd{margin-bottom:1em;margin-left:20rem}.btn-wrap{margin:0 auto}.btn-wrap .btn{width:100%}.btn{background:#e3e3e3;border:none;color:#514943;display:inline-block;font-size:1.6rem;font-weight:600;padding:.45em .9em;text-align:center}.btn:hover{background-color:#dbdbdb;color:#514943;text-decoration:none}.btn:active{background-color:#d6d6d6}.btn.disabled,.btn[disabled]{cursor:default;opacity:.5;pointer-events:none}.ie9 .btn.disabled,.ie9 .btn[disabled]{background-color:#f0f0f0;opacity:1;text-shadow:none}.btn-large{padding:.75em 1.25em}.btn-medium{font-size:1.4rem;padding:.5em 1.5em .6em}.btn-link{background-color:transparent;border:none;color:#008bdb;font-family:1.6rem;font-size:1.5rem}.btn-link:active,.btn-link:focus,.btn-link:hover{background-color:transparent;color:#0fa7ff}.btn-prime{background-color:#eb5202;color:#fff;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.btn-prime:focus,.btn-prime:hover{background-color:#f65405;background-repeat:repeat-x;background-image:linear-gradient(to right,#e04f00 0,#f65405 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e04f00', endColorstr='#f65405', GradientType=1);color:#fff}.btn-prime:active{background-color:#e04f00;background-repeat:repeat-x;background-image:linear-gradient(to right,#f65405 0,#e04f00 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f65405', endColorstr='#e04f00', GradientType=1);color:#fff}.ie9 .btn-prime.disabled,.ie9 .btn-prime[disabled]{background-color:#fd6e23}.ie9 .btn-prime.disabled:active,.ie9 .btn-prime.disabled:hover,.ie9 .btn-prime[disabled]:active,.ie9 .btn-prime[disabled]:hover{background-color:#fd6e23;-webkit-filter:none;filter:none}.btn-secondary{background-color:#514943;color:#fff}.btn-secondary:hover{background-color:#5f564f;color:#fff}.btn-secondary:active,.btn-secondary:focus{background-color:#574e48;color:#fff}.ie9 .btn-secondary.disabled,.ie9 .btn-secondary[disabled]{background-color:#514943}.ie9 .btn-secondary.disabled:active,.ie9 .btn-secondary[disabled]:active{background-color:#514943;-webkit-filter:none;filter:none}[class*=btn-wrap-triangle]{overflow:hidden;position:relative}[class*=btn-wrap-triangle] .btn:after{border-style:solid;content:'';height:0;position:absolute;top:0;width:0}.btn-wrap-triangle-right{display:inline-block;padding-right:1.74rem;position:relative}.btn-wrap-triangle-right .btn{text-indent:.92rem}.btn-wrap-triangle-right .btn:after{border-color:transparent transparent transparent #e3e3e3;border-width:1.84rem 0 1.84rem 1.84rem;left:100%;margin-left:-1.74rem}.btn-wrap-triangle-right .btn:focus:after,.btn-wrap-triangle-right .btn:hover:after{border-left-color:#dbdbdb}.btn-wrap-triangle-right .btn:active:after{border-left-color:#d6d6d6}.btn-wrap-triangle-right .btn:not(.disabled):active,.btn-wrap-triangle-right .btn:not([disabled]):active{left:1px}.ie9 .btn-wrap-triangle-right .btn.disabled:after,.ie9 .btn-wrap-triangle-right .btn[disabled]:after{border-color:transparent transparent transparent #f0f0f0}.ie9 .btn-wrap-triangle-right .btn.disabled:active:after,.ie9 .btn-wrap-triangle-right .btn.disabled:focus:after,.ie9 .btn-wrap-triangle-right .btn.disabled:hover:after,.ie9 .btn-wrap-triangle-right .btn[disabled]:active:after,.ie9 .btn-wrap-triangle-right .btn[disabled]:focus:after,.ie9 .btn-wrap-triangle-right .btn[disabled]:hover:after{border-left-color:#f0f0f0}.btn-wrap-triangle-right .btn-prime:after{border-color:transparent transparent transparent #eb5202}.btn-wrap-triangle-right .btn-prime:focus:after,.btn-wrap-triangle-right .btn-prime:hover:after{border-left-color:#f65405}.btn-wrap-triangle-right .btn-prime:active:after{border-left-color:#e04f00}.btn-wrap-triangle-right .btn-prime:not(.disabled):active,.btn-wrap-triangle-right .btn-prime:not([disabled]):active{left:1px}.ie9 .btn-wrap-triangle-right .btn-prime.disabled:after,.ie9 .btn-wrap-triangle-right .btn-prime[disabled]:after{border-color:transparent transparent transparent #fd6e23}.ie9 .btn-wrap-triangle-right .btn-prime.disabled:active:after,.ie9 .btn-wrap-triangle-right .btn-prime.disabled:hover:after,.ie9 .btn-wrap-triangle-right .btn-prime[disabled]:active:after,.ie9 .btn-wrap-triangle-right .btn-prime[disabled]:hover:after{border-left-color:#fd6e23}.btn-wrap-triangle-left{display:inline-block;padding-left:1.74rem}.btn-wrap-triangle-left .btn{text-indent:-.92rem}.btn-wrap-triangle-left .btn:after{border-color:transparent #e3e3e3 transparent transparent;border-width:1.84rem 1.84rem 1.84rem 0;margin-right:-1.74rem;right:100%}.btn-wrap-triangle-left .btn:focus:after,.btn-wrap-triangle-left .btn:hover:after{border-right-color:#dbdbdb}.btn-wrap-triangle-left .btn:active:after{border-right-color:#d6d6d6}.btn-wrap-triangle-left .btn:not(.disabled):active,.btn-wrap-triangle-left .btn:not([disabled]):active{right:1px}.ie9 .btn-wrap-triangle-left .btn.disabled:after,.ie9 .btn-wrap-triangle-left .btn[disabled]:after{border-color:transparent #f0f0f0 transparent transparent}.ie9 .btn-wrap-triangle-left .btn.disabled:active:after,.ie9 .btn-wrap-triangle-left .btn.disabled:hover:after,.ie9 .btn-wrap-triangle-left .btn[disabled]:active:after,.ie9 .btn-wrap-triangle-left .btn[disabled]:hover:after{border-right-color:#f0f0f0}.btn-wrap-triangle-left .btn-prime:after{border-color:transparent #eb5202 transparent transparent}.btn-wrap-triangle-left .btn-prime:focus:after,.btn-wrap-triangle-left .btn-prime:hover:after{border-right-color:#e04f00}.btn-wrap-triangle-left .btn-prime:active:after{border-right-color:#f65405}.btn-wrap-triangle-left .btn-prime:not(.disabled):active,.btn-wrap-triangle-left .btn-prime:not([disabled]):active{right:1px}.ie9 .btn-wrap-triangle-left .btn-prime.disabled:after,.ie9 .btn-wrap-triangle-left .btn-prime[disabled]:after{border-color:transparent #fd6e23 transparent transparent}.ie9 .btn-wrap-triangle-left .btn-prime.disabled:active:after,.ie9 .btn-wrap-triangle-left .btn-prime.disabled:hover:after,.ie9 .btn-wrap-triangle-left .btn-prime[disabled]:active:after,.ie9 .btn-wrap-triangle-left .btn-prime[disabled]:hover:after{border-right-color:#fd6e23}.btn-expand{background-color:transparent;border:none;color:#303030;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.4rem;font-weight:700;padding:0;position:relative}.btn-expand.expanded:after{border-color:transparent transparent #303030;border-width:0 .285em .36em}.btn-expand.expanded:hover:after{border-color:transparent transparent #3d3d3d}.btn-expand:hover{background-color:transparent;border:none;color:#3d3d3d}.btn-expand:hover:after{border-color:#3d3d3d transparent transparent}.btn-expand:after{border-color:#303030 transparent transparent;border-style:solid;border-width:.36em .285em 0;content:'';height:0;left:100%;margin-left:.5em;margin-top:-.18em;position:absolute;top:50%;width:0}[class*=col-] .form-el-input,[class*=col-] .form-el-select{width:100%}.form-fieldset{border:none;margin:0 0 1em;padding:0}.form-row{margin-bottom:2.2rem}.form-row .form-row{margin-bottom:.4rem}.form-row .form-label{display:block;font-weight:600;padding:.6rem 2.1em 0 0;text-align:right}.form-row .form-label.required{position:relative}.form-row .form-label.required:after{color:#eb5202;content:'*';font-size:1.15em;position:absolute;right:.7em;top:.5em}.form-row .form-el-checkbox+.form-label:before,.form-row .form-el-radio+.form-label:before{top:.7rem}.form-row .form-el-checkbox+.form-label:after,.form-row .form-el-radio+.form-label:after{top:1.1rem}.form-row.form-row-text{padding-top:.6rem}.form-row.form-row-text .action-sign-out{font-size:1.2rem;margin-left:1rem}.form-note{font-size:1.2rem;font-weight:600;margin-top:1rem}.form-el-dummy{display:none}.fieldset{border:0;margin:0;min-width:0;padding:0}input:not([disabled]):focus,textarea:not([disabled]):focus{box-shadow:none}.form-el-input{border:1px solid #adadad;color:#303030;padding:.35em .55em .5em}.form-el-input:hover{border-color:#949494}.form-el-input:focus{border-color:#008bdb}.form-el-input:required{box-shadow:none}.form-label{margin-bottom:.5em}[class*=form-label][for]{cursor:pointer}.form-el-insider-wrap{display:table;width:100%}.form-el-insider-input{display:table-cell;width:100%}.form-el-insider{border-radius:2px;display:table-cell;padding:.43em .55em .5em 0;vertical-align:top}.form-legend,.form-legend-expand,.form-legend-light{display:block;margin:0}.form-legend,.form-legend-expand{font-size:1.25em;font-weight:600;margin-bottom:2.5em;padding-top:1.5em}.form-legend{border-top:1px solid #ccc;width:100%}.form-legend-light{font-size:1em;margin-bottom:1.5em}.form-legend-expand{cursor:pointer;transition:opacity .2s linear}.form-legend-expand:hover{opacity:.85}.form-legend-expand.expanded:after{content:'\e615'}.form-legend-expand:after{content:'\e616';font-family:Icons;font-size:1.15em;font-weight:400;margin-left:.5em;vertical-align:sub}.form-el-checkbox.disabled+.form-label,.form-el-checkbox.disabled+.form-label:before,.form-el-checkbox[disabled]+.form-label,.form-el-checkbox[disabled]+.form-label:before,.form-el-radio.disabled+.form-label,.form-el-radio.disabled+.form-label:before,.form-el-radio[disabled]+.form-label,.form-el-radio[disabled]+.form-label:before{cursor:default;opacity:.5;pointer-events:none}.form-el-checkbox:not(.disabled)+.form-label:hover:before,.form-el-checkbox:not([disabled])+.form-label:hover:before,.form-el-radio:not(.disabled)+.form-label:hover:before,.form-el-radio:not([disabled])+.form-label:hover:before{border-color:#514943}.form-el-checkbox+.form-label,.form-el-radio+.form-label{font-weight:400;padding-left:2em;padding-right:0;position:relative;text-align:left;transition:border-color .1s linear}.form-el-checkbox+.form-label:before,.form-el-radio+.form-label:before{border:1px solid;content:'';left:0;position:absolute;top:.1rem;transition:border-color .1s linear}.form-el-checkbox+.form-label:before{background-color:#fff;border-color:#adadad;border-radius:2px;font-size:1.2rem;height:1.6rem;line-height:1.2;width:1.6rem}.form-el-checkbox:checked+.form-label::before{content:'\e62d';font-family:Icons}.form-el-radio+.form-label:before{background-color:#fff;border:1px solid #adadad;border-radius:100%;height:1.8rem;width:1.8rem}.form-el-radio+.form-label:after{background:0 0;border:.5rem solid transparent;border-radius:100%;content:'';height:0;left:.4rem;position:absolute;top:.5rem;transition:background .3s linear;width:0}.form-el-radio:checked+.form-label{cursor:default}.form-el-radio:checked+.form-label:after{border-color:#514943}.form-select-label{border:1px solid #adadad;color:#303030;cursor:pointer;display:block;overflow:hidden;position:relative;z-index:0}.form-select-label:hover,.form-select-label:hover:after{border-color:#949494}.form-select-label:active,.form-select-label:active:after,.form-select-label:focus,.form-select-label:focus:after{border-color:#008bdb}.form-select-label:after{background:#e3e3e3;border-left:1px solid #adadad;bottom:0;content:'';position:absolute;right:0;top:0;width:2.36em;z-index:-2}.ie9 .form-select-label:after{display:none}.form-select-label:before{border-color:#303030 transparent transparent;border-style:solid;border-width:5px 4px 0;content:'';height:0;margin-right:-4px;margin-top:-2.5px;position:absolute;right:1.18em;top:50%;width:0;z-index:-1}.ie9 .form-select-label:before{display:none}.form-select-label .form-el-select{background:0 0;border:none;border-radius:0;content:'';display:block;margin:0;padding:.35em calc(2.36em + 10%) .5em .55em;width:110%}.ie9 .form-select-label .form-el-select{padding-right:.55em;width:100%}.form-select-label .form-el-select::-ms-expand{display:none}.form-el-select{background:#fff;border:1px solid #adadad;border-radius:2px;color:#303030;display:block;padding:.35em .55em}.multiselect-custom{border:1px solid #adadad;height:45.2rem;margin:0 0 1.5rem;overflow:auto;position:relative}.multiselect-custom ul{margin:0;padding:0;list-style:none;min-width:29rem}.multiselect-custom .item{padding:1rem 1.4rem}.multiselect-custom .selected{background-color:#e0f6fe}.multiselect-custom .form-label{margin-bottom:0}[class*=form-el-].invalid{border-color:#e22626}[class*=form-el-].invalid+.error-container{display:block}.error-container{background-color:#fffbbb;border:1px solid #ee7d7d;color:#514943;display:none;font-size:1.19rem;margin-top:.2rem;padding:.8rem 1rem .9rem}.check-result-message{margin-left:.5em;min-height:3.68rem;-ms-align-items:center;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.check-result-text{margin-left:.5em}body:not([class]){min-width:0}.container{display:block;margin:0 auto 4rem;max-width:100rem;padding:0}.abs-action-delete,.action-close:before,.action-next:before,.action-previous:before,.admin-user .admin__action-dropdown:before,.admin__action-multiselect-dropdown:before,.admin__action-multiselect-search-label:before,.admin__control-checkbox+label:before,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete:before,.admin__control-table .action-delete:before,.admin__current-filters-list .action-remove:before,.admin__data-grid-action-bookmarks .action-delete:before,.admin__data-grid-action-bookmarks .action-edit:before,.admin__data-grid-action-bookmarks .action-submit:before,.admin__data-grid-action-bookmarks .admin__action-dropdown:before,.admin__data-grid-action-columns .admin__action-dropdown:before,.admin__data-grid-action-export .admin__action-dropdown:before,.admin__field-fallback-reset:before,.admin__menu .level-0>a:before,.admin__page-nav-item-message .admin__page-nav-item-message-icon,.admin__page-nav-title._collapsible:after,.data-grid-filters-action-wrap .action-default:before,.data-grid-row-changed:after,.data-grid-row-parent>td .data-grid-checkbox-cell-inner:before,.data-grid-search-control-wrap .action-submit:before,.icon-failed:before,.icon-success:before,.notifications-action:before,.notifications-close:before,.page-actions .page-actions-buttons>button.action-back:before,.page-actions .page-actions-buttons>button.back:before,.page-actions>button.action-back:before,.page-actions>button.back:before,.page-title-jumbo-success:before,.search-global-label:before,.selectmenu .action-delete:before,.selectmenu .action-edit:before,.selectmenu .action-save:before,.setup-home-item:before,.sticky-header .data-grid-search-control-wrap .data-grid-search-label:before,.store-switcher .dropdown-menu .dropdown-toolbar a:before,.tooltip .help a:before,.tooltip .help span:before{-webkit-font-smoothing:antialiased;font-family:Icons;font-style:normal;font-weight:400;line-height:1;speak:none}.text-stretch{margin-bottom:1.5em}.page-title-jumbo{font-size:4rem;font-weight:300;letter-spacing:-.05em;margin-bottom:2.9rem}.page-title-jumbo-success:before{color:#79a22e;content:'\e62d';font-size:3.9rem;margin-left:-.3rem;margin-right:2.4rem}.list{margin-bottom:3rem}.list-dot .list-item{display:list-item;list-style-position:inside;margin-bottom:1.2rem}.list-title{color:#333;font-size:1.4rem;font-weight:700;letter-spacing:.025em;margin-bottom:1.2rem}.list-item-failed:before,.list-item-success:before,.list-item-warning:before{font-family:Icons;font-size:1.6rem;top:0}.list-item-success:before{content:'\e62d';font-size:1.6rem}.list-item-failed:before{content:'\e632';font-size:1.4rem;left:.1rem;top:.2rem}.list-item-warning:before{content:'\e623';font-size:1.3rem;left:.2rem}.form-wrap{margin-bottom:3.6rem;padding-top:2.1rem}.form-el-label-horizontal{display:inline-block;font-size:1.3rem;font-weight:600;letter-spacing:.025em;margin-bottom:.4rem;margin-left:.4rem}.app-updater{min-width:768px}body._has-modal{height:100%;overflow:hidden;width:100%}.modals-overlay{z-index:899}.modal-popup,.modal-slide{bottom:0;min-width:0;position:fixed;right:0;top:0;visibility:hidden}.modal-popup._show,.modal-slide._show{visibility:visible}.modal-popup._show .modal-inner-wrap,.modal-slide._show .modal-inner-wrap{-ms-transform:translate(0,0);transform:translate(0,0)}.modal-popup .modal-inner-wrap,.modal-slide .modal-inner-wrap{background-color:#fff;box-shadow:0 0 12px 2px rgba(0,0,0,.35);opacity:1;pointer-events:auto}.modal-slide{left:14.8rem;z-index:900}.modal-slide._show .modal-inner-wrap{-ms-transform:translateX(0);transform:translateX(0)}.modal-slide .modal-inner-wrap{height:100%;overflow-y:auto;position:static;-ms-transform:translateX(100%);transform:translateX(100%);transition-duration:.3s;transition-property:transform,visibility;transition-timing-function:ease-in-out;width:auto}.modal-slide._inner-scroll .modal-inner-wrap{overflow-y:visible;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.modal-slide._inner-scroll .modal-footer,.modal-slide._inner-scroll .modal-header{-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.modal-slide._inner-scroll .modal-content{overflow-y:auto}.modal-slide._inner-scroll .modal-footer{margin-top:auto}.modal-slide .modal-content,.modal-slide .modal-footer,.modal-slide .modal-header{padding:0 2.6rem 2.6rem}.modal-slide .modal-header{padding-bottom:2.1rem;padding-top:2.1rem}.modal-popup{z-index:900;left:0;overflow-y:auto}.modal-popup._show .modal-inner-wrap{-ms-transform:translateY(0);transform:translateY(0)}.modal-popup .modal-inner-wrap{margin:5rem auto;width:75%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;box-sizing:border-box;height:auto;left:0;position:absolute;right:0;-ms-transform:translateY(-200%);transform:translateY(-200%);transition-duration:.2s;transition-property:transform,visibility;transition-timing-function:ease}.modal-popup._inner-scroll{overflow-y:visible}.ie10 .modal-popup._inner-scroll,.ie9 .modal-popup._inner-scroll{overflow-y:auto}.modal-popup._inner-scroll .modal-inner-wrap{max-height:90%}.ie10 .modal-popup._inner-scroll .modal-inner-wrap,.ie9 .modal-popup._inner-scroll .modal-inner-wrap{max-height:none}.modal-popup._inner-scroll .modal-content{overflow-y:auto}.modal-popup .modal-content,.modal-popup .modal-footer,.modal-popup .modal-header{padding-left:3rem;padding-right:3rem}.modal-popup .modal-footer,.modal-popup .modal-header{-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.modal-popup .modal-header{padding-bottom:1.2rem;padding-top:3rem}.modal-popup .modal-footer{margin-top:auto;padding-bottom:3rem}.modal-popup .modal-footer-actions{text-align:right}.admin__action-dropdown-wrap{display:inline-block;position:relative}.admin__action-dropdown-wrap .admin__action-dropdown-text:after{left:-6px;right:0}.admin__action-dropdown-wrap .admin__action-dropdown-menu{left:auto;right:0}.admin__action-dropdown-wrap._active .admin__action-dropdown,.admin__action-dropdown-wrap.active .admin__action-dropdown{border-color:#007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5)}.admin__action-dropdown-wrap._active .admin__action-dropdown-text:after,.admin__action-dropdown-wrap.active .admin__action-dropdown-text:after{background-color:#fff;content:'';height:6px;position:absolute;top:100%}.admin__action-dropdown-wrap._active .admin__action-dropdown-menu,.admin__action-dropdown-wrap.active .admin__action-dropdown-menu{display:block}.admin__action-dropdown-wrap._disabled .admin__action-dropdown{cursor:default}.admin__action-dropdown-wrap._disabled:hover .admin__action-dropdown{color:#333}.admin__action-dropdown{background-color:#fff;border:1px solid transparent;border-bottom:none;border-radius:0;box-shadow:none;color:#333;display:inline-block;font-size:1.3rem;font-weight:400;letter-spacing:-.025em;padding:.7rem 3.3rem .8rem 1.5rem;position:relative;vertical-align:baseline;z-index:2}.admin__action-dropdown._active:after,.admin__action-dropdown.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.admin__action-dropdown:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;top:50%;transition:all .2s linear;width:0}._active .admin__action-dropdown:after,.active .admin__action-dropdown:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.admin__action-dropdown:hover:after{border-color:#000 transparent transparent}.admin__action-dropdown:focus,.admin__action-dropdown:hover{background-color:#fff;color:#000;text-decoration:none}.admin__action-dropdown:after{right:1.5rem}.admin__action-dropdown:before{margin-right:1rem}.admin__action-dropdown-menu{background-color:#fff;border:1px solid #007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5);display:none;line-height:1.36;margin-top:-1px;min-width:120%;padding:.5rem 1rem;position:absolute;top:100%;transition:all .15s ease;z-index:1}.admin__action-dropdown-menu>li{display:block}.admin__action-dropdown-menu>li>a{color:#333;display:block;text-decoration:none;padding:.6rem .5rem}.selectmenu{display:inline-block;position:relative;text-align:left;z-index:1}.selectmenu._active{border-color:#007bdb;z-index:500}.selectmenu .action-delete,.selectmenu .action-edit,.selectmenu .action-save{background-color:transparent;border-color:transparent;box-shadow:none;padding:0 1rem}.selectmenu .action-delete:hover,.selectmenu .action-edit:hover,.selectmenu .action-save:hover{background-color:transparent;border-color:transparent;box-shadow:none}.selectmenu .action-delete:before,.selectmenu .action-edit:before,.selectmenu .action-save:before{content:'\e630'}.selectmenu .action-delete,.selectmenu .action-edit{border:0 solid #fff;border-left-width:1px;bottom:0;position:absolute;right:0;top:0;z-index:1}.selectmenu .action-delete:hover,.selectmenu .action-edit:hover{border:0 solid #fff;border-left-width:1px}.selectmenu .action-save:before{content:'\e625'}.selectmenu .action-edit:before{content:'\e631'}.selectmenu-value{display:inline-block}.selectmenu-value input[type=text]{-moz-appearance:none;-webkit-appearance:none;appearance:none;border:0;display:inline;margin:0;width:6rem}body._keyfocus .selectmenu-value input[type=text]:focus{box-shadow:none}.selectmenu-toggle{padding-right:3rem;background:0 0;border-width:0;bottom:0;float:right;position:absolute;right:0;top:0;width:0}.selectmenu-toggle._active:after,.selectmenu-toggle.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.selectmenu-toggle:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;right:1.1rem;top:50%;transition:all .2s linear;width:0}._active .selectmenu-toggle:after,.active .selectmenu-toggle:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.selectmenu-toggle:hover:after{border-color:#000 transparent transparent}.selectmenu-toggle:active,.selectmenu-toggle:focus,.selectmenu-toggle:hover{background:0 0}.selectmenu._active .selectmenu-toggle:before{border-color:#007bdb}body._keyfocus .selectmenu-toggle:focus{box-shadow:none}.selectmenu-toggle:before{background:#e3e3e3;border-left:1px solid #adadad;bottom:0;content:'';display:block;position:absolute;right:0;top:0;width:3.2rem}.selectmenu-items{background:#fff;border:1px solid #007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5);display:none;float:left;left:-1px;margin-top:3px;max-width:20rem;min-width:calc(100% + 2px);position:absolute;top:100%}.selectmenu-items._active{display:block}.selectmenu-items ul{float:left;list-style-type:none;margin:0;min-width:100%;padding:0}.selectmenu-items li{-webkit-flex-direction:row;display:flex;-ms-flex-direction:row;flex-direction:row;transition:background .2s linear}.selectmenu-items li:hover{background:#e3e3e3}.selectmenu-items li:last-child .selectmenu-item-action,.selectmenu-items li:last-child .selectmenu-item-action:visited{color:#008bdb;text-decoration:none}.selectmenu-items li:last-child .selectmenu-item-action:hover{color:#0fa7ff;text-decoration:underline}.selectmenu-items li:last-child .selectmenu-item-action:active{color:#ff5501;text-decoration:underline}.selectmenu-item{position:relative;width:100%;z-index:1}li._edit>.selectmenu-item{display:none}.selectmenu-item-edit{display:none;padding:.3rem 4rem .3rem .4rem;position:relative;white-space:nowrap;z-index:1}li:last-child .selectmenu-item-edit{padding-right:.4rem}.selectmenu-item-edit .admin__control-text{margin:0;width:5.4rem}li._edit .selectmenu-item-edit{display:block}.selectmenu-item-action{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:0 0;border:0;color:#333;display:block;font-size:1.4rem;font-weight:400;min-width:100%;padding:1rem 6rem 1rem 1.5rem;text-align:left;transition:background .2s linear;width:5rem}.selectmenu-item-action:focus,.selectmenu-item-action:hover{background:#e3e3e3}.abs-actions-split-xl .action-default,.page-actions .actions-split .action-default{margin-right:4rem}.abs-actions-split-xl .action-toggle,.page-actions .actions-split .action-toggle{padding-right:4rem}.abs-actions-split-xl .action-toggle:after,.page-actions .actions-split .action-toggle:after{border-width:.9rem .6rem 0;margin-top:-.3rem;right:1.4rem}.actions-split{position:relative;z-index:400}.actions-split._active,.actions-split.active,.actions-split:hover{box-shadow:0 0 0 1px #007bdb}.actions-split._active .action-toggle.action-primary,.actions-split._active .action-toggle.primary,.actions-split.active .action-toggle.action-primary,.actions-split.active .action-toggle.primary{background-color:#ba4000;border-color:#ba4000}.actions-split._active .dropdown-menu,.actions-split.active .dropdown-menu{opacity:1;visibility:visible;display:block}.actions-split .action-default,.actions-split .action-toggle{float:left;margin:0}.actions-split .action-default._active,.actions-split .action-default.active,.actions-split .action-default:hover,.actions-split .action-toggle._active,.actions-split .action-toggle.active,.actions-split .action-toggle:hover{box-shadow:none}.actions-split .action-default{margin-right:3.2rem;min-width:9.3rem}.actions-split .action-toggle{padding-right:3.2rem;border-left-color:rgba(0,0,0,.2);bottom:0;padding-left:0;position:absolute;right:0;top:0}.actions-split .action-toggle._active:after,.actions-split .action-toggle.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.actions-split .action-toggle:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;right:1.2rem;top:50%;transition:all .2s linear;width:0}._active .actions-split .action-toggle:after,.active .actions-split .action-toggle:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.actions-split .action-toggle:hover:after{border-color:#000 transparent transparent}.actions-split .action-toggle.action-primary:after,.actions-split .action-toggle.action-secondary:after,.actions-split .action-toggle.primary:after,.actions-split .action-toggle.secondary:after{border-color:#fff transparent transparent}.actions-split .action-toggle>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.action-select-wrap{display:inline-block;position:relative}.action-select-wrap .action-select{padding-right:3.2rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#fff;font-weight:400;text-align:left}.action-select-wrap .action-select._active:after,.action-select-wrap .action-select.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-select-wrap .action-select:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;right:1.2rem;top:50%;transition:all .2s linear;width:0}._active .action-select-wrap .action-select:after,.active .action-select-wrap .action-select:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-select-wrap .action-select:hover:after{border-color:#000 transparent transparent}.action-select-wrap .action-select:hover,.action-select-wrap .action-select:hover:before{border-color:#878787}.action-select-wrap .action-select:before{background-color:#e3e3e3;border:1px solid #adadad;bottom:0;content:'';position:absolute;right:0;top:0;width:3.2rem}.action-select-wrap .action-select._active{border-color:#007bdb}.action-select-wrap .action-select._active:before{border-color:#007bdb #007bdb #007bdb #adadad}.action-select-wrap .action-select[disabled]{color:#333}.action-select-wrap .action-select[disabled]:after{border-color:#333 transparent transparent}.action-select-wrap._active{z-index:500}.action-select-wrap._active .action-select,.action-select-wrap._active .action-select:before{border-color:#007bdb}.action-select-wrap._active .action-select:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-select-wrap .abs-action-menu .action-submenu,.action-select-wrap .abs-action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu,.action-select-wrap .action-menu .action-submenu,.action-select-wrap .actions-split .action-menu .action-submenu,.action-select-wrap .actions-split .action-menu .action-submenu .action-submenu,.action-select-wrap .actions-split .dropdown-menu .action-submenu,.action-select-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{max-height:45rem;overflow-y:auto}.action-select-wrap .abs-action-menu .action-submenu ._disabled:hover,.action-select-wrap .abs-action-menu .action-submenu .action-submenu ._disabled:hover,.action-select-wrap .action-menu ._disabled:hover,.action-select-wrap .action-menu .action-submenu ._disabled:hover,.action-select-wrap .actions-split .action-menu .action-submenu ._disabled:hover,.action-select-wrap .actions-split .action-menu .action-submenu .action-submenu ._disabled:hover,.action-select-wrap .actions-split .dropdown-menu .action-submenu ._disabled:hover,.action-select-wrap .actions-split .dropdown-menu .action-submenu .action-submenu ._disabled:hover{background:#fff}.action-select-wrap .abs-action-menu .action-submenu ._disabled .action-menu-item,.action-select-wrap .abs-action-menu .action-submenu .action-submenu ._disabled .action-menu-item,.action-select-wrap .action-menu ._disabled .action-menu-item,.action-select-wrap .action-menu .action-submenu ._disabled .action-menu-item,.action-select-wrap .actions-split .action-menu .action-submenu ._disabled .action-menu-item,.action-select-wrap .actions-split .action-menu .action-submenu .action-submenu ._disabled .action-menu-item,.action-select-wrap .actions-split .dropdown-menu .action-submenu ._disabled .action-menu-item,.action-select-wrap .actions-split .dropdown-menu .action-submenu .action-submenu ._disabled .action-menu-item{cursor:default;opacity:.5}.action-select-wrap .action-menu-items{left:0;position:absolute;right:0;top:100%}.action-select-wrap .action-menu-items>.abs-action-menu .action-submenu,.action-select-wrap .action-menu-items>.abs-action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.action-menu,.action-select-wrap .action-menu-items>.action-menu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .action-menu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .dropdown-menu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .dropdown-menu .action-submenu .action-submenu{min-width:100%;position:static}.action-select-wrap .action-menu-items>.abs-action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.abs-action-menu .action-submenu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.action-menu .action-submenu,.action-select-wrap .action-menu-items>.action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .action-menu .action-submenu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .dropdown-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .dropdown-menu .action-submenu .action-submenu .action-submenu{position:absolute}.action-multicheck-wrap{display:inline-block;height:1.6rem;padding-top:1px;position:relative;width:3.1rem;z-index:200}.action-multicheck-wrap:hover .action-multicheck-toggle,.action-multicheck-wrap:hover .admin__control-checkbox+label:before{border-color:#878787}.action-multicheck-wrap._active .action-multicheck-toggle,.action-multicheck-wrap._active .admin__control-checkbox+label:before{border-color:#007bdb}.action-multicheck-wrap._active .abs-action-menu .action-submenu,.action-multicheck-wrap._active .abs-action-menu .action-submenu .action-submenu,.action-multicheck-wrap._active .action-menu,.action-multicheck-wrap._active .action-menu .action-submenu,.action-multicheck-wrap._active .actions-split .action-menu .action-submenu,.action-multicheck-wrap._active .actions-split .action-menu .action-submenu .action-submenu,.action-multicheck-wrap._active .actions-split .dropdown-menu .action-submenu,.action-multicheck-wrap._active .actions-split .dropdown-menu .action-submenu .action-submenu{opacity:1;visibility:visible;display:block}.action-multicheck-wrap._disabled .admin__control-checkbox+label:before{background-color:#fff}.action-multicheck-wrap._disabled .action-multicheck-toggle,.action-multicheck-wrap._disabled .admin__control-checkbox+label:before{border-color:#adadad;opacity:1}.action-multicheck-wrap .action-multicheck-toggle,.action-multicheck-wrap .admin__control-checkbox,.action-multicheck-wrap .admin__control-checkbox+label{float:left}.action-multicheck-wrap .action-multicheck-toggle{border-radius:0 1px 1px 0;height:1.6rem;margin-left:-1px;padding:0;position:relative;transition:border-color .1s linear;width:1.6rem}.action-multicheck-wrap .action-multicheck-toggle._active:after,.action-multicheck-wrap .action-multicheck-toggle.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-multicheck-wrap .action-multicheck-toggle:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;top:50%;transition:all .2s linear;width:0}._active .action-multicheck-wrap .action-multicheck-toggle:after,.active .action-multicheck-wrap .action-multicheck-toggle:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-multicheck-wrap .action-multicheck-toggle:hover:after{border-color:#000 transparent transparent}.action-multicheck-wrap .action-multicheck-toggle:focus{border-color:#007bdb}.action-multicheck-wrap .action-multicheck-toggle:after{right:.3rem}.action-multicheck-wrap .abs-action-menu .action-submenu,.action-multicheck-wrap .abs-action-menu .action-submenu .action-submenu,.action-multicheck-wrap .action-menu,.action-multicheck-wrap .action-menu .action-submenu,.action-multicheck-wrap .actions-split .action-menu .action-submenu,.action-multicheck-wrap .actions-split .action-menu .action-submenu .action-submenu,.action-multicheck-wrap .actions-split .dropdown-menu .action-submenu,.action-multicheck-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{left:-1.1rem;margin-top:1px;right:auto;text-align:left}.action-multicheck-wrap .action-menu-item{white-space:nowrap}.admin__action-multiselect-wrap{display:block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.admin__action-multiselect-wrap.action-select-wrap:focus{box-shadow:none}.admin__action-multiselect-wrap.action-select-wrap .abs-action-menu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .abs-action-menu .action-submenu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .action-menu,.admin__action-multiselect-wrap.action-select-wrap .action-menu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .actions-split .action-menu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .actions-split .action-menu .action-submenu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .actions-split .dropdown-menu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{max-height:none;overflow-y:inherit}.admin__action-multiselect-wrap .action-menu-item{transition:background-color .1s linear}.admin__action-multiselect-wrap .action-menu-item._selected{background-color:#e0f6fe}.admin__action-multiselect-wrap .action-menu-item._hover{background-color:#e3e3e3}.admin__action-multiselect-wrap .action-menu-item._unclickable{cursor:default}.admin__action-multiselect-wrap .admin__action-multiselect{border:1px solid #adadad;cursor:pointer;display:block;min-height:3.2rem;padding-right:3.6rem;white-space:normal}.admin__action-multiselect-wrap .admin__action-multiselect:after{bottom:1.25rem;top:auto}.admin__action-multiselect-wrap .admin__action-multiselect:before{height:3.3rem;top:auto}.admin__control-table-wrapper .admin__action-multiselect-wrap{position:static}.admin__control-table-wrapper .admin__action-multiselect-wrap .admin__action-multiselect{position:relative}.admin__control-table-wrapper .admin__action-multiselect-wrap .admin__action-multiselect:before{right:-1px;top:-1px}.admin__control-table-wrapper .admin__action-multiselect-wrap .abs-action-menu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .abs-action-menu .action-submenu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .action-menu,.admin__control-table-wrapper .admin__action-multiselect-wrap .action-menu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .actions-split .action-menu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .actions-split .action-menu .action-submenu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .actions-split .dropdown-menu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{left:auto;min-width:34rem;right:auto;top:auto;z-index:1}.admin__action-multiselect-wrap .admin__action-multiselect-item-path{color:#a79d95;font-size:1.2rem;font-weight:400;padding-left:1rem}.admin__action-multiselect-actions-wrap{border-top:1px solid #e3e3e3;margin:0 1rem;padding:1rem 0;text-align:center}.admin__action-multiselect-actions-wrap .action-default{font-size:1.3rem;min-width:13rem}.admin__action-multiselect-text{padding:.6rem 1rem}.abs-action-menu .action-submenu,.abs-action-menu .action-submenu .action-submenu,.action-menu,.action-menu .action-submenu,.actions-split .action-menu .action-submenu,.actions-split .action-menu .action-submenu .action-submenu,.actions-split .dropdown-menu .action-submenu,.actions-split .dropdown-menu .action-submenu .action-submenu{text-align:left}.admin__action-multiselect-label{cursor:pointer;position:relative;z-index:1}.admin__action-multiselect-label:before{margin-right:.5rem}._unclickable .admin__action-multiselect-label{cursor:default;font-weight:700}.admin__action-multiselect-search-wrap{border-bottom:1px solid #e3e3e3;margin:0 1rem;padding:1rem 0;position:relative}.admin__action-multiselect-search{padding-right:3rem;width:100%}.admin__action-multiselect-search-label{display:block;font-size:1.5rem;height:1em;overflow:hidden;position:absolute;right:2.2rem;top:1.7rem;width:1em}.admin__action-multiselect-search-label:before{content:'\e60c'}.admin__action-multiselect-search-count{color:#a79d95;margin-top:1rem}.admin__action-multiselect-menu-inner{margin-bottom:0;max-height:46rem;overflow-y:auto}.admin__action-multiselect-menu-inner .admin__action-multiselect-menu-inner{list-style:none;max-height:none;overflow:hidden;padding-left:2.2rem}.admin__action-multiselect-menu-inner ._hidden{display:none}.admin__action-multiselect-crumb{background-color:#f5f5f5;border:1px solid #a79d95;border-radius:1px;display:inline-block;font-size:1.2rem;margin:.3rem -4px .3rem .3rem;padding:.3rem 2.4rem .4rem 1rem;position:relative;transition:border-color .1s linear}.admin__action-multiselect-crumb:hover{border-color:#908379}.admin__action-multiselect-crumb .action-close{bottom:0;font-size:.5em;position:absolute;right:0;top:0;width:2rem}.admin__action-multiselect-crumb .action-close:hover{color:#000}.admin__action-multiselect-crumb .action-close:active,.admin__action-multiselect-crumb .action-close:focus{background-color:transparent}.admin__action-multiselect-crumb .action-close:active{-ms-transform:scale(0.9);transform:scale(0.9)}.admin__action-multiselect-tree .abs-action-menu .action-submenu,.admin__action-multiselect-tree .abs-action-menu .action-submenu .action-submenu,.admin__action-multiselect-tree .action-menu,.admin__action-multiselect-tree .action-menu .action-submenu,.admin__action-multiselect-tree .actions-split .action-menu .action-submenu,.admin__action-multiselect-tree .actions-split .action-menu .action-submenu .action-submenu,.admin__action-multiselect-tree .actions-split .dropdown-menu .action-submenu,.admin__action-multiselect-tree .actions-split .dropdown-menu .action-submenu .action-submenu{min-width:34.7rem}.admin__action-multiselect-tree .abs-action-menu .action-submenu .action-menu-item,.admin__action-multiselect-tree .abs-action-menu .action-submenu .action-submenu .action-menu-item,.admin__action-multiselect-tree .action-menu .action-menu-item,.admin__action-multiselect-tree .action-menu .action-submenu .action-menu-item,.admin__action-multiselect-tree .actions-split .action-menu .action-submenu .action-menu-item,.admin__action-multiselect-tree .actions-split .action-menu .action-submenu .action-submenu .action-menu-item,.admin__action-multiselect-tree .actions-split .dropdown-menu .action-submenu .action-menu-item,.admin__action-multiselect-tree .actions-split .dropdown-menu .action-submenu .action-submenu .action-menu-item{margin-top:.1rem}.admin__action-multiselect-tree .action-menu-item{margin-left:4.2rem;position:relative}.admin__action-multiselect-tree .action-menu-item._expended:before{border-left:1px dashed #a79d95;bottom:0;content:'';left:-1rem;position:absolute;top:1rem;width:1px}.admin__action-multiselect-tree .action-menu-item._expended .admin__action-multiselect-dropdown:before{content:'\e615'}.admin__action-multiselect-tree .action-menu-item._with-checkbox .admin__action-multiselect-label{padding-left:2.6rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner{position:relative}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner .admin__action-multiselect-menu-inner{padding-left:3.2rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner .admin__action-multiselect-menu-inner:before{left:4.3rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item{position:relative}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:last-child:before{height:2.1rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:after,.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:before{content:'';left:0;position:absolute}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:after{border-top:1px dashed #a79d95;height:1px;top:2.1rem;width:5.2rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:before{border-left:1px dashed #a79d95;height:100%;top:0;width:1px}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._parent:after{width:4.2rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root{margin-left:-1rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root:after{left:3.2rem;width:2.2rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root:before{left:3.2rem;top:1rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root._parent:after{display:none}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root:first-child:before{top:2.1rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root:last-child:before{height:1rem}.admin__action-multiselect-tree .admin__action-multiselect-label{line-height:2.2rem;vertical-align:middle;word-break:break-all}.admin__action-multiselect-tree .admin__action-multiselect-label:before{left:0;position:absolute;top:.4rem}.admin__action-multiselect-dropdown{border-radius:50%;height:2.2rem;left:-2.2rem;position:absolute;top:1rem;width:2.2rem;z-index:1}.admin__action-multiselect-dropdown:before{background:#fff;color:#a79d95;content:'\e616';font-size:2.2rem}.admin__actions-switch{display:inline-block;position:relative;vertical-align:middle}.admin__field-control .admin__actions-switch{line-height:3.2rem}.admin__actions-switch+.admin__field-service{min-width:34rem}._disabled .admin__actions-switch-checkbox+.admin__actions-switch-label,.admin__actions-switch-checkbox.disabled+.admin__actions-switch-label{cursor:not-allowed;opacity:.5;pointer-events:none}.admin__actions-switch-checkbox:checked+.admin__actions-switch-label:before{left:15px}.admin__actions-switch-checkbox:checked+.admin__actions-switch-label:after{background:#79a22e}.admin__actions-switch-checkbox:checked+.admin__actions-switch-label .admin__actions-switch-text:before{content:attr(data-text-on)}.admin__actions-switch-checkbox:focus+.admin__actions-switch-label:after,.admin__actions-switch-checkbox:focus+.admin__actions-switch-label:before{border-color:#007bdb}._error .admin__actions-switch-checkbox+.admin__actions-switch-label:after,._error .admin__actions-switch-checkbox+.admin__actions-switch-label:before{border-color:#e22626}.admin__actions-switch-label{cursor:pointer;display:inline-block;height:22px;line-height:22px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}.admin__actions-switch-label:after,.admin__actions-switch-label:before{left:0;position:absolute;right:auto;top:0}.admin__actions-switch-label:before{background:#fff;border:1px solid #aaa6a0;border-radius:100%;content:'';display:block;height:22px;transition:left .2s ease-in 0s;width:22px;z-index:1}.admin__actions-switch-label:after{background:#e3e3e3;border:1px solid #aaa6a0;border-radius:12px;content:'';display:block;height:22px;transition:background .2s ease-in 0s;vertical-align:middle;width:37px;z-index:0}.admin__actions-switch-text:before{content:attr(data-text-off);padding-left:47px;white-space:nowrap}.abs-action-delete,.abs-action-reset,.action-close,.admin__field-fallback-reset,.notifications-close,.search-global-field._active .search-global-action{background-color:transparent;border:none;border-radius:0;box-shadow:none;margin:0;padding:0}.abs-action-delete:hover,.abs-action-reset:hover,.action-close:hover,.admin__field-fallback-reset:hover,.notifications-close:hover,.search-global-field._active .search-global-action:hover{background-color:transparent;border:none;box-shadow:none}.abs-action-default,.abs-action-pattern,.abs-action-primary,.abs-action-quaternary,.abs-action-secondary,.abs-action-tertiary,.action-default,.action-primary,.action-quaternary,.action-secondary,.action-tertiary,.modal-popup .modal-footer .action-primary,.modal-popup .modal-footer .action-secondary,.page-actions .page-actions-buttons>button,.page-actions .page-actions-buttons>button.action-primary,.page-actions .page-actions-buttons>button.action-secondary,.page-actions .page-actions-buttons>button.primary,.page-actions>button,.page-actions>button.action-primary,.page-actions>button.action-secondary,.page-actions>button.primary,button,button.primary,button.secondary,button.tertiary{border:1px solid;border-radius:0;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.4rem;font-weight:600;line-height:1.36;padding:.6rem 1em;text-align:center;vertical-align:baseline}.abs-action-default.disabled,.abs-action-default[disabled],.abs-action-pattern.disabled,.abs-action-pattern[disabled],.abs-action-primary.disabled,.abs-action-primary[disabled],.abs-action-quaternary.disabled,.abs-action-quaternary[disabled],.abs-action-secondary.disabled,.abs-action-secondary[disabled],.abs-action-tertiary.disabled,.abs-action-tertiary[disabled],.action-default.disabled,.action-default[disabled],.action-primary.disabled,.action-primary[disabled],.action-quaternary.disabled,.action-quaternary[disabled],.action-secondary.disabled,.action-secondary[disabled],.action-tertiary.disabled,.action-tertiary[disabled],.modal-popup .modal-footer .action-primary.disabled,.modal-popup .modal-footer .action-primary[disabled],.modal-popup .modal-footer .action-secondary.disabled,.modal-popup .modal-footer .action-secondary[disabled],.page-actions .page-actions-buttons>button.action-primary.disabled,.page-actions .page-actions-buttons>button.action-primary[disabled],.page-actions .page-actions-buttons>button.action-secondary.disabled,.page-actions .page-actions-buttons>button.action-secondary[disabled],.page-actions .page-actions-buttons>button.disabled,.page-actions .page-actions-buttons>button.primary.disabled,.page-actions .page-actions-buttons>button.primary[disabled],.page-actions .page-actions-buttons>button[disabled],.page-actions>button.action-primary.disabled,.page-actions>button.action-primary[disabled],.page-actions>button.action-secondary.disabled,.page-actions>button.action-secondary[disabled],.page-actions>button.disabled,.page-actions>button.primary.disabled,.page-actions>button.primary[disabled],.page-actions>button[disabled],button.disabled,button.primary.disabled,button.primary[disabled],button.secondary.disabled,button.secondary[disabled],button.tertiary.disabled,button.tertiary[disabled],button[disabled]{cursor:default;opacity:.5;pointer-events:none}.abs-action-l,.modal-popup .modal-footer .action-primary,.modal-popup .modal-footer .action-secondary,.page-actions .page-actions-buttons>button,.page-actions .page-actions-buttons>button.action-primary,.page-actions .page-actions-buttons>button.action-secondary,.page-actions .page-actions-buttons>button.primary,.page-actions button,.page-actions>button.action-primary,.page-actions>button.action-secondary,.page-actions>button.primary{font-size:1.6rem;letter-spacing:.025em;padding-bottom:.6875em;padding-top:.6875em}.abs-action-delete{display:inline-block;font-size:1.6rem;margin-left:1.2rem;padding-top:.7rem;text-decoration:none;vertical-align:middle}.abs-action-delete:after{color:#666;content:'\e630'}.abs-action-delete:hover:after{color:#35302c}.abs-action-button-as-link,.action-advanced,.data-grid .action-delete{line-height:1.36;padding:0;color:#008bdb;text-decoration:none;background:0 0;border:0;display:inline;font-weight:400;border-radius:0}.abs-action-button-as-link:visited,.action-advanced:visited,.data-grid .action-delete:visited{color:#008bdb;text-decoration:none}.abs-action-button-as-link:hover,.action-advanced:hover,.data-grid .action-delete:hover{text-decoration:underline}.abs-action-button-as-link:active,.action-advanced:active,.data-grid .action-delete:active{color:#ff5501;text-decoration:underline}.abs-action-button-as-link:hover,.action-advanced:hover,.data-grid .action-delete:hover{color:#0fa7ff}.abs-action-button-as-link:active,.abs-action-button-as-link:focus,.abs-action-button-as-link:hover,.action-advanced:active,.action-advanced:focus,.action-advanced:hover,.data-grid .action-delete:active,.data-grid .action-delete:focus,.data-grid .action-delete:hover{background:0 0;border:0}.abs-action-button-as-link.disabled,.abs-action-button-as-link[disabled],.action-advanced.disabled,.action-advanced[disabled],.data-grid .action-delete.disabled,.data-grid .action-delete[disabled],fieldset[disabled] .abs-action-button-as-link,fieldset[disabled] .action-advanced,fieldset[disabled] .data-grid .action-delete{color:#008bdb;opacity:.5;cursor:default;pointer-events:none;text-decoration:underline}.abs-action-button-as-link:active,.abs-action-button-as-link:not(:focus),.action-advanced:active,.action-advanced:not(:focus),.data-grid .action-delete:active,.data-grid .action-delete:not(:focus){box-shadow:none}.abs-action-button-as-link:focus,.action-advanced:focus,.data-grid .action-delete:focus{color:#0fa7ff}.abs-action-default,button{background:#e3e3e3;border-color:#adadad;color:#514943}.abs-action-default:active,.abs-action-default:focus,.abs-action-default:hover,button:active,button:focus,button:hover{background-color:#dbdbdb;color:#514943;text-decoration:none}.abs-action-primary,.page-actions .page-actions-buttons>button.action-primary,.page-actions .page-actions-buttons>button.primary,.page-actions>button.action-primary,.page-actions>button.primary,button.primary{background-color:#eb5202;border-color:#eb5202;color:#fff;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.abs-action-primary:active,.abs-action-primary:focus,.abs-action-primary:hover,.page-actions .page-actions-buttons>button.action-primary:active,.page-actions .page-actions-buttons>button.action-primary:focus,.page-actions .page-actions-buttons>button.action-primary:hover,.page-actions .page-actions-buttons>button.primary:active,.page-actions .page-actions-buttons>button.primary:focus,.page-actions .page-actions-buttons>button.primary:hover,.page-actions>button.action-primary:active,.page-actions>button.action-primary:focus,.page-actions>button.action-primary:hover,.page-actions>button.primary:active,.page-actions>button.primary:focus,.page-actions>button.primary:hover,button.primary:active,button.primary:focus,button.primary:hover{background-color:#ba4000;border-color:#b84002;box-shadow:0 0 0 1px #007bdb;color:#fff;text-decoration:none}.abs-action-primary.disabled,.abs-action-primary[disabled],.page-actions .page-actions-buttons>button.action-primary.disabled,.page-actions .page-actions-buttons>button.action-primary[disabled],.page-actions .page-actions-buttons>button.primary.disabled,.page-actions .page-actions-buttons>button.primary[disabled],.page-actions>button.action-primary.disabled,.page-actions>button.action-primary[disabled],.page-actions>button.primary.disabled,.page-actions>button.primary[disabled],button.primary.disabled,button.primary[disabled]{cursor:default;opacity:.5;pointer-events:none}.abs-action-secondary,.modal-popup .modal-footer .action-primary,.page-actions .page-actions-buttons>button.action-secondary,.page-actions>button.action-secondary,button.secondary{background-color:#514943;border-color:#514943;color:#fff;text-shadow:1px 1px 1px rgba(0,0,0,.3)}.abs-action-secondary:active,.abs-action-secondary:focus,.abs-action-secondary:hover,.modal-popup .modal-footer .action-primary:active,.modal-popup .modal-footer .action-primary:focus,.modal-popup .modal-footer .action-primary:hover,.page-actions .page-actions-buttons>button.action-secondary:active,.page-actions .page-actions-buttons>button.action-secondary:focus,.page-actions .page-actions-buttons>button.action-secondary:hover,.page-actions>button.action-secondary:active,.page-actions>button.action-secondary:focus,.page-actions>button.action-secondary:hover,button.secondary:active,button.secondary:focus,button.secondary:hover{background-color:#35302c;border-color:#35302c;box-shadow:0 0 0 1px #007bdb;color:#fff;text-decoration:none}.abs-action-secondary:active,.modal-popup .modal-footer .action-primary:active,.page-actions .page-actions-buttons>button.action-secondary:active,.page-actions>button.action-secondary:active,button.secondary:active{background-color:#35302c}.abs-action-tertiary,.modal-popup .modal-footer .action-secondary,button.tertiary{background-color:transparent;border-color:transparent;text-shadow:none;color:#008bdb}.abs-action-tertiary:active,.abs-action-tertiary:focus,.abs-action-tertiary:hover,.modal-popup .modal-footer .action-secondary:active,.modal-popup .modal-footer .action-secondary:focus,.modal-popup .modal-footer .action-secondary:hover,button.tertiary:active,button.tertiary:focus,button.tertiary:hover{background-color:transparent;border-color:transparent;box-shadow:none;color:#0fa7ff;text-decoration:underline}.abs-action-quaternary,.page-actions .page-actions-buttons>button,.page-actions>button{background-color:transparent;border-color:transparent;text-shadow:none;color:#333}.abs-action-quaternary:active,.abs-action-quaternary:focus,.abs-action-quaternary:hover,.page-actions .page-actions-buttons>button:active,.page-actions .page-actions-buttons>button:focus,.page-actions .page-actions-buttons>button:hover,.page-actions>button:active,.page-actions>button:focus,.page-actions>button:hover{background-color:transparent;border-color:transparent;box-shadow:none;color:#1a1a1a}.abs-action-menu,.actions-split .abs-action-menu .action-submenu,.actions-split .abs-action-menu .action-submenu .action-submenu,.actions-split .action-menu,.actions-split .action-menu .action-submenu,.actions-split .actions-split .dropdown-menu .action-submenu,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu,.actions-split .dropdown-menu{text-align:left;background-color:#fff;border:1px solid #007bdb;border-radius:1px;box-shadow:1px 1px 5px rgba(0,0,0,.5);color:#333;display:none;font-weight:400;left:0;list-style:none;margin:2px 0 0;min-width:0;padding:0;position:absolute;right:0;top:100%}.abs-action-menu._active,.actions-split .abs-action-menu .action-submenu .action-submenu._active,.actions-split .abs-action-menu .action-submenu._active,.actions-split .action-menu .action-submenu._active,.actions-split .action-menu._active,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu._active,.actions-split .actions-split .dropdown-menu .action-submenu._active,.actions-split .dropdown-menu._active{display:block}.abs-action-menu>li,.actions-split .abs-action-menu .action-submenu .action-submenu>li,.actions-split .abs-action-menu .action-submenu>li,.actions-split .action-menu .action-submenu>li,.actions-split .action-menu>li,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li,.actions-split .actions-split .dropdown-menu .action-submenu>li,.actions-split .dropdown-menu>li{border:none;display:block;padding:0;transition:background-color .1s linear}.abs-action-menu>li>a:hover,.actions-split .abs-action-menu .action-submenu .action-submenu>li>a:hover,.actions-split .abs-action-menu .action-submenu>li>a:hover,.actions-split .action-menu .action-submenu>li>a:hover,.actions-split .action-menu>li>a:hover,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li>a:hover,.actions-split .actions-split .dropdown-menu .action-submenu>li>a:hover,.actions-split .dropdown-menu>li>a:hover{text-decoration:none}.abs-action-menu>li._visible,.abs-action-menu>li:hover,.actions-split .abs-action-menu .action-submenu .action-submenu>li._visible,.actions-split .abs-action-menu .action-submenu .action-submenu>li:hover,.actions-split .abs-action-menu .action-submenu>li._visible,.actions-split .abs-action-menu .action-submenu>li:hover,.actions-split .action-menu .action-submenu>li._visible,.actions-split .action-menu .action-submenu>li:hover,.actions-split .action-menu>li._visible,.actions-split .action-menu>li:hover,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li._visible,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li:hover,.actions-split .actions-split .dropdown-menu .action-submenu>li._visible,.actions-split .actions-split .dropdown-menu .action-submenu>li:hover,.actions-split .dropdown-menu>li._visible,.actions-split .dropdown-menu>li:hover{background-color:#e3e3e3}.abs-action-menu>li:active,.actions-split .abs-action-menu .action-submenu .action-submenu>li:active,.actions-split .abs-action-menu .action-submenu>li:active,.actions-split .action-menu .action-submenu>li:active,.actions-split .action-menu>li:active,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li:active,.actions-split .actions-split .dropdown-menu .action-submenu>li:active,.actions-split .dropdown-menu>li:active{background-color:#cacaca}.abs-action-menu>li._parent,.actions-split .abs-action-menu .action-submenu .action-submenu>li._parent,.actions-split .abs-action-menu .action-submenu>li._parent,.actions-split .action-menu .action-submenu>li._parent,.actions-split .action-menu>li._parent,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li._parent,.actions-split .actions-split .dropdown-menu .action-submenu>li._parent,.actions-split .dropdown-menu>li._parent{-webkit-flex-direction:row;display:flex;-ms-flex-direction:row;flex-direction:row}.abs-action-menu>li._parent>.action-menu-item,.actions-split .abs-action-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.actions-split .abs-action-menu .action-submenu>li._parent>.action-menu-item,.actions-split .action-menu .action-submenu>li._parent>.action-menu-item,.actions-split .action-menu>li._parent>.action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu>li._parent>.action-menu-item,.actions-split .dropdown-menu>li._parent>.action-menu-item{min-width:100%}.abs-action-menu .action-menu-item,.abs-action-menu .item,.actions-split .abs-action-menu .action-submenu .action-menu-item,.actions-split .abs-action-menu .action-submenu .action-submenu .action-menu-item,.actions-split .abs-action-menu .action-submenu .action-submenu .item,.actions-split .abs-action-menu .action-submenu .item,.actions-split .action-menu .action-menu-item,.actions-split .action-menu .action-submenu .action-menu-item,.actions-split .action-menu .action-submenu .item,.actions-split .action-menu .item,.actions-split .actions-split .dropdown-menu .action-submenu .action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu .action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu .item,.actions-split .actions-split .dropdown-menu .action-submenu .item,.actions-split .dropdown-menu .action-menu-item,.actions-split .dropdown-menu .item{cursor:pointer;display:block;padding:.6875em 1em}.abs-action-menu .action-submenu,.actions-split .action-menu .action-submenu,.actions-split .action-menu .action-submenu .action-submenu,.actions-split .dropdown-menu .action-submenu{bottom:auto;left:auto;margin-left:0;margin-top:-1px;position:absolute;right:auto;top:auto}.ie9 .abs-action-menu .action-submenu,.ie9 .actions-split .abs-action-menu .action-submenu .action-submenu,.ie9 .actions-split .abs-action-menu .action-submenu .action-submenu .action-submenu,.ie9 .actions-split .action-menu .action-submenu,.ie9 .actions-split .action-menu .action-submenu .action-submenu,.ie9 .actions-split .actions-split .dropdown-menu .action-submenu .action-submenu,.ie9 .actions-split .actions-split .dropdown-menu .action-submenu .action-submenu .action-submenu,.ie9 .actions-split .dropdown-menu .action-submenu{margin-left:99%;margin-top:-3.5rem}.abs-action-menu a.action-menu-item,.actions-split .abs-action-menu .action-submenu .action-submenu a.action-menu-item,.actions-split .abs-action-menu .action-submenu a.action-menu-item,.actions-split .action-menu .action-submenu a.action-menu-item,.actions-split .action-menu a.action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu a.action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu a.action-menu-item,.actions-split .dropdown-menu a.action-menu-item{color:#333}.abs-action-menu a.action-menu-item:focus,.actions-split .abs-action-menu .action-submenu .action-submenu a.action-menu-item:focus,.actions-split .abs-action-menu .action-submenu a.action-menu-item:focus,.actions-split .action-menu .action-submenu a.action-menu-item:focus,.actions-split .action-menu a.action-menu-item:focus,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu a.action-menu-item:focus,.actions-split .actions-split .dropdown-menu .action-submenu a.action-menu-item:focus,.actions-split .dropdown-menu a.action-menu-item:focus{background-color:#e3e3e3;box-shadow:none}.abs-action-wrap-triangle{position:relative}.abs-action-wrap-triangle .action-default{width:100%}.abs-action-wrap-triangle .action-default:after,.abs-action-wrap-triangle .action-default:before{border-style:solid;content:'';height:0;position:absolute;top:0;width:0}.abs-action-wrap-triangle .action-default:active,.abs-action-wrap-triangle .action-default:focus,.abs-action-wrap-triangle .action-default:hover{box-shadow:none}._keyfocus .abs-action-wrap-triangle .action-default:focus{box-shadow:0 0 0 1px #007bdb}.ie10 .abs-action-wrap-triangle .action-default.disabled,.ie10 .abs-action-wrap-triangle .action-default[disabled],.ie9 .abs-action-wrap-triangle .action-default.disabled,.ie9 .abs-action-wrap-triangle .action-default[disabled]{background-color:#fcfcfc;opacity:1;text-shadow:none}.abs-action-wrap-triangle-right{display:inline-block;padding-right:1.6rem;position:relative}.abs-action-wrap-triangle-right .action-default:after,.abs-action-wrap-triangle-right .action-default:before{border-color:transparent transparent transparent #e3e3e3;border-width:1.7rem 0 1.6rem 1.7rem;left:100%;margin-left:-1.7rem}.abs-action-wrap-triangle-right .action-default:before{border-left-color:#949494;right:-1px}.abs-action-wrap-triangle-right .action-default:active:after,.abs-action-wrap-triangle-right .action-default:focus:after,.abs-action-wrap-triangle-right .action-default:hover:after{border-left-color:#dbdbdb}.ie10 .abs-action-wrap-triangle-right .action-default.disabled:after,.ie10 .abs-action-wrap-triangle-right .action-default[disabled]:after,.ie9 .abs-action-wrap-triangle-right .action-default.disabled:after,.ie9 .abs-action-wrap-triangle-right .action-default[disabled]:after{border-color:transparent transparent transparent #fcfcfc}.abs-action-wrap-triangle-right .action-primary:after{border-color:transparent transparent transparent #eb5202}.abs-action-wrap-triangle-right .action-primary:active:after,.abs-action-wrap-triangle-right .action-primary:focus:after,.abs-action-wrap-triangle-right .action-primary:hover:after{border-left-color:#ba4000}.abs-action-wrap-triangle-left{display:inline-block;padding-left:1.6rem}.abs-action-wrap-triangle-left .action-default{text-indent:-.85rem}.abs-action-wrap-triangle-left .action-default:after,.abs-action-wrap-triangle-left .action-default:before{border-color:transparent #e3e3e3 transparent transparent;border-width:1.7rem 1.7rem 1.6rem 0;margin-right:-1.7rem;right:100%}.abs-action-wrap-triangle-left .action-default:before{border-right-color:#949494;left:-1px}.abs-action-wrap-triangle-left .action-default:active:after,.abs-action-wrap-triangle-left .action-default:focus:after,.abs-action-wrap-triangle-left .action-default:hover:after{border-right-color:#dbdbdb}.ie10 .abs-action-wrap-triangle-left .action-default.disabled:after,.ie10 .abs-action-wrap-triangle-left .action-default[disabled]:after,.ie9 .abs-action-wrap-triangle-left .action-default.disabled:after,.ie9 .abs-action-wrap-triangle-left .action-default[disabled]:after{border-color:transparent #fcfcfc transparent transparent}.abs-action-wrap-triangle-left .action-primary:after{border-color:transparent #eb5202 transparent transparent}.abs-action-wrap-triangle-left .action-primary:active:after,.abs-action-wrap-triangle-left .action-primary:focus:after,.abs-action-wrap-triangle-left .action-primary:hover:after{border-right-color:#ba4000}.action-default,button{background:#e3e3e3;border-color:#adadad;color:#514943}.action-default:active,.action-default:focus,.action-default:hover,button:active,button:focus,button:hover{background-color:#dbdbdb;color:#514943;text-decoration:none}.action-primary{background-color:#eb5202;border-color:#eb5202;color:#fff;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.action-primary:active,.action-primary:focus,.action-primary:hover{background-color:#ba4000;border-color:#b84002;box-shadow:0 0 0 1px #007bdb;color:#fff;text-decoration:none}.action-primary.disabled,.action-primary[disabled]{cursor:default;opacity:.5;pointer-events:none}.action-secondary{background-color:#514943;border-color:#514943;color:#fff;text-shadow:1px 1px 1px rgba(0,0,0,.3)}.action-secondary:active,.action-secondary:focus,.action-secondary:hover{background-color:#35302c;border-color:#35302c;box-shadow:0 0 0 1px #007bdb;color:#fff;text-decoration:none}.action-secondary:active{background-color:#35302c}.action-quaternary,.action-tertiary{background-color:transparent;border-color:transparent;text-shadow:none}.action-quaternary:active,.action-quaternary:focus,.action-quaternary:hover,.action-tertiary:active,.action-tertiary:focus,.action-tertiary:hover{background-color:transparent;border-color:transparent;box-shadow:none}.action-tertiary{color:#008bdb}.action-tertiary:active,.action-tertiary:focus,.action-tertiary:hover{color:#0fa7ff;text-decoration:underline}.action-quaternary{color:#333}.action-quaternary:active,.action-quaternary:focus,.action-quaternary:hover{color:#1a1a1a}.action-close>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.action-close:active{-ms-transform:scale(0.9);transform:scale(0.9)}.action-close:before{content:'\e62f';transition:color .1s linear}.action-close:hover{cursor:pointer;text-decoration:none}.abs-action-menu .action-submenu,.abs-action-menu .action-submenu .action-submenu,.action-menu,.action-menu .action-submenu,.actions-split .action-menu .action-submenu,.actions-split .action-menu .action-submenu .action-submenu,.actions-split .dropdown-menu .action-submenu,.actions-split .dropdown-menu .action-submenu .action-submenu{background-color:#fff;border:1px solid #007bdb;border-radius:1px;box-shadow:1px 1px 5px rgba(0,0,0,.5);color:#333;display:none;font-weight:400;left:0;list-style:none;margin:2px 0 0;min-width:0;padding:0;position:absolute;right:0;top:100%}.abs-action-menu .action-submenu .action-submenu._active,.abs-action-menu .action-submenu._active,.action-menu .action-submenu._active,.action-menu._active,.actions-split .action-menu .action-submenu .action-submenu._active,.actions-split .action-menu .action-submenu._active,.actions-split .dropdown-menu .action-submenu .action-submenu._active,.actions-split .dropdown-menu .action-submenu._active{display:block}.abs-action-menu .action-submenu .action-submenu>li,.abs-action-menu .action-submenu>li,.action-menu .action-submenu>li,.action-menu>li,.actions-split .action-menu .action-submenu .action-submenu>li,.actions-split .action-menu .action-submenu>li,.actions-split .dropdown-menu .action-submenu .action-submenu>li,.actions-split .dropdown-menu .action-submenu>li{border:none;display:block;padding:0;transition:background-color .1s linear}.abs-action-menu .action-submenu .action-submenu>li>a:hover,.abs-action-menu .action-submenu>li>a:hover,.action-menu .action-submenu>li>a:hover,.action-menu>li>a:hover,.actions-split .action-menu .action-submenu .action-submenu>li>a:hover,.actions-split .action-menu .action-submenu>li>a:hover,.actions-split .dropdown-menu .action-submenu .action-submenu>li>a:hover,.actions-split .dropdown-menu .action-submenu>li>a:hover{text-decoration:none}.abs-action-menu .action-submenu .action-submenu>li._visible,.abs-action-menu .action-submenu .action-submenu>li:hover,.abs-action-menu .action-submenu>li._visible,.abs-action-menu .action-submenu>li:hover,.action-menu .action-submenu>li._visible,.action-menu .action-submenu>li:hover,.action-menu>li._visible,.action-menu>li:hover,.actions-split .action-menu .action-submenu .action-submenu>li._visible,.actions-split .action-menu .action-submenu .action-submenu>li:hover,.actions-split .action-menu .action-submenu>li._visible,.actions-split .action-menu .action-submenu>li:hover,.actions-split .dropdown-menu .action-submenu .action-submenu>li._visible,.actions-split .dropdown-menu .action-submenu .action-submenu>li:hover,.actions-split .dropdown-menu .action-submenu>li._visible,.actions-split .dropdown-menu .action-submenu>li:hover{background-color:#e3e3e3}.abs-action-menu .action-submenu .action-submenu>li:active,.abs-action-menu .action-submenu>li:active,.action-menu .action-submenu>li:active,.action-menu>li:active,.actions-split .action-menu .action-submenu .action-submenu>li:active,.actions-split .action-menu .action-submenu>li:active,.actions-split .dropdown-menu .action-submenu .action-submenu>li:active,.actions-split .dropdown-menu .action-submenu>li:active{background-color:#cacaca}.abs-action-menu .action-submenu .action-submenu>li._parent,.abs-action-menu .action-submenu>li._parent,.action-menu .action-submenu>li._parent,.action-menu>li._parent,.actions-split .action-menu .action-submenu .action-submenu>li._parent,.actions-split .action-menu .action-submenu>li._parent,.actions-split .dropdown-menu .action-submenu .action-submenu>li._parent,.actions-split .dropdown-menu .action-submenu>li._parent{-webkit-flex-direction:row;display:flex;-ms-flex-direction:row;flex-direction:row}.abs-action-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.abs-action-menu .action-submenu>li._parent>.action-menu-item,.action-menu .action-submenu>li._parent>.action-menu-item,.action-menu>li._parent>.action-menu-item,.actions-split .action-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.actions-split .action-menu .action-submenu>li._parent>.action-menu-item,.actions-split .dropdown-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.actions-split .dropdown-menu .action-submenu>li._parent>.action-menu-item{min-width:100%}.abs-action-menu .action-submenu .action-menu-item,.abs-action-menu .action-submenu .action-submenu .action-menu-item,.abs-action-menu .action-submenu .action-submenu .item,.abs-action-menu .action-submenu .item,.action-menu .action-menu-item,.action-menu .action-submenu .action-menu-item,.action-menu .action-submenu .item,.action-menu .item,.actions-split .action-menu .action-submenu .action-menu-item,.actions-split .action-menu .action-submenu .action-submenu .action-menu-item,.actions-split .action-menu .action-submenu .action-submenu .item,.actions-split .action-menu .action-submenu .item,.actions-split .dropdown-menu .action-submenu .action-menu-item,.actions-split .dropdown-menu .action-submenu .action-submenu .action-menu-item,.actions-split .dropdown-menu .action-submenu .action-submenu .item,.actions-split .dropdown-menu .action-submenu .item{cursor:pointer;display:block;padding:.6875em 1em}.abs-action-menu .action-submenu .action-submenu,.action-menu .action-submenu,.actions-split .action-menu .action-submenu .action-submenu,.actions-split .dropdown-menu .action-submenu .action-submenu{bottom:auto;left:auto;margin-left:0;margin-top:-1px;position:absolute;right:auto;top:auto}.ie9 .abs-action-menu .action-submenu .action-submenu,.ie9 .abs-action-menu .action-submenu .action-submenu .action-submenu,.ie9 .action-menu .action-submenu,.ie9 .action-menu .action-submenu .action-submenu,.ie9 .actions-split .action-menu .action-submenu .action-submenu,.ie9 .actions-split .action-menu .action-submenu .action-submenu .action-submenu,.ie9 .actions-split .dropdown-menu .action-submenu .action-submenu,.ie9 .actions-split .dropdown-menu .action-submenu .action-submenu .action-submenu{margin-left:99%;margin-top:-3.5rem}.abs-action-menu .action-submenu .action-submenu a.action-menu-item,.abs-action-menu .action-submenu a.action-menu-item,.action-menu .action-submenu a.action-menu-item,.action-menu a.action-menu-item,.actions-split .action-menu .action-submenu .action-submenu a.action-menu-item,.actions-split .action-menu .action-submenu a.action-menu-item,.actions-split .dropdown-menu .action-submenu .action-submenu a.action-menu-item,.actions-split .dropdown-menu .action-submenu a.action-menu-item{color:#333}.abs-action-menu .action-submenu .action-submenu a.action-menu-item:focus,.abs-action-menu .action-submenu a.action-menu-item:focus,.action-menu .action-submenu a.action-menu-item:focus,.action-menu a.action-menu-item:focus,.actions-split .action-menu .action-submenu .action-submenu a.action-menu-item:focus,.actions-split .action-menu .action-submenu a.action-menu-item:focus,.actions-split .dropdown-menu .action-submenu .action-submenu a.action-menu-item:focus,.actions-split .dropdown-menu .action-submenu a.action-menu-item:focus{background-color:#e3e3e3;box-shadow:none}.messages .message:last-child{margin:0 0 2rem}.message{background:#fffbbb;border:none;border-radius:0;color:#333;font-size:1.4rem;margin:0 0 1px;padding:1.8rem 4rem 1.8rem 5.5rem;position:relative;text-shadow:none}.message:before{background:0 0;border:0;color:#007bdb;content:'\e61a';font-family:Icons;font-size:1.9rem;font-style:normal;font-weight:400;height:auto;left:1.9rem;line-height:inherit;margin-top:-1.3rem;position:absolute;speak:none;text-shadow:none;top:50%;width:auto}.message-notice:before{color:#007bdb;content:'\e61a'}.message-warning:before{color:#eb5202;content:'\e623'}.message-error{background:#fcc}.message-error:before{color:#e22626;content:'\e632';font-size:1.5rem;left:2.2rem;margin-top:-1rem}.message-success:before{color:#79a22e;content:'\e62d'}.message-spinner:before{display:none}.message-spinner .spinner{font-size:2.5rem;left:1.5rem;position:absolute;top:1.5rem}.message-in-rating-edit{margin-left:1.8rem;margin-right:1.8rem}.modal-popup .action-close,.modal-slide .action-close{color:#736963;position:absolute;right:0;top:0;z-index:1}.modal-popup .action-close:active,.modal-slide .action-close:active{-ms-transform:none;transform:none}.modal-popup .action-close:active:before,.modal-slide .action-close:active:before{font-size:1.8rem}.modal-popup .action-close:hover:before,.modal-slide .action-close:hover:before{color:#58504b}.modal-popup .action-close:before,.modal-slide .action-close:before{font-size:2rem}.modal-popup .action-close:focus,.modal-slide .action-close:focus{background-color:transparent}.modal-popup.prompt .prompt-message{padding:2rem 0}.modal-popup.prompt .prompt-message input{width:100%}.modal-popup.confirm .modal-inner-wrap .message,.modal-popup.prompt .modal-inner-wrap .message{background:#fff}.modal-popup.modal-system-messages .modal-inner-wrap{background:#fffbbb}.modal-popup._image-box .modal-inner-wrap{margin:5rem auto;max-width:78rem;position:static}.modal-popup._image-box .thumbnail-preview{padding-bottom:3rem;text-align:center}.modal-popup._image-box .thumbnail-preview .thumbnail-preview-image-block{border:1px solid #ccc;margin:0 auto 2rem;max-width:58rem;padding:2rem}.modal-popup._image-box .thumbnail-preview .thumbnail-preview-image{max-height:54rem}.modal-popup .modal-title{font-size:2.4rem;margin-right:6.4rem}.modal-popup .modal-footer{padding-top:2.6rem;text-align:right}.modal-popup .action-close{padding:3rem}.modal-popup .action-close:active,.modal-popup .action-close:focus{background:0 0;padding-right:3.1rem;padding-top:3.1rem}.modal-slide .modal-content-new-attribute{-webkit-overflow-scrolling:touch;overflow:auto;padding-bottom:0}.modal-slide .modal-content-new-attribute iframe{margin-bottom:-2.5rem}.modal-slide .modal-title{font-size:2.1rem;margin-right:5.7rem}.modal-slide .action-close{padding:2.1rem 2.6rem}.modal-slide .action-close:active{padding-right:2.7rem;padding-top:2.2rem}.modal-slide .page-main-actions{margin-bottom:.6rem;margin-top:2.1rem}.modal-slide .magento-message{padding:0 3rem 3rem;position:relative}.modal-slide .magento-message .insert-title-inner,.modal-slide .main-col .insert-title-inner{border-bottom:1px solid #adadad;margin:0 0 2rem;padding-bottom:.5rem}.modal-slide .magento-message .insert-actions,.modal-slide .main-col .insert-actions{float:right}.modal-slide .magento-message .title,.modal-slide .main-col .title{font-size:1.6rem;padding-top:.5rem}.modal-slide .main-col,.modal-slide .side-col{float:left;padding-bottom:0}.modal-slide .main-col:after,.modal-slide .side-col:after{display:none}.modal-slide .side-col{width:20%}.modal-slide .main-col{padding-right:0;width:80%}.modal-slide .content-footer .form-buttons{float:right}.modal-title{font-weight:400;margin-bottom:0;min-height:1em}.modal-title span{font-size:1.4rem;font-style:italic;margin-left:1rem}.spinner{display:inline-block;font-size:4rem;height:1em;margin-right:1.5rem;position:relative;width:1em}.spinner>span:nth-child(1){animation-delay:.27s;-ms-transform:rotate(-315deg);transform:rotate(-315deg)}.spinner>span:nth-child(2){animation-delay:.36s;-ms-transform:rotate(-270deg);transform:rotate(-270deg)}.spinner>span:nth-child(3){animation-delay:.45s;-ms-transform:rotate(-225deg);transform:rotate(-225deg)}.spinner>span:nth-child(4){animation-delay:.54s;-ms-transform:rotate(-180deg);transform:rotate(-180deg)}.spinner>span:nth-child(5){animation-delay:.63s;-ms-transform:rotate(-135deg);transform:rotate(-135deg)}.spinner>span:nth-child(6){animation-delay:.72s;-ms-transform:rotate(-90deg);transform:rotate(-90deg)}.spinner>span:nth-child(7){animation-delay:.81s;-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.spinner>span:nth-child(8){animation-delay:.9;-ms-transform:rotate(0deg);transform:rotate(0deg)}@keyframes fade{0%{background-color:#514943}100%{background-color:#fff}}.spinner>span{-ms-transform:scale(0.4);transform:scale(0.4);animation-name:fade;animation-duration:.72s;animation-iteration-count:infinite;animation-direction:linear;background-color:#fff;border-radius:6px;clip:rect(0 .28571429em .1em 0);height:.1em;margin-top:.5em;position:absolute;width:1em}.ie9 .spinner{background:url(../images/ajax-loader.gif) center no-repeat}.ie9 .spinner>span{display:none}.popup-loading{background:rgba(255,255,255,.8);border-color:#ef672f;color:#ef672f;font-size:14px;font-weight:700;left:50%;margin-left:-100px;padding:100px 0 10px;position:fixed;text-align:center;top:40%;width:200px;z-index:1003}.popup-loading:after{background-image:url(../images/loader-1.gif);content:'';height:64px;left:50%;margin:-32px 0 0 -32px;position:absolute;top:40%;width:64px;z-index:2}.loading-mask,.loading-old{background:rgba(255,255,255,.4);bottom:0;left:0;position:fixed;right:0;top:0;z-index:2003}.loading-mask img,.loading-old img{display:none}.loading-mask p,.loading-old p{margin-top:118px}.loading-mask .loader,.loading-old .loader{background:url(../images/loader-1.gif) 50% 30% no-repeat #f7f3eb;border-radius:5px;bottom:0;color:#575757;font-size:14px;font-weight:700;height:160px;left:0;margin:auto;opacity:.95;position:absolute;right:0;text-align:center;top:0;width:160px}.admin-user{float:right;line-height:1.36;margin-left:.3rem;z-index:490}.admin-user._active .admin__action-dropdown,.admin-user.active .admin__action-dropdown{border-color:#007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5)}.admin-user .admin__action-dropdown{height:3.3rem;padding:.7rem 2.8rem .4rem 4rem}.admin-user .admin__action-dropdown._active:after,.admin-user .admin__action-dropdown.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.admin-user .admin__action-dropdown:after{border-color:#777 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;right:1.3rem;top:50%;transition:all .2s linear;width:0}._active .admin-user .admin__action-dropdown:after,.active .admin-user .admin__action-dropdown:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.admin-user .admin__action-dropdown:hover:after{border-color:#000 transparent transparent}.admin-user .admin__action-dropdown:before{color:#777;content:'\e600';font-size:2rem;left:1.1rem;margin-top:-1.1rem;position:absolute;top:50%}.admin-user .admin__action-dropdown:hover:before{color:#333}.admin-user .admin__action-dropdown-menu{min-width:20rem;padding-left:1rem;padding-right:1rem}.admin-user .admin__action-dropdown-menu>li>a{padding-left:.5em;padding-right:1.8rem;transition:background-color .1s linear;white-space:nowrap}.admin-user .admin__action-dropdown-menu>li>a:hover{background-color:#e0f6fe;color:#333}.admin-user .admin__action-dropdown-menu>li>a:active{background-color:#c7effd;bottom:-1px;position:relative}.admin-user .admin__action-dropdown-menu .admin-user-name{text-overflow:ellipsis;white-space:nowrap;display:inline-block;max-width:20rem;overflow:hidden;vertical-align:top}.admin-user-account-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;max-width:11.2rem}.search-global{float:right;margin-right:-.3rem;position:relative;z-index:480}.search-global-field{min-width:5rem}.search-global-field._active .search-global-input{background-color:#fff;border-color:#007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5);padding-right:4rem;width:25rem}.search-global-field._active .search-global-action{display:block;height:3.3rem;position:absolute;right:0;text-indent:-100%;top:0;width:5rem;z-index:3}.search-global-field .autocomplete-results{height:3.3rem;position:absolute;right:0;top:0;width:25rem}.search-global-field .search-global-menu{border:1px solid #007bdb;border-top-color:transparent;box-shadow:1px 1px 5px rgba(0,0,0,.5);left:0;margin-top:-2px;padding:0;position:absolute;right:0;top:100%;z-index:2}.search-global-field .search-global-menu:after{background-color:#fff;content:'';height:5px;left:0;position:absolute;right:0;top:-5px}.search-global-field .search-global-menu>li{background-color:#fff;border-top:1px solid #ddd;display:block;font-size:1.2rem;padding:.75rem 1.4rem .55rem}.search-global-field .search-global-menu>li._active{background-color:#e0f6fe}.search-global-field .search-global-menu .title{display:block;font-size:1.4rem}.search-global-field .search-global-menu .type{color:#1a1a1a;display:block}.search-global-label{cursor:pointer;height:3.3rem;padding:.75rem 1.4rem .55rem;position:absolute;right:0;top:0;z-index:2}.search-global-label:active{-ms-transform:scale(0.9);transform:scale(0.9)}.search-global-label:hover:before{color:#000}.search-global-label:before{color:#777;content:'\e60c';font-size:2rem}.search-global-input{background-color:transparent;border:1px solid transparent;font-size:1.4rem;height:3.3rem;padding:.75rem 1.4rem .55rem;position:absolute;right:0;top:0;transition:all .1s linear,width .3s linear;width:5rem;z-index:1}.search-global-action{display:none}.notifications-wrapper{float:right;line-height:1;position:relative}.notifications-wrapper.active{z-index:500}.notifications-wrapper.active .notifications-action{border-color:#007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5)}.notifications-wrapper.active .notifications-action:after{background-color:#fff;border:none;content:'';display:block;height:6px;left:-6px;margin-top:0;position:absolute;right:0;top:100%;width:auto}.notifications-wrapper .admin__action-dropdown-menu{padding:1rem 0 0;width:32rem}.notifications-action{color:#777;height:3.3rem;padding:.75rem 2rem .65rem}.notifications-action:after{display:none}.notifications-action:before{content:'\e607';font-size:1.9rem;margin-right:0}.notifications-action:active:before{position:relative;top:1px}.notifications-action .notifications-counter{background-color:#e22626;border-radius:1em;color:#fff;display:inline-block;font-size:1.1rem;font-weight:700;left:50%;margin-left:.3em;margin-top:-1.1em;padding:.3em .5em;position:absolute;top:50%}.notifications-entry{line-height:1.36;padding:.6rem 2rem .8rem;position:relative;transition:background-color .1s linear}.notifications-entry:hover{background-color:#e0f6fe}.notifications-entry.notifications-entry-last{margin:0 2rem;padding:.3rem 0 1.3rem;text-align:center}.notifications-entry.notifications-entry-last:hover{background-color:transparent}.notifications-entry+.notifications-entry-last{border-top:1px solid #ddd;padding-bottom:.6rem}.notifications-entry ._cutted{cursor:pointer}.notifications-entry ._cutted .notifications-entry-description-start:after{content:'...'}.notifications-entry-title{color:#ef672f;display:block;font-size:1.1rem;font-weight:700;margin-bottom:.7rem;margin-right:1em}.notifications-entry-description{color:#333;font-size:1.1rem;margin-bottom:.8rem}.notifications-entry-description-end{display:none}.notifications-entry-description-end._show{display:inline}.notifications-entry-time{color:#777;font-size:1.1rem}.notifications-close{line-height:1;padding:1rem;position:absolute;right:0;top:.6rem}.notifications-close:before{color:#ccc;content:'\e620';transition:color .1s linear}.notifications-close:hover:before{color:#b3b3b3}.notifications-close:active{-ms-transform:scale(0.95);transform:scale(0.95)}.page-header-actions{padding-top:1.1rem}.page-header-hgroup{padding-right:1.5rem}.page-title{color:#333;font-size:2.8rem}.page-header{padding:1.5rem 3rem}.menu-wrapper{display:inline-block;position:relative;width:8.8rem;z-index:700}.menu-wrapper:before{background-color:#373330;bottom:0;content:'';left:0;position:fixed;top:0;width:8.8rem;z-index:699}.menu-wrapper._fixed{left:0;position:fixed;top:0}.menu-wrapper._fixed~.page-wrapper{margin-left:8.8rem}.menu-wrapper .logo{display:block;height:8.8rem;padding:2.4rem 0 2.2rem;position:relative;text-align:center;z-index:700}._keyfocus .menu-wrapper .logo:focus{background-color:#4a4542;box-shadow:none}._keyfocus .menu-wrapper .logo:focus+.admin__menu .level-0:first-child>a{background-color:#373330}._keyfocus .menu-wrapper .logo:focus+.admin__menu .level-0:first-child>a:after{display:none}.menu-wrapper .logo:hover .logo-img{-webkit-filter:brightness(1.1);filter:brightness(1.1)}.menu-wrapper .logo:active .logo-img{-ms-transform:scale(0.95);transform:scale(0.95)}.menu-wrapper .logo .logo-img{height:4.2rem;transition:-webkit-filter .2s linear,filter .2s linear,transform .1s linear;width:3.5rem}.abs-menu-separator,.admin__menu .item-partners>a:after,.admin__menu .level-0:first-child>a:after{background-color:#736963;content:'';display:block;height:1px;left:0;margin-left:16%;position:absolute;top:0;width:68%}.admin__menu li{display:block}.admin__menu .level-0:first-child>a{position:relative}.admin__menu .level-0._active>a,.admin__menu .level-0:hover>a{color:#f7f3eb}.admin__menu .level-0._active>a{background-color:#524d49}.admin__menu .level-0:hover>a{background-color:#4a4542}.admin__menu .level-0>a{color:#aaa6a0;display:block;font-size:1rem;letter-spacing:.025em;min-height:6.2rem;padding:1.2rem .5rem .5rem;position:relative;text-align:center;text-decoration:none;text-transform:uppercase;transition:background-color .1s linear;word-wrap:break-word;z-index:700}.admin__menu .level-0>a:focus{box-shadow:none}.admin__menu .level-0>a:before{content:'\e63a';display:block;font-size:2.2rem;height:2.2rem}.admin__menu .level-0>.submenu{background-color:#4a4542;box-shadow:0 0 3px #000;left:100%;min-height:calc(8.8rem + 2rem + 100%);padding:2rem 0 0;position:absolute;top:0;-ms-transform:translateX(-100%);transform:translateX(-100%);transition-duration:.3s;transition-property:transform,visibility;transition-timing-function:ease-in-out;visibility:hidden;z-index:697}.ie10 .admin__menu .level-0>.submenu,.ie11 .admin__menu .level-0>.submenu{height:100%}.admin__menu .level-0._show>.submenu{-ms-transform:translateX(0);transform:translateX(0);visibility:visible;z-index:698}.admin__menu .level-1{margin-left:1.5rem;margin-right:1.5rem}.admin__menu [class*=level-]:not(.level-0) a{display:block;padding:1.25rem 1.5rem}.admin__menu [class*=level-]:not(.level-0) a:hover{background-color:#403934}.admin__menu [class*=level-]:not(.level-0) a:active{background-color:#322c29;padding-bottom:1.15rem;padding-top:1.35rem}.admin__menu .submenu li{min-width:23.8rem}.admin__menu .submenu a{color:#fcfcfc;transition:background-color .1s linear}.admin__menu .submenu a:focus,.admin__menu .submenu a:hover{box-shadow:none;text-decoration:none}._keyfocus .admin__menu .submenu a:focus{background-color:#403934}._keyfocus .admin__menu .submenu a:active{background-color:#322c29}.admin__menu .submenu .parent{margin-bottom:4.5rem}.admin__menu .submenu .parent .submenu-group-title,.admin__menu .submenu .parent>a{color:#a79d95;display:block;font-size:1.6rem;font-weight:600;margin-bottom:.7rem;padding:1.25rem 1.5rem;pointer-events:none}.admin__menu .submenu .column{display:table-cell}.admin__menu .submenu-title{color:#fff;display:block;font-size:2.2rem;font-weight:600;margin-bottom:4.2rem;margin-left:3rem;margin-right:5.8rem}.admin__menu .submenu-sub-title{color:#fff;display:block;font-size:1.2rem;margin:-3.8rem 5.8rem 3.8rem 3rem}.admin__menu .action-close{padding:2.4rem 2.8rem;position:absolute;right:0;top:0}.admin__menu .action-close:before{color:#a79d95;font-size:1.7rem}.admin__menu .action-close:hover:before{color:#fff}.admin__menu .item-dashboard>a:before{content:'\e604';font-size:1.8rem;padding-top:.4rem}.admin__menu .item-sales>a:before{content:'\e60b'}.admin__menu .item-catalog>a:before{content:'\e608'}.admin__menu .item-customer>a:before{content:'\e603';font-size:2.6rem;position:relative;top:-.4rem}.admin__menu .item-marketing>a:before{content:'\e609';font-size:2rem;padding-top:.2rem}.admin__menu .item-content>a:before{content:'\e602';font-size:2.4rem;position:relative;top:-.2rem}.admin__menu .item-report>a:before{content:'\e60a'}.admin__menu .item-stores>a:before{content:'\e60d';font-size:1.9rem;padding-top:.3rem}.admin__menu .item-system>a:before{content:'\e610'}.admin__menu .item-partners._active>a:after,.admin__menu .item-system._current+.item-partners>a:after{display:none}.admin__menu .item-partners>a{padding-bottom:1rem}.admin__menu .item-partners>a:before{content:'\e612'}.admin__menu-overlay{bottom:0;left:0;position:fixed;right:0;top:0;z-index:697}.store-switcher{color:#333;float:left;font-size:1.3rem;margin-top:.7rem}.store-switcher .admin__action-dropdown{background-color:#f8f8f8;margin-left:.5em}.store-switcher .dropdown{display:inline-block;position:relative}.store-switcher .dropdown:after,.store-switcher .dropdown:before{content:'';display:table}.store-switcher .dropdown:after{clear:both}.store-switcher .dropdown .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.store-switcher .dropdown .action.toggle:after{-webkit-font-smoothing:antialiased;font-size:22px;line-height:2;color:#333;content:'\e607';font-family:icons-blank-theme;margin:0;vertical-align:top;display:inline-block;font-weight:400;overflow:hidden;speak:none;text-align:center}.store-switcher .dropdown .action.toggle:active:after,.store-switcher .dropdown .action.toggle:hover:after{color:#333}.store-switcher .dropdown .action.toggle.active{display:inline-block;text-decoration:none}.store-switcher .dropdown .action.toggle.active:after{-webkit-font-smoothing:antialiased;font-size:22px;line-height:2;color:#333;content:'\e618';font-family:icons-blank-theme;margin:0;vertical-align:top;display:inline-block;font-weight:400;overflow:hidden;speak:none;text-align:center}.store-switcher .dropdown .action.toggle.active:active:after,.store-switcher .dropdown .action.toggle.active:hover:after{color:#333}.store-switcher .dropdown .dropdown-menu{margin:4px 0 0;padding:0;list-style:none;background:#fff;border:1px solid #aaa6a0;min-width:19.5rem;z-index:100;box-sizing:border-box;display:none;position:absolute;top:100%;box-shadow:1px 1px 5px rgba(0,0,0,.5)}.store-switcher .dropdown .dropdown-menu li{margin:0;padding:0}.store-switcher .dropdown .dropdown-menu li:hover{background:0 0;cursor:pointer}.store-switcher .dropdown.active{overflow:visible}.store-switcher .dropdown.active .dropdown-menu{display:block}.store-switcher .dropdown-menu{left:0;margin-top:.5em;max-height:250px;overflow-y:auto;padding-top:.25em}.store-switcher .dropdown-menu li{border:0;cursor:default}.store-switcher .dropdown-menu li:hover{cursor:default}.store-switcher .dropdown-menu li a,.store-switcher .dropdown-menu li span{color:#333;display:block;padding:.5rem 1.3rem}.store-switcher .dropdown-menu li a{text-decoration:none}.store-switcher .dropdown-menu li a:hover{background:#e9e9e9}.store-switcher .dropdown-menu li span{color:#adadad;cursor:default}.store-switcher .dropdown-menu li.current span{background:#eee;color:#333}.store-switcher .dropdown-menu .store-switcher-store a,.store-switcher .dropdown-menu .store-switcher-store span{padding-left:2.6rem}.store-switcher .dropdown-menu .store-switcher-store-view a,.store-switcher .dropdown-menu .store-switcher-store-view span{padding-left:3.9rem}.store-switcher .dropdown-menu .dropdown-toolbar{border-top:1px solid #ebebeb;margin-top:1rem}.store-switcher .dropdown-menu .dropdown-toolbar a:before{content:'\e610';margin-right:.25em;position:relative;top:1px}.store-switcher-label{font-weight:700}.store-switcher-alt{display:inline-block;position:relative}.store-switcher-alt.active .dropdown-menu{display:block}.store-switcher-alt .dropdown-menu{margin-top:2px;white-space:nowrap}.store-switcher-alt .dropdown-menu ul{list-style:none;margin:0;padding:0}.store-switcher-alt strong{color:#a79d95;display:block;font-size:14px;font-weight:500;line-height:1.333;padding:5px 10px}.store-switcher-alt .store-selected{color:#676056;cursor:pointer;font-size:12px;font-weight:400;line-height:1.333}.store-switcher-alt .store-selected:after{-webkit-font-smoothing:antialiased;color:#afadac;content:'\e02c';font-style:normal;font-weight:400;margin:0 0 0 3px;speak:none;vertical-align:text-top}.store-switcher-alt .store-switcher-store,.store-switcher-alt .store-switcher-website{padding:0}.store-switcher-alt .store-switcher-store:hover,.store-switcher-alt .store-switcher-website:hover{background:0 0}.store-switcher-alt .manage-stores,.store-switcher-alt .store-switcher-all,.store-switcher-alt .store-switcher-store-view{padding:0}.store-switcher-alt .manage-stores>a,.store-switcher-alt .store-switcher-all>a{color:#676056;display:block;font-size:12px;padding:8px 15px;text-decoration:none}.store-switcher-website{margin:5px 0 0}.store-switcher-website>strong{padding-left:13px}.store-switcher-store{margin:1px 0 0}.store-switcher-store>strong{padding-left:20px}.store-switcher-store>ul{margin-top:1px}.store-switcher-store-view:first-child{border-top:1px solid #e5e5e5}.store-switcher-store-view>a{color:#333;display:block;font-size:13px;padding:5px 15px 5px 24px;text-decoration:none}.store-view:not(.store-switcher){float:left}.store-view .store-switcher-label{display:inline-block;margin-top:1rem}.tooltip{margin-left:.5em}.tooltip .help a,.tooltip .help span{cursor:pointer;display:inline-block;height:22px;position:relative;vertical-align:middle;width:22px;z-index:2}.tooltip .help a:before,.tooltip .help span:before{color:#333;content:'\e633';font-size:1.7rem}.tooltip .help a:hover{text-decoration:none}.tooltip .tooltip-content{background:#000;border-radius:3px;color:#fff;display:none;margin-left:-19px;margin-top:10px;max-width:200px;padding:4px 8px;position:absolute;text-shadow:none;z-index:20}.tooltip .tooltip-content:before{border-bottom:5px solid #000;border-left:5px solid transparent;border-right:5px solid transparent;content:'';height:0;left:20px;opacity:.8;position:absolute;top:-5px;width:0}.tooltip .tooltip-content.loading{position:absolute}.tooltip .tooltip-content.loading:before{border-bottom-color:rgba(0,0,0,.3)}.tooltip:hover>.tooltip-content{display:block}.page-actions._fixed,.page-main-actions:not(._hidden){background:#f8f8f8;border-bottom:1px solid #e3e3e3;border-top:1px solid #e3e3e3;padding:1.5rem}.page-main-actions{margin:0 0 3rem}.page-main-actions._hidden .store-switcher{display:none}.page-main-actions._hidden .page-actions-placeholder{min-height:50px}.page-actions{float:right}.page-main-actions .page-actions._fixed{left:8.8rem;position:fixed;right:0;top:0;z-index:501}.page-main-actions .page-actions._fixed .page-actions-inner:before{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;content:attr(data-title);float:left;font-size:2.8rem;margin-top:.3rem;max-width:50%}.page-actions .page-actions-buttons>button,.page-actions>button{float:right;margin-left:1.3rem}.page-actions .page-actions-buttons>button.action-back,.page-actions .page-actions-buttons>button.back,.page-actions>button.action-back,.page-actions>button.back{float:left;-ms-flex-order:-1;order:-1}.page-actions .page-actions-buttons>button.action-back:before,.page-actions .page-actions-buttons>button.back:before,.page-actions>button.action-back:before,.page-actions>button.back:before{content:'\e626';margin-right:.5em;position:relative;top:1px}.page-actions .page-actions-buttons>button.action-primary,.page-actions .page-actions-buttons>button.primary,.page-actions>button.action-primary,.page-actions>button.primary{-ms-flex-order:2;order:2}.page-actions .page-actions-buttons>button.save:not(.primary),.page-actions>button.save:not(.primary){-ms-flex-order:1;order:1}.page-actions .page-actions-buttons>button.delete,.page-actions>button.delete{-ms-flex-order:-1;order:-1}.page-actions .actions-split{float:right;margin-left:1.3rem;-ms-flex-order:2;order:2}.page-actions .actions-split .dropdown-menu .item{display:block}.page-actions-buttons{float:right;-ms-flex-pack:end;justify-content:flex-end;display:-ms-flexbox;display:flex}.customer-index-edit .page-actions-buttons{background-color:transparent}.admin__page-nav{background:#f1f1f1;border:1px solid #e3e3e3}.admin__page-nav._collapsed:first-child{border-bottom:none}.admin__page-nav._collapsed._show{border-bottom:1px solid #e3e3e3}.admin__page-nav._collapsed._show ._collapsible{background:#f1f1f1}.admin__page-nav._collapsed._show ._collapsible:after{content:'\e62b'}.admin__page-nav._collapsed._show ._collapsible+.admin__page-nav-items{display:block}.admin__page-nav._collapsed._hide .admin__page-nav-title-messages,.admin__page-nav._collapsed._hide .admin__page-nav-title-messages ._active{display:inline-block}.admin__page-nav+._collapsed{border-bottom:none;border-top:none}.admin__page-nav-title{border-bottom:1px solid #e3e3e3;color:#303030;display:block;font-size:1.4rem;line-height:1.2;margin:0 0 -1px;padding:1.8rem 1.5rem;position:relative;text-transform:uppercase}.admin__page-nav-title._collapsible{background:#fff;cursor:pointer;margin:0;padding-right:3.5rem;transition:border-color .1s ease-out,background-color .1s ease-out}.admin__page-nav-title._collapsible+.admin__page-nav-items{display:none;margin-top:-1px}.admin__page-nav-title._collapsible:after{content:'\e628';font-size:1.3rem;font-weight:700;position:absolute;right:1.8rem;top:2rem}.admin__page-nav-title._collapsible:hover{background:#f1f1f1}.admin__page-nav-title._collapsible:last-child{margin:0 0 -1px}.admin__page-nav-title strong{font-weight:700}.admin__page-nav-title .admin__page-nav-title-messages{display:none}.admin__page-nav-items{list-style-type:none;margin:0;padding:1rem 0 1.3rem}.admin__page-nav-item{border-left:3px solid transparent;margin-left:.7rem;padding:0;position:relative;transition:border-color .1s ease-out,background-color .1s ease-out}.admin__page-nav-item:hover{border-color:#e4e4e4}.admin__page-nav-item:hover .admin__page-nav-link{background:#e4e4e4;color:#303030;text-decoration:none}.admin__page-nav-item._active,.admin__page-nav-item.ui-state-active{border-color:#eb5202}.admin__page-nav-item._active .admin__page-nav-link,.admin__page-nav-item.ui-state-active .admin__page-nav-link{background:#fff;border-color:#e3e3e3;border-right:1px solid #fff;color:#303030;margin-right:-1px;font-weight:600}.admin__page-nav-item._loading:before,.admin__page-nav-item.ui-tabs-loading:before{display:none}.admin__page-nav-item._loading .admin__page-nav-item-message-loader,.admin__page-nav-item.ui-tabs-loading .admin__page-nav-item-message-loader{display:inline-block}.admin__page-nav-link{border:1px solid transparent;border-width:1px 0;color:#303030;display:block;font-weight:500;line-height:1.2;margin:0 0 -1px;padding:2rem 4rem 2rem 1rem;transition:border-color .1s ease-out,background-color .1s ease-out;word-wrap:break-word}.admin__page-nav-item-messages{display:inline-block}.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip{background:#f1f1f1;border:1px solid #f1f1f1;border-radius:1px;bottom:3.7rem;box-shadow:0 3px 9px 0 rgba(0,0,0,.3);display:none;font-size:1.4rem;font-weight:400;left:-1rem;line-height:1.36;padding:1.5rem;position:absolute;text-transform:none;width:27rem;word-break:normal;z-index:2}.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip:after,.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip:before{border:15px solid transparent;height:0;width:0;border-top-color:#f1f1f1;content:'';display:block;left:2rem;position:absolute;top:100%;z-index:3}.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip:after{border-top-color:#f1f1f1;margin-top:-1px;z-index:4}.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip:before{border-top-color:#bfbfbf;margin-top:1px}.admin__page-nav-item-message-loader{display:none;margin-top:-1rem;position:absolute;right:0;top:50%}.admin__page-nav-item-message-loader .spinner{font-size:2rem;margin-right:1.5rem}._loading>.admin__page-nav-item-messages .admin__page-nav-item-message-loader{display:inline-block}.admin__page-nav-item-message{position:relative}.admin__page-nav-item-message:hover{z-index:500}.admin__page-nav-item-message:hover .admin__page-nav-item-message-tooltip{display:block}.admin__page-nav-item-message._changed,.admin__page-nav-item-message._error{display:none}.admin__page-nav-item-message .admin__page-nav-item-message-icon{display:inline-block;font-size:1.4rem;padding-left:.8em;vertical-align:baseline}.admin__page-nav-item-message .admin__page-nav-item-message-icon:after{color:#666;content:'\e631'}._changed:not(._error)>.admin__page-nav-item-messages ._changed{display:inline-block}._error .admin__page-nav-item-message-icon:after{color:#eb5202;content:'\e623'}._error>.admin__page-nav-item-messages ._error{display:inline-block}._error>.admin__page-nav-item-messages ._error .spinner{font-size:2rem;margin-right:1.5rem}._error .admin__page-nav-item-message-tooltip{background:#f1f1f1;border:1px solid #f1f1f1;border-radius:1px;bottom:3.7rem;box-shadow:0 3px 9px 0 rgba(0,0,0,.3);display:none;font-weight:400;left:-1rem;line-height:1.36;padding:2rem;position:absolute;text-transform:none;width:27rem;word-break:normal;z-index:2}._error .admin__page-nav-item-message-tooltip:after,._error .admin__page-nav-item-message-tooltip:before{border:15px solid transparent;height:0;width:0;border-top-color:#f1f1f1;content:'';display:block;left:2rem;position:absolute;top:100%;z-index:3}._error .admin__page-nav-item-message-tooltip:after{border-top-color:#f1f1f1;margin-top:-1px;z-index:4}._error .admin__page-nav-item-message-tooltip:before{border-top-color:#bfbfbf}.admin__data-grid-wrap-static .data-grid{box-sizing:border-box}.admin__data-grid-wrap-static .data-grid thead{color:#333}.admin__data-grid-wrap-static .data-grid tr:nth-child(even) td{background-color:#f5f5f5}.admin__data-grid-wrap-static .data-grid tr:nth-child(even) td._dragging{background-color:rgba(245,245,245,.95)}.admin__data-grid-wrap-static .data-grid ul{margin-left:1rem;padding-left:1rem}.admin__data-grid-wrap-static .admin__data-grid-loading-mask{background:rgba(255,255,255,.5);bottom:0;left:0;position:absolute;right:0;top:0;z-index:399}.admin__data-grid-wrap-static .admin__data-grid-loading-mask .grid-loader{background:url(../images/loader-2.gif) 50% 50% no-repeat;bottom:0;height:149px;left:0;margin:auto;position:absolute;right:0;top:0;width:218px}.data-grid-filters-actions-wrap{float:right}.data-grid-search-control-wrap{float:left;max-width:45.5rem;position:relative;width:35%}.data-grid-search-control-wrap :-ms-input-placeholder{font-style:italic}.data-grid-search-control-wrap ::-webkit-input-placeholder{font-style:italic}.data-grid-search-control-wrap ::-moz-placeholder{font-style:italic}.data-grid-search-control-wrap .action-submit{background-color:transparent;border:none;border-radius:0;box-shadow:none;margin:0;padding:.6rem 2rem .2rem;position:absolute;right:0;top:1px}.data-grid-search-control-wrap .action-submit:hover{background-color:transparent;border:none;box-shadow:none}.data-grid-search-control-wrap .action-submit:active{-ms-transform:scale(0.9);transform:scale(0.9)}.data-grid-search-control-wrap .action-submit:hover:before{color:#1a1a1a}._keyfocus .data-grid-search-control-wrap .action-submit:focus{box-shadow:0 0 0 1px #008bdb}.data-grid-search-control-wrap .action-submit:before{content:'\e60c';font-size:2rem;transition:color .1s linear}.data-grid-search-control-wrap .action-submit>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.data-grid-search-control-wrap .abs-action-menu .action-submenu,.data-grid-search-control-wrap .abs-action-menu .action-submenu .action-submenu,.data-grid-search-control-wrap .action-menu,.data-grid-search-control-wrap .action-menu .action-submenu,.data-grid-search-control-wrap .actions-split .action-menu .action-submenu,.data-grid-search-control-wrap .actions-split .action-menu .action-submenu .action-submenu,.data-grid-search-control-wrap .actions-split .dropdown-menu .action-submenu,.data-grid-search-control-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{max-height:19.25rem;overflow-y:auto;z-index:398}.data-grid-search-control-wrap .action-menu-item._selected{background-color:#e0f6fe}.data-grid-search-control-wrap .data-grid-search-label{display:none}.data-grid-search-control{padding-right:6rem;width:100%}.data-grid-filters-action-wrap{float:left;padding-left:2rem}.data-grid-filters-action-wrap .action-default{font-size:1.3rem;margin-bottom:1rem;padding-left:1.7rem;padding-right:2.1rem;padding-top:.7rem}.data-grid-filters-action-wrap .action-default._active{background-color:#fff;border-bottom-color:#fff;border-right-color:#ccc;font-weight:600;margin:-.1rem 0 0;padding-bottom:1.6rem;padding-top:.8rem;position:relative;z-index:281}.data-grid-filters-action-wrap .action-default._active:after{background-color:#eb5202;bottom:100%;content:'';height:3px;left:-1px;position:absolute;right:-1px}.data-grid-filters-action-wrap .action-default:before{color:#333;content:'\e605';font-size:1.8rem;margin-right:.4rem;position:relative;top:-1px;vertical-align:top}.data-grid-filters-action-wrap .filters-active{display:none}.admin__action-grid-select .admin__control-select{margin:-.5rem .5rem 0 0;padding-bottom:.6rem;padding-top:.6rem}.admin__data-grid-filters-wrap{opacity:0;visibility:hidden;clear:both;font-size:1.3rem;transition:opacity .3s ease}.admin__data-grid-filters-wrap._show{opacity:1;visibility:visible;border-bottom:1px solid #ccc;border-top:1px solid #ccc;margin-bottom:.7rem;padding:3.6rem 0 3rem;position:relative;top:-1px;z-index:280}.admin__data-grid-filters-wrap._show .admin__data-grid-filters,.admin__data-grid-filters-wrap._show .admin__data-grid-filters-footer{display:block}.admin__data-grid-filters-wrap .admin__form-field-label,.admin__data-grid-filters-wrap .admin__form-field-legend{display:block;font-weight:700;margin:0 0 .3rem;text-align:left}.admin__data-grid-filters-wrap .admin__form-field{display:inline-block;margin-bottom:2em;margin-left:0;padding-left:2rem;padding-right:2rem;vertical-align:top;width:calc(100% / 4 - 4px)}.admin__data-grid-filters-wrap .admin__form-field .admin__form-field{display:block;float:none;margin-bottom:1.5rem;padding-left:0;padding-right:0;width:auto}.admin__data-grid-filters-wrap .admin__form-field .admin__form-field:last-child{margin-bottom:0}.admin__data-grid-filters-wrap .admin__form-field .admin__form-field .admin__form-field-label{border:1px solid transparent;float:left;font-weight:400;line-height:1.36;margin-bottom:0;padding-bottom:.6rem;padding-right:1em;padding-top:.6rem;width:25%}.admin__data-grid-filters-wrap .admin__form-field .admin__form-field .admin__form-field-control{margin-left:25%}.admin__data-grid-filters-wrap .admin__action-multiselect,.admin__data-grid-filters-wrap .admin__control-select,.admin__data-grid-filters-wrap .admin__control-text,.admin__data-grid-filters-wrap .admin__form-field-label{font-size:1.3rem}.admin__data-grid-filters-wrap .admin__control-select{height:3.2rem;padding-top:.5rem}.admin__data-grid-filters-wrap .admin__action-multiselect:before{height:3.2rem;width:3.2rem}.admin__data-grid-filters-wrap .admin__control-select,.admin__data-grid-filters-wrap .admin__control-text._has-datepicker{width:100%}.admin__data-grid-filters{display:none;margin-left:-2rem;margin-right:-2rem}.admin__filters-legend{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.admin__data-grid-filters-footer{display:none;font-size:1.4rem}.admin__data-grid-filters-footer .admin__footer-main-actions{margin-left:25%;text-align:right}.admin__data-grid-filters-footer .admin__footer-secondary-actions{float:left;width:50%}.admin__data-grid-filters-current{border-bottom:.1rem solid #ccc;border-top:.1rem solid #ccc;display:none;font-size:1.3rem;margin-bottom:.9rem;padding-bottom:.8rem;padding-top:1.1rem;width:100%}.admin__data-grid-filters-current._show{display:table;position:relative;top:-1px;z-index:3}.admin__data-grid-filters-current._show+.admin__data-grid-filters-wrap._show{margin-top:-1rem}.admin__current-filters-actions-wrap,.admin__current-filters-list-wrap,.admin__current-filters-title-wrap{display:table-cell;vertical-align:top}.admin__current-filters-title{margin-right:1em;white-space:nowrap}.admin__current-filters-list-wrap{width:100%}.admin__current-filters-list{margin-bottom:0}.admin__current-filters-list>li{display:inline-block;font-weight:600;margin:0 1rem .5rem;padding-right:2.6rem;position:relative}.admin__current-filters-list .action-remove{background-color:transparent;border:none;border-radius:0;box-shadow:none;margin:0;padding:0;line-height:1;position:absolute;right:0;top:1px}.admin__current-filters-list .action-remove:hover{background-color:transparent;border:none;box-shadow:none}.admin__current-filters-list .action-remove:hover:before{color:#949494}.admin__current-filters-list .action-remove:active{-ms-transform:scale(0.9);transform:scale(0.9)}.admin__current-filters-list .action-remove:before{color:#adadad;content:'\e620';font-size:1.6rem;transition:color .1s linear}.admin__current-filters-list .action-remove>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.admin__current-filters-actions-wrap .action-clear{border:none;padding-bottom:0;padding-top:0;white-space:nowrap}.admin__data-grid-pager-wrap{float:right;text-align:right}.admin__data-grid-pager{display:inline-block;margin-left:3rem}.admin__data-grid-pager .admin__control-text::-webkit-inner-spin-button,.admin__data-grid-pager .admin__control-text::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.admin__data-grid-pager .admin__control-text{-moz-appearance:textfield;text-align:center;width:4.4rem}.action-next,.action-previous{width:4.4rem}.action-next:before,.action-previous:before{font-weight:700}.action-next>span,.action-previous>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.action-previous{margin-right:2.5rem;text-indent:-.25em}.action-previous:before{content:'\e629'}.action-next{margin-left:1.5rem;text-indent:.1em}.action-next:before{content:'\e62a'}.admin__data-grid-action-bookmarks{opacity:.98}.admin__data-grid-action-bookmarks .admin__action-dropdown-text:after{left:0;right:-6px}.admin__data-grid-action-bookmarks._active{z-index:290}.admin__data-grid-action-bookmarks .admin__action-dropdown .admin__action-dropdown-text{display:inline-block;max-width:15rem;min-width:4.9rem;vertical-align:top;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin__data-grid-action-bookmarks .admin__action-dropdown:before{content:'\e60f'}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu{font-size:1.3rem;left:0;padding:1rem 0;right:auto}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu>li{padding:0 5rem 0 0;position:relative;white-space:nowrap}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu>li:not(.action-dropdown-menu-action){transition:background-color .1s linear}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu>li:not(.action-dropdown-menu-action):hover{background-color:#e3e3e3}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item{max-width:23rem;min-width:18rem;white-space:normal;word-break:break-all}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item-edit{display:none;padding-bottom:1rem;padding-left:1rem;padding-top:1rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item-edit .action-dropdown-menu-item-actions{padding-bottom:1rem;padding-top:1rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-action{padding-left:1rem;padding-top:1rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-action+.action-dropdown-menu-item-last{padding-top:.5rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-action>a{color:#008bdb;text-decoration:none;display:inline-block;padding-left:1.1rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-action>a:hover{color:#0fa7ff;text-decoration:underline}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item-last{padding-bottom:0}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu ._edit .action-dropdown-menu-item{display:none}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu ._edit .action-dropdown-menu-item-edit{display:block}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu ._active .action-dropdown-menu-link{font-weight:600}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .admin__control-text{font-size:1.3rem;min-width:15rem;width:calc(100% - 4rem)}.ie9 .admin__data-grid-action-bookmarks .admin__action-dropdown-menu .admin__control-text{width:15rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item-actions{border-left:1px solid #fff;bottom:0;position:absolute;right:0;top:0;width:5rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-link{color:#333;display:block;text-decoration:none;padding:1rem 1rem 1rem 2.1rem}.admin__data-grid-action-bookmarks .action-delete,.admin__data-grid-action-bookmarks .action-edit,.admin__data-grid-action-bookmarks .action-submit{background-color:transparent;border:none;border-radius:0;box-shadow:none;margin:0;vertical-align:top}.admin__data-grid-action-bookmarks .action-delete:hover,.admin__data-grid-action-bookmarks .action-edit:hover,.admin__data-grid-action-bookmarks .action-submit:hover{background-color:transparent;border:none;box-shadow:none}.admin__data-grid-action-bookmarks .action-delete:before,.admin__data-grid-action-bookmarks .action-edit:before,.admin__data-grid-action-bookmarks .action-submit:before{font-size:1.7rem}.admin__data-grid-action-bookmarks .action-delete>span,.admin__data-grid-action-bookmarks .action-edit>span,.admin__data-grid-action-bookmarks .action-submit>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.admin__data-grid-action-bookmarks .action-delete,.admin__data-grid-action-bookmarks .action-edit{padding:.6rem 1.4rem}.admin__data-grid-action-bookmarks .action-delete:active,.admin__data-grid-action-bookmarks .action-edit:active{-ms-transform:scale(0.9);transform:scale(0.9)}.admin__data-grid-action-bookmarks .action-submit{padding:.6rem 1rem .6rem .8rem}.admin__data-grid-action-bookmarks .action-submit:active{position:relative;right:-1px}.admin__data-grid-action-bookmarks .action-submit:before{content:'\e625'}.admin__data-grid-action-bookmarks .action-delete:before{content:'\e630'}.admin__data-grid-action-bookmarks .action-edit{padding-top:.8rem}.admin__data-grid-action-bookmarks .action-edit:before{content:'\e631'}.admin__data-grid-action-columns._active{opacity:.98;z-index:290}.admin__data-grid-action-columns .admin__action-dropdown:before{content:'\e610';font-size:1.8rem;margin-right:.7rem;vertical-align:top}.admin__data-grid-action-columns-menu{color:#303030;font-size:1.3rem;overflow:hidden;padding:2.2rem 3.5rem 1rem;z-index:1}.admin__data-grid-action-columns-menu._overflow .admin__action-dropdown-menu-header{border-bottom:1px solid #d1d1d1}.admin__data-grid-action-columns-menu._overflow .admin__action-dropdown-menu-content{width:49.2rem}.admin__data-grid-action-columns-menu._overflow .admin__action-dropdown-menu-footer{border-top:1px solid #d1d1d1;padding-top:2.5rem}.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-content{max-height:22.85rem;overflow-y:auto;padding-top:1.5rem;position:relative;width:47.4rem}.admin__data-grid-action-columns-menu .admin__field-option{float:left;height:1.9rem;margin-bottom:1.5rem;padding:0 1rem 0 0;width:15.8rem}.admin__data-grid-action-columns-menu .admin__field-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-header{padding-bottom:1.5rem}.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-footer{padding:1rem 0 2rem}.admin__data-grid-action-columns-menu .admin__action-dropdown-footer-main-actions{margin-left:25%;text-align:right}.admin__data-grid-action-columns-menu .admin__action-dropdown-footer-secondary-actions{float:left;margin-left:-1em}.admin__data-grid-action-export._active{opacity:.98;z-index:290}.admin__data-grid-action-export .admin__action-dropdown:before{content:'\e635';font-size:1.7rem;left:.3rem;margin-right:.7rem;vertical-align:top}.admin__data-grid-action-export-menu{padding-left:2rem;padding-right:2rem;padding-top:1rem}.admin__data-grid-action-export-menu .admin__action-dropdown-footer-main-actions{padding-bottom:2rem;padding-top:2.5rem;white-space:nowrap}.sticky-header{background-color:#f8f8f8;border-bottom:1px solid #e3e3e3;box-shadow:0 5px 5px 0 rgba(0,0,0,.25);left:8.8rem;margin-top:-1px;padding:.5rem 3rem 0;position:fixed;right:0;top:77px;z-index:398}.sticky-header .admin__data-grid-wrap{margin-bottom:0;overflow-x:visible;padding-bottom:0}.sticky-header .admin__data-grid-header-row{position:relative;text-align:right}.sticky-header .admin__data-grid-header-row:last-child{margin:0}.sticky-header .admin__data-grid-actions-wrap,.sticky-header .admin__data-grid-filters-wrap,.sticky-header .admin__data-grid-pager-wrap,.sticky-header .data-grid-filters-actions-wrap,.sticky-header .data-grid-search-control-wrap{display:inline-block;float:none;vertical-align:top}.sticky-header .action-select-wrap{float:left;margin-right:1.5rem;width:16.66666667%}.sticky-header .admin__control-support-text{float:left}.sticky-header .data-grid-search-control-wrap{margin:-.5rem 0 0 1.1rem;width:auto}.sticky-header .data-grid-search-control-wrap .data-grid-search-label{box-sizing:border-box;cursor:pointer;display:block;min-width:3.8rem;padding:1.2rem .6rem 1.7rem;position:relative;text-align:center}.sticky-header .data-grid-search-control-wrap .data-grid-search-label:before{color:#333;content:'\e60c';font-size:2rem;transition:color .1s linear}.sticky-header .data-grid-search-control-wrap .data-grid-search-label:hover:before{color:#000}.sticky-header .data-grid-search-control-wrap .data-grid-search-label span{display:none}.sticky-header .data-grid-filters-actions-wrap{margin:-.5rem 0 0 1.1rem;padding-left:0;position:relative}.sticky-header .data-grid-filters-actions-wrap .action-default{background-color:transparent;border:1px solid transparent;box-sizing:border-box;min-width:3.8rem;padding:1.2rem .6rem 1.7rem;text-align:center;transition:all .15s ease}.sticky-header .data-grid-filters-actions-wrap .action-default span{display:none}.sticky-header .data-grid-filters-actions-wrap .action-default:before{margin:0}.sticky-header .data-grid-filters-actions-wrap .action-default._active{background-color:#fff;border-color:#adadad #adadad #fff;box-shadow:1px 1px 5px rgba(0,0,0,.5);z-index:210}.sticky-header .data-grid-filters-actions-wrap .action-default._active:after{background-color:#fff;content:'';height:6px;left:-2px;position:absolute;right:-6px;top:100%}.sticky-header .data-grid-filters-action-wrap{padding:0}.sticky-header .admin__data-grid-filters-wrap{background-color:#fff;border:1px solid #adadad;box-shadow:0 5px 5px 0 rgba(0,0,0,.25);left:0;padding-left:3.5rem;padding-right:3.5rem;position:absolute;top:100%;width:100%;z-index:209}.sticky-header .admin__data-grid-filters-current+.admin__data-grid-filters-wrap._show{margin-top:-6px}.sticky-header .filters-active{background-color:#e04f00;border-radius:10px;color:#fff;display:block;font-size:1.4rem;font-weight:700;padding:.1rem .7rem;position:absolute;right:-7px;top:0;z-index:211}.sticky-header .filters-active:empty{padding-bottom:0;padding-top:0}.sticky-header .admin__data-grid-actions-wrap{margin:-.5rem 0 0 1.1rem;padding-right:.3rem}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown{background-color:transparent;box-sizing:border-box;min-width:3.8rem;padding-left:.6rem;padding-right:.6rem;text-align:center}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown .admin__action-dropdown-text{display:inline-block;max-width:0;min-width:0;overflow:hidden}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown:before{margin:0}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown-wrap{margin-right:1.1rem}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown-wrap:after,.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown:after{display:none}.sticky-header .admin__data-grid-actions-wrap ._active .admin__action-dropdown{background-color:#fff}.sticky-header .admin__data-grid-action-bookmarks .admin__action-dropdown:before{position:relative;top:-3px}.sticky-header .admin__data-grid-filters-current{border-bottom:0;border-top:0;margin-bottom:0;padding-bottom:0;padding-top:0}.sticky-header .admin__data-grid-pager .admin__control-text,.sticky-header .admin__data-grid-pager-wrap .admin__control-support-text,.sticky-header .data-grid-search-control-wrap .action-submit,.sticky-header .data-grid-search-control-wrap .data-grid-search-control{display:none}.sticky-header .action-next{margin:0}.sticky-header .data-grid{margin-bottom:-1px}.data-grid-cap-left,.data-grid-cap-right{background-color:#f8f8f8;bottom:-2px;position:absolute;top:6rem;width:3rem;z-index:201}.data-grid-cap-left{left:0}.admin__data-grid-header{font-size:1.4rem}.admin__data-grid-header-row+.admin__data-grid-header-row{margin-top:1.1rem}.admin__data-grid-header-row:last-child{margin-bottom:0}.admin__data-grid-header-row .action-select-wrap{display:block}.admin__data-grid-header-row .action-select{width:100%}.admin__data-grid-actions-wrap{float:right;margin-left:1.1rem;margin-top:-.5rem;text-align:right}.admin__data-grid-actions-wrap .admin__action-dropdown-wrap{position:relative;text-align:left;vertical-align:middle}.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._active+.admin__action-dropdown-wrap:after,.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._active:after,.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._hide+.admin__action-dropdown-wrap:after,.admin__data-grid-actions-wrap .admin__action-dropdown-wrap:first-child:after{display:none}.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._active .admin__action-dropdown,.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._active .admin__action-dropdown-menu{border-color:#adadad}.admin__data-grid-actions-wrap .admin__action-dropdown-wrap:after{border-left:1px solid #ccc;content:'';height:3.2rem;left:0;position:absolute;top:.5rem;z-index:3}.admin__data-grid-actions-wrap .admin__action-dropdown{padding-bottom:1.7rem;padding-top:1.2rem}.admin__data-grid-actions-wrap .admin__action-dropdown:after{margin-top:-.4rem}.admin__data-grid-outer-wrap{min-height:8rem;position:relative}.admin__data-grid-wrap{margin-bottom:2rem;max-width:100%;overflow-x:auto;padding-bottom:1rem;padding-top:2rem}.admin__data-grid-loading-mask{background:rgba(255,255,255,.5);bottom:0;left:0;position:absolute;right:0;top:0;z-index:399}.admin__data-grid-loading-mask .spinner{font-size:4rem;left:50%;margin-left:-2rem;margin-top:-2rem;position:absolute;top:50%}.ie9 .admin__data-grid-loading-mask .spinner{background:url(../images/loader-2.gif) 50% 50% no-repeat;bottom:0;height:149px;left:0;margin:auto;position:absolute;right:0;top:0;width:218px}.data-grid-cell-content{display:inline-block;overflow:hidden;width:100%}body._in-resize{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body._in-resize *,body._in-resize .data-grid-th,body._in-resize .data-grid-th._draggable,body._in-resize .data-grid-th._sortable{cursor:col-resize!important}._layout-fixed{table-layout:fixed}.data-grid{border:none;font-size:1.3rem;margin-bottom:0;width:100%}.data-grid:not(._dragging-copy) ._odd-row td._dragging{background-color:#d0d0d0}.data-grid:not(._dragging-copy) ._dragging{background-color:#d9d9d9;color:rgba(48,48,48,.95)}.data-grid:not(._dragging-copy) ._dragging a{color:rgba(0,139,219,.95)}.data-grid:not(._dragging-copy) ._dragging a:hover{color:rgba(15,167,255,.95)}.data-grid._dragged{outline:#007bdb solid 1px}.data-grid thead{background-color:transparent}.data-grid tfoot th{padding:1rem}.data-grid tr._odd-row td{background-color:#f5f5f5}.data-grid tr._odd-row td._update-status-active{background:#89e1ff}.data-grid tr._odd-row td._update-status-upcoming{background:#b7ee63}.data-grid tr:hover td._update-status-active,.data-grid tr:hover td._update-status-upcoming{background-color:#e5f7fe}.data-grid tr.data-grid-tr-no-data td{font-size:1.6rem;padding:3rem;text-align:center}.data-grid tr.data-grid-tr-no-data:hover td{background-color:#fff;cursor:default}.data-grid tr:active td{background-color:#e0f6fe}.data-grid tr:hover td{background-color:#e5f7fe}.data-grid tr._dragged td{background:#d0d0d0}.data-grid tr._dragover-top td{box-shadow:inset 0 3px 0 0 #008bdb}.data-grid tr._dragover-bottom td{box-shadow:inset 0 -3px 0 0 #008bdb}.data-grid tr:not(.data-grid-editable-row):last-child td{border-bottom:.1rem solid #d6d6d6}.data-grid tr ._clickable,.data-grid tr._clickable{cursor:pointer}.data-grid tr._disabled{pointer-events:none}.data-grid td,.data-grid th{font-size:1.3rem;line-height:1.36;transition:background-color .1s linear;vertical-align:top}.data-grid td._resizing,.data-grid th._resizing{border-left:1px solid #007bdb;border-right:1px solid #007bdb}.data-grid td._hidden,.data-grid th._hidden{display:none}.data-grid td._fit,.data-grid th._fit{width:1%}.data-grid td{background-color:#fff;border-left:.1rem dashed #d6d6d6;border-right:.1rem dashed #d6d6d6;color:#303030;padding:1rem}.data-grid td:first-child{border-left-style:solid}.data-grid td:last-child{border-right-style:solid}.data-grid td .action-select-wrap{position:static}.data-grid td .action-select{color:#008bdb;text-decoration:none;background-color:transparent;border:none;font-size:1.3rem;padding:0 3rem 0 0;position:relative}.data-grid td .action-select:hover{color:#0fa7ff;text-decoration:underline}.data-grid td .action-select:hover:after{border-color:#0fa7ff transparent transparent}.data-grid td .action-select:after{border-color:#008bdb transparent transparent;margin:.6rem 0 0 .7rem;right:auto;top:auto}.data-grid td .action-select:before{display:none}.data-grid td .abs-action-menu .action-submenu,.data-grid td .abs-action-menu .action-submenu .action-submenu,.data-grid td .action-menu,.data-grid td .action-menu .action-submenu,.data-grid td .actions-split .action-menu .action-submenu,.data-grid td .actions-split .action-menu .action-submenu .action-submenu,.data-grid td .actions-split .dropdown-menu .action-submenu,.data-grid td .actions-split .dropdown-menu .action-submenu .action-submenu{left:auto;min-width:10rem;right:0;text-align:left;top:auto;z-index:1}.data-grid td._update-status-active{background:#bceeff}.data-grid td._update-status-upcoming{background:#ccf391}.data-grid th{background-color:#514943;border:.1rem solid #8a837f;border-left-color:transparent;color:#fff;font-weight:600;padding:0;text-align:left}.data-grid th:first-child{border-left-color:#8a837f}.data-grid th._dragover-left{box-shadow:inset 3px 0 0 0 #fff;z-index:2}.data-grid th._dragover-right{box-shadow:inset -3px 0 0 0 #fff}.data-grid .shadow-div{cursor:col-resize;height:100%;margin-right:-5px;position:absolute;right:0;top:0;width:10px}.data-grid .data-grid-th{background-clip:padding-box;color:#fff;padding:1rem;position:relative;vertical-align:middle}.data-grid .data-grid-th._resize-visible .shadow-div{cursor:auto;display:none}.data-grid .data-grid-th._draggable{cursor:grab}.data-grid .data-grid-th._sortable{cursor:pointer;transition:background-color .1s linear;z-index:1}.data-grid .data-grid-th._sortable:focus,.data-grid .data-grid-th._sortable:hover{background-color:#5f564f}.data-grid .data-grid-th._sortable:active{padding-bottom:.9rem;padding-top:1.1rem}.data-grid .data-grid-th.required>span:after{color:#f38a5e;content:'*';margin-left:.3rem}.data-grid .data-grid-checkbox-cell{overflow:hidden;padding:0;vertical-align:top;width:5.2rem}.data-grid .data-grid-checkbox-cell:hover{cursor:default}.data-grid .data-grid-thumbnail-cell{text-align:center;width:7rem}.data-grid .data-grid-thumbnail-cell img{border:1px solid #d6d6d6;width:5rem}.data-grid .data-grid-multicheck-cell{padding:1rem 1rem .9rem;text-align:center;vertical-align:middle}.data-grid .data-grid-onoff-cell{text-align:center;width:12rem}.data-grid .data-grid-actions-cell{padding-left:2rem;padding-right:2rem;text-align:center;width:1%}.data-grid._hidden{display:none}.data-grid._dragging-copy{box-shadow:1px 1px 5px rgba(0,0,0,.5);left:0;opacity:.95;position:fixed;top:0;z-index:1000}.data-grid._dragging-copy .data-grid-th{border:1px solid #007bdb;border-bottom:none}.data-grid._dragging-copy .data-grid-th,.data-grid._dragging-copy .data-grid-th._sortable{cursor:grabbing}.data-grid._dragging-copy tr:last-child td{border-bottom:1px solid #007bdb}.data-grid._dragging-copy td{border-left:1px solid #007bdb;border-right:1px solid #007bdb}.data-grid._dragging-copy._in-edit .data-grid-editable-row.data-grid-bulk-edit-panel td,.data-grid._dragging-copy._in-edit .data-grid-editable-row.data-grid-bulk-edit-panel td:before,.data-grid._dragging-copy._in-edit .data-grid-editable-row.data-grid-bulk-edit-panel:hover td{background-color:rgba(255,251,230,.95)}.data-grid._dragging-copy._in-edit .data-grid-editable-row td,.data-grid._dragging-copy._in-edit .data-grid-editable-row:hover td{background-color:rgba(255,255,255,.95)}.data-grid._dragging-copy._in-edit .data-grid-editable-row td:after,.data-grid._dragging-copy._in-edit .data-grid-editable-row td:before{left:0;right:0}.data-grid._dragging-copy._in-edit .data-grid-editable-row td:before{background-color:rgba(255,255,255,.95)}.data-grid._dragging-copy._in-edit .data-grid-editable-row td:only-child{border-left:1px solid #007bdb;border-right:1px solid #007bdb;left:0}.data-grid._dragging-copy._in-edit .data-grid-editable-row .admin__control-select,.data-grid._dragging-copy._in-edit .data-grid-editable-row .admin__control-text{opacity:.5}.data-grid .data-grid-controls-row td{padding-top:1.6rem}.data-grid .data-grid-controls-row td.data-grid-checkbox-cell{padding-top:.6rem}.data-grid .data-grid-controls-row td [class*=admin__control-],.data-grid .data-grid-controls-row td button{margin-top:-1.7rem}.data-grid._in-edit tr:hover td{background-color:#e6e6e6}.data-grid._in-edit ._odd-row.data-grid-editable-row td,.data-grid._in-edit ._odd-row.data-grid-editable-row:hover td{background-color:#fff}.data-grid._in-edit ._odd-row td,.data-grid._in-edit ._odd-row:hover td{background-color:#dcdcdc}.data-grid._in-edit .data-grid-editable-row-actions td,.data-grid._in-edit .data-grid-editable-row-actions:hover td{background-color:#fff}.data-grid._in-edit td{background-color:#e6e6e6;pointer-events:none}.data-grid._in-edit .data-grid-checkbox-cell{pointer-events:auto}.data-grid._in-edit .data-grid-editable-row{border:.1rem solid #adadad;border-bottom-color:#c2c2c2}.data-grid._in-edit .data-grid-editable-row:hover td{background-color:#fff}.data-grid._in-edit .data-grid-editable-row td{background-color:#fff;border-bottom-color:#fff;border-left-style:hidden;border-right-style:hidden;border-top-color:#fff;pointer-events:auto;vertical-align:middle}.data-grid._in-edit .data-grid-editable-row td:first-child{border-left-color:#adadad;border-left-style:solid}.data-grid._in-edit .data-grid-editable-row td:first-child:after,.data-grid._in-edit .data-grid-editable-row td:first-child:before{left:0}.data-grid._in-edit .data-grid-editable-row td:last-child{border-right-color:#adadad;border-right-style:solid;left:-.1rem}.data-grid._in-edit .data-grid-editable-row td:last-child:after,.data-grid._in-edit .data-grid-editable-row td:last-child:before{right:0}.data-grid._in-edit .data-grid-editable-row .admin__control-select,.data-grid._in-edit .data-grid-editable-row .admin__control-text{width:100%}.data-grid._in-edit .data-grid-bulk-edit-panel td{vertical-align:bottom}.data-grid .data-grid-editable-row td{border-left-color:#fff;border-left-style:solid;position:relative;z-index:1}.data-grid .data-grid-editable-row td:after{bottom:0;box-shadow:0 5px 5px rgba(0,0,0,.25);content:'';height:.9rem;left:0;margin-top:-1rem;position:absolute;right:0}.data-grid .data-grid-editable-row td:before{background-color:#fff;bottom:0;content:'';height:1rem;left:-10px;position:absolute;right:-10px;z-index:1}.data-grid .data-grid-editable-row.data-grid-editable-row-actions td,.data-grid .data-grid-editable-row.data-grid-editable-row-actions:hover td{background-color:#fff}.data-grid .data-grid-editable-row.data-grid-editable-row-actions td:first-child{border-left-color:#fff;border-right-color:#fff}.data-grid .data-grid-editable-row.data-grid-editable-row-actions td:last-child{left:0}.data-grid .data-grid-editable-row.data-grid-bulk-edit-panel td,.data-grid .data-grid-editable-row.data-grid-bulk-edit-panel td:before,.data-grid .data-grid-editable-row.data-grid-bulk-edit-panel:hover td{background-color:#fffbe6}.data-grid .data-grid-editable-row-actions{left:50%;margin-left:-12.5rem;margin-top:-2px;position:absolute;text-align:center}.data-grid .data-grid-editable-row-actions td{width:25rem}.data-grid .data-grid-editable-row-actions [class*=action-]{min-width:9rem}.data-grid .data-grid-draggable-row-cell{width:1%}.data-grid .data-grid-draggable-row-cell .draggable-handle{padding:0}.data-grid-th._sortable._ascend,.data-grid-th._sortable._descend{padding-right:2.7rem}.data-grid-th._sortable._ascend:before,.data-grid-th._sortable._descend:before{margin-top:-1em;position:absolute;right:1rem;top:50%}.data-grid-th._sortable._ascend:before{content:'\2193'}.data-grid-th._sortable._descend:before{content:'\2191'}.data-grid-checkbox-cell-inner{display:block;padding:1.1rem 1.8rem .9rem;text-align:right}.data-grid-checkbox-cell-inner:hover{cursor:pointer}.data-grid-state-cell-inner{display:block;padding:1.1rem 1.8rem .9rem;text-align:center}.data-grid-state-cell-inner>span{display:inline-block;font-style:italic;padding:.6rem 0}.data-grid-row-parent._active>td .data-grid-checkbox-cell-inner:before{content:'\e62b'}.data-grid-row-parent>td .data-grid-checkbox-cell-inner{padding-left:3.7rem;position:relative}.data-grid-row-parent>td .data-grid-checkbox-cell-inner:before{content:'\e628';font-size:1rem;font-weight:700;left:1.35rem;position:absolute;top:1.6rem}.data-grid-th._col-xs{width:1%}.data-grid-info-panel{box-shadow:0 0 5px rgba(0,0,0,.5);margin:2rem .1rem -2rem}.data-grid-info-panel .messages{overflow:hidden}.data-grid-info-panel .messages .message{margin:1rem}.data-grid-info-panel .messages .message:last-child{margin-bottom:1rem}.data-grid-info-panel-actions{padding:1rem;text-align:right}.data-grid-editable-row .admin__field-control{position:relative}.data-grid-editable-row .admin__field-control._error:after{border-color:transparent #ee7d7d transparent transparent;border-style:solid;border-width:0 12px 12px 0;content:'';position:absolute;right:0;top:0}.data-grid-editable-row .admin__field-control._error .admin__control-text{border-color:#ee7d7d}.data-grid-editable-row .admin__field-control._focus:after{display:none}.data-grid-editable-row .admin__field-error{bottom:100%;box-shadow:1px 1px 5px rgba(0,0,0,.5);left:0;margin:0 auto 1.5rem;max-width:32rem;position:absolute;right:0}.data-grid-editable-row .admin__field-error:after,.data-grid-editable-row .admin__field-error:before{border-style:solid;content:'';left:50%;position:absolute;top:100%}.data-grid-editable-row .admin__field-error:after{border-color:#fffbbb transparent transparent;border-width:10px 10px 0;margin-left:-10px;z-index:1}.data-grid-editable-row .admin__field-error:before{border-color:#ee7d7d transparent transparent;border-width:11px 12px 0;margin-left:-12px}.data-grid-bulk-edit-panel .admin__field-label-vertical{display:block;font-size:1.2rem;margin-bottom:.5rem;text-align:left}.data-grid-row-changed{cursor:default;display:block;opacity:.5;position:relative;width:100%;z-index:1}.data-grid-row-changed:after{content:'\e631';display:inline-block}.data-grid-row-changed .data-grid-row-changed-tooltip{background:#f1f1f1;border:1px solid #f1f1f1;border-radius:1px;bottom:100%;box-shadow:0 3px 9px 0 rgba(0,0,0,.3);display:none;font-weight:400;line-height:1.36;margin-bottom:1.5rem;padding:1rem;position:absolute;right:-1rem;text-transform:none;width:27rem;word-break:normal;z-index:2}.data-grid-row-changed._changed{opacity:1;z-index:3}.data-grid-row-changed._changed:hover .data-grid-row-changed-tooltip{display:block}.data-grid-row-changed._changed:hover:before{background:#f1f1f1;border:1px solid #f1f1f1;bottom:100%;box-shadow:4px 4px 3px -1px rgba(0,0,0,.15);content:'';display:block;height:1.6rem;left:50%;margin:0 0 .7rem -.8rem;position:absolute;-ms-transform:rotate(45deg);transform:rotate(45deg);width:1.6rem;z-index:3}.ie9 .data-grid-row-changed._changed:hover:before{display:none}.admin__data-grid-outer-wrap .data-grid-checkbox-cell{overflow:hidden}.admin__data-grid-outer-wrap .data-grid-checkbox-cell-inner{position:relative}.admin__data-grid-outer-wrap .data-grid-checkbox-cell-inner:before{bottom:0;content:'';height:500%;left:0;position:absolute;right:0;top:0}.admin__data-grid-wrap-static .data-grid-checkbox-cell:hover{cursor:pointer}.admin__data-grid-wrap-static .data-grid-checkbox-cell-inner{margin:1.1rem 1.8rem .9rem;padding:0}.adminhtml-cms-hierarchy-index .admin__data-grid-wrap-static .data-grid-actions-cell:first-child{padding:0}.adminhtml-export-index .admin__data-grid-wrap-static .data-grid-checkbox-cell-inner{margin:0;padding:1.1rem 1.8rem 1.9rem}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child:before,.admin__control-file-label:before,.admin__control-multiselect,.admin__control-select,.admin__control-text,.admin__control-textarea,.selectmenu{-webkit-appearance:none;background-color:#fff;border:1px solid #adadad;border-radius:1px;box-shadow:none;color:#303030;font-size:1.4rem;font-weight:400;height:auto;line-height:1.36;padding:.6rem 1rem;transition:border-color .1s linear;vertical-align:baseline;width:auto}.admin__control-addon [class*=admin__control-][class]:hover~[class*=admin__addon-]:last-child:before,.admin__control-multiselect:hover,.admin__control-select:hover,.admin__control-text:hover,.admin__control-textarea:hover,.selectmenu:hover,.selectmenu:hover .selectmenu-toggle:before{border-color:#878787}.admin__control-addon [class*=admin__control-][class]:focus~[class*=admin__addon-]:last-child:before,.admin__control-file:active+.admin__control-file-label:before,.admin__control-file:focus+.admin__control-file-label:before,.admin__control-multiselect:focus,.admin__control-select:focus,.admin__control-text:focus,.admin__control-textarea:focus,.selectmenu._focus,.selectmenu._focus .selectmenu-toggle:before{border-color:#007bdb;box-shadow:none;outline:0}.admin__control-addon [class*=admin__control-][class][disabled]~[class*=admin__addon-]:last-child:before,.admin__control-file[disabled]+.admin__control-file-label:before,.admin__control-multiselect[disabled],.admin__control-select[disabled],.admin__control-text[disabled],.admin__control-textarea[disabled]{background-color:#e9e9e9;border-color:#adadad;color:#303030;cursor:not-allowed;opacity:.5}.admin__field-row[class]>.admin__field-control,.admin__fieldset>.admin__field.admin__field-wide[class]>.admin__field-control{clear:left;float:none;text-align:left;width:auto}.admin__field-row[class]:not(.admin__field-option)>.admin__field-label,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option)>.admin__field-label{display:block;line-height:1.4rem;margin-bottom:.86rem;margin-top:-.14rem;text-align:left;width:auto}.admin__field-row[class]:not(.admin__field-option)>.admin__field-label:before,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option)>.admin__field-label:before{display:none}.admin__field-row[class]:not(.admin__field-option)._required>.admin__field-label span,.admin__field-row[class]:not(.admin__field-option).required>.admin__field-label span,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option)._required>.admin__field-label span,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option).required>.admin__field-label span{padding-left:1.5rem}.admin__field-row[class]:not(.admin__field-option)._required>.admin__field-label span:after,.admin__field-row[class]:not(.admin__field-option).required>.admin__field-label span:after,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option)._required>.admin__field-label span:after,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option).required>.admin__field-label span:after{left:0;margin-left:30px}.admin__legend{font-size:1.8rem;font-weight:600;margin-bottom:3rem}.admin__control-checkbox,.admin__control-radio{cursor:pointer;opacity:.01;overflow:hidden;position:absolute;vertical-align:top}.admin__control-checkbox:after,.admin__control-radio:after{display:none}.admin__control-checkbox+label,.admin__control-radio+label{cursor:pointer;display:inline-block}.admin__control-checkbox+label:before,.admin__control-radio+label:before{background-color:#fff;border:1px solid #adadad;color:transparent;float:left;height:1.6rem;text-align:center;vertical-align:top;width:1.6rem}.admin__control-checkbox+.admin__field-label,.admin__control-radio+.admin__field-label{padding-left:2.6rem}.admin__control-checkbox+.admin__field-label:before,.admin__control-radio+.admin__field-label:before{margin:1px 1rem 0 -2.6rem}.admin__control-checkbox:checked+label:before,.admin__control-radio:checked+label:before{color:#514943}.admin__control-checkbox.disabled+label,.admin__control-checkbox[disabled]+label,.admin__control-radio.disabled+label,.admin__control-radio[disabled]+label{color:#303030;cursor:default;opacity:.5}.admin__control-checkbox.disabled+label:before,.admin__control-checkbox[disabled]+label:before,.admin__control-radio.disabled+label:before,.admin__control-radio[disabled]+label:before{background-color:#e9e9e9;border-color:#adadad;cursor:default}._keyfocus .admin__control-checkbox:not(.disabled):focus+label:before,._keyfocus .admin__control-checkbox:not([disabled]):focus+label:before,._keyfocus .admin__control-radio:not(.disabled):focus+label:before,._keyfocus .admin__control-radio:not([disabled]):focus+label:before{border-color:#007bdb}.admin__control-checkbox:not(.disabled):hover+label:before,.admin__control-checkbox:not([disabled]):hover+label:before,.admin__control-radio:not(.disabled):hover+label:before,.admin__control-radio:not([disabled]):hover+label:before{border-color:#878787}.admin__control-radio+label:before{border-radius:1.6rem;content:'';transition:border-color .1s linear,color .1s ease-in}.admin__control-radio.admin__control-radio+label:before{line-height:140%}.admin__control-radio:checked+label{position:relative}.admin__control-radio:checked+label:after{background-color:#514943;border-radius:50%;content:'';height:10px;left:3px;position:absolute;top:4px;width:10px}.admin__control-radio:checked:not(.disabled):hover,.admin__control-radio:checked:not(.disabled):hover+label,.admin__control-radio:checked:not([disabled]):hover,.admin__control-radio:checked:not([disabled]):hover+label{cursor:default}.admin__control-radio:checked:not(.disabled):hover+label:before,.admin__control-radio:checked:not([disabled]):hover+label:before{border-color:#adadad}.admin__control-checkbox+label:before{border-radius:1px;content:'';font-size:0;transition:font-size .1s ease-out,color .1s ease-out,border-color .1s linear}.admin__control-checkbox:checked+label:before{content:'\e62d';font-size:1.1rem;line-height:125%}.admin__control-checkbox:not(:checked)._indeterminate+label:before,.admin__control-checkbox:not(:checked):indeterminate+label:before{color:#514943;content:'-';font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.4rem;font-weight:700}input[type=checkbox].admin__control-checkbox,input[type=radio].admin__control-checkbox{margin:0;position:absolute}.admin__control-text{min-width:4rem}.admin__control-select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background-image:url(../images/arrows-bg.svg),linear-gradient(#e3e3e3,#e3e3e3),linear-gradient(#adadad,#adadad);background-position:calc(100% - 12px) -34px,100%,calc(100% - 3.2rem) 0;background-size:auto,3.2rem 100%,1px 100%;background-repeat:no-repeat;max-width:100%;min-width:8.5rem;padding-bottom:.5rem;padding-right:4.4rem;padding-top:.5rem;transition:border-color .1s linear}.admin__control-select:hover{border-color:#878787;cursor:pointer}.admin__control-select:focus{background-image:url(../images/arrows-bg.svg),linear-gradient(#e3e3e3,#e3e3e3),linear-gradient(#007bdb,#007bdb);background-position:calc(100% - 12px) 13px,100%,calc(100% - 3.2rem) 0;border-color:#007bdb}.admin__control-select::-ms-expand{display:none}.ie9 .admin__control-select{background-image:none;padding-right:1rem}option:empty{display:none}.admin__control-multiselect{height:auto;max-width:100%;min-width:15rem;overflow:auto;padding:0;resize:both}.admin__control-multiselect optgroup,.admin__control-multiselect option{padding:.5rem 1rem}.admin__control-file-wrapper{display:inline-block;padding:.5rem 1rem;position:relative;z-index:1}.admin__control-file-label:before{content:'';left:0;position:absolute;top:0;width:100%;z-index:0}.admin__control-file{background:0 0;border:0;padding-top:.7rem;position:relative;width:auto;z-index:1}.admin__control-support-text{border:1px solid transparent;display:inline-block;font-size:1.4rem;line-height:1.36;padding-bottom:.6rem;padding-top:.6rem}.admin__control-support-text+[class*=admin__control-],[class*=admin__control-]+.admin__control-support-text{margin-left:.7rem}.admin__control-service{float:left;margin:.8rem 0 0 3rem}.admin__control-textarea{height:8.48rem;line-height:1.18;padding-top:.8rem;resize:vertical}.admin__control-addon{-ms-flex-direction:row;flex-direction:row;display:inline-flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;position:relative;width:100%;z-index:1}.admin__control-addon>[class*=admin__addon-],.admin__control-addon>[class*=admin__control-]{-ms-flex-preferred-size:auto;flex-basis:auto;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;position:relative;z-index:1}.admin__control-addon .admin__control-select{width:auto}.admin__control-addon .admin__control-text{margin:.1rem;padding:.5rem .9rem;width:100%}.admin__control-addon [class*=admin__control-][class]{appearence:none;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-order:1;order:1;-ms-flex-negative:1;flex-shrink:1;background-color:transparent;border-color:transparent;box-shadow:none;vertical-align:top}.admin__control-addon [class*=admin__control-][class]+[class*=admin__control-]{border-left-color:#adadad}.admin__control-addon [class*=admin__control-][class] :focus{box-shadow:0}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child{padding-left:1rem;position:static!important;z-index:0}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child>*{position:relative;vertical-align:top;z-index:1}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child:empty{padding:0}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child:before{bottom:0;box-sizing:border-box;content:'';left:0;position:absolute;top:0;width:100%;z-index:-1}.admin__addon-prefix,.admin__addon-suffix{border:0;box-sizing:border-box;color:#858585;display:inline-block;font-size:1.4rem;font-weight:400;height:3.2rem;line-height:3.2rem;padding:0}.admin__addon-suffix{-ms-flex-order:3;order:3}.admin__addon-suffix:last-child{padding-right:1rem}.admin__addon-prefix{-ms-flex-order:0;order:0}.ie9 .admin__control-addon:after{clear:both;content:'';display:block;height:0;overflow:hidden}.ie9 .admin__addon{min-width:0;overflow:hidden;text-align:right;white-space:nowrap;width:auto}.ie9 .admin__addon [class*=admin__control-]{display:inline}.ie9 .admin__addon-prefix{float:left}.ie9 .admin__addon-suffix{float:right}.admin__control-collapsible{width:100%}.admin__control-collapsible ._dragged .admin__collapsible-block-wrapper .admin__collapsible-title{background:#d0d0d0}.admin__control-collapsible ._dragover-bottom .admin__collapsible-block-wrapper:before,.admin__control-collapsible ._dragover-top .admin__collapsible-block-wrapper:before{background:#008bdb;content:'';display:block;height:3px;left:0;position:absolute;right:0}.admin__control-collapsible ._dragover-top .admin__collapsible-block-wrapper:before{top:-3px}.admin__control-collapsible ._dragover-bottom .admin__collapsible-block-wrapper:before{bottom:-3px}.admin__control-collapsible .admin__collapsible-block-wrapper.fieldset-wrapper{border:0;margin:0;position:relative}.admin__control-collapsible .admin__collapsible-block-wrapper.fieldset-wrapper .fieldset-wrapper-title{background:#f8f8f8;border:2px solid #ccc}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .admin__collapsible-title{font-size:1.4rem;font-weight:400;line-height:1;padding:1.6rem 4rem 1.6rem 3.8rem}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .admin__collapsible-title:before{left:1rem;right:auto;top:1.4rem}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete{background-color:transparent;border-color:transparent;box-shadow:none;padding:0;position:absolute;right:1rem;top:1.4rem}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete:hover{background-color:transparent;border-color:transparent;box-shadow:none}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete:before{content:'\e630';font-size:2rem}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete>span{display:none}.admin__control-collapsible .admin__collapsible-content{background-color:#fff;margin-bottom:1rem}.admin__control-collapsible .admin__collapsible-content>.fieldset-wrapper{border:1px solid #ccc;margin-top:-1px;padding:1rem}.admin__control-collapsible .admin__collapsible-content .admin__fieldset{padding:0}.admin__control-collapsible .admin__collapsible-content .admin__field:last-child{margin-bottom:0}.admin__control-table-wrapper{max-width:100%;overflow-x:auto;overflow-y:hidden}.admin__control-table{width:100%}.admin__control-table thead{background-color:transparent}.admin__control-table tbody td{vertical-align:top}.admin__control-table tfoot th{padding-bottom:1.3rem}.admin__control-table tfoot th.validation{padding-bottom:0;padding-top:0}.admin__control-table tfoot td{border-top:1px solid #fff}.admin__control-table tfoot .admin__control-table-pagination{float:right;padding-bottom:0}.admin__control-table tfoot .action-previous{margin-right:.5rem}.admin__control-table tfoot .action-next{margin-left:.9rem}.admin__control-table tr:last-child td{border-bottom:none}.admin__control-table tr._dragover-top td{box-shadow:inset 0 3px 0 0 #008bdb}.admin__control-table tr._dragover-bottom td{box-shadow:inset 0 -3px 0 0 #008bdb}.admin__control-table tr._dragged td,.admin__control-table tr._dragged th{background:#d0d0d0}.admin__control-table td,.admin__control-table th{background-color:#efefef;border:0;border-bottom:1px solid #fff;padding:1.3rem 1rem 1.3rem 0;text-align:left;vertical-align:top}.admin__control-table td:first-child,.admin__control-table th:first-child{padding-left:1rem}.admin__control-table td>.admin__control-select,.admin__control-table td>.admin__control-text,.admin__control-table th>.admin__control-select,.admin__control-table th>.admin__control-text{width:100%}.admin__control-table td._hidden,.admin__control-table th._hidden{display:none}.admin__control-table td._fit,.admin__control-table th._fit{width:1px}.admin__control-table th{color:#303030;font-size:1.4rem;font-weight:600;vertical-align:bottom}.admin__control-table th._required span:after{color:#eb5202;content:'*'}.admin__control-table .control-table-actions-th{white-space:nowrap}.admin__control-table .control-table-actions-cell{padding-top:1.8rem;text-align:center;width:1%}.admin__control-table .control-table-options-th{text-align:center;width:10rem}.admin__control-table .control-table-options-cell{text-align:center}.admin__control-table .control-table-text{line-height:3.2rem}.admin__control-table .col-draggable{padding-top:2.2rem;width:1%}.admin__control-table .action-delete{background-color:transparent;border-color:transparent;box-shadow:none;padding-left:0;padding-right:0}.admin__control-table .action-delete:hover{background-color:transparent;border-color:transparent;box-shadow:none}.admin__control-table .action-delete:before{content:'\e630';font-size:2rem}.admin__control-table .action-delete>span{display:none}.admin__control-table .draggable-handle{padding:0}.admin__control-table._dragged{outline:#007bdb solid 1px}.admin__control-table-action{background-color:#efefef;border-top:1px solid #fff;padding:1.3rem 1rem}.admin__dynamic-rows._dragged{opacity:.95;position:absolute;z-index:999}.admin__dynamic-rows.admin__control-table .admin__control-fields>.admin__field{border:0;padding:0}.admin__dynamic-rows td>.admin__field{border:0;margin:0;padding:0}.admin__control-table-pagination{padding-bottom:1rem}.admin__control-table-pagination .admin__data-grid-pager{float:right}.admin__field-tooltip{display:inline-block;margin-top:.5rem;max-width:45px;overflow:visible;vertical-align:top;width:0}.admin__field-tooltip:hover{position:relative;z-index:500}.admin__field-option .admin__field-tooltip{margin-top:.5rem}.admin__field-tooltip .admin__field-tooltip-action{margin-left:2rem;position:relative;z-index:2;display:inline-block;text-decoration:none}.admin__field-tooltip .admin__field-tooltip-action:before{-webkit-font-smoothing:antialiased;font-size:2.2rem;line-height:1;color:#514943;content:'\e633';font-family:Icons;vertical-align:middle;display:inline-block;font-weight:400;overflow:hidden;speak:none;text-align:center}.admin__field-tooltip .admin__control-text:focus+.admin__field-tooltip-content,.admin__field-tooltip:hover .admin__field-tooltip-content{display:block}.admin__field-tooltip .admin__field-tooltip-content{bottom:3.8rem;display:none;right:-2.3rem}.admin__field-tooltip .admin__field-tooltip-content:after,.admin__field-tooltip .admin__field-tooltip-content:before{border:1.6rem solid transparent;height:0;width:0;border-top-color:#afadac;content:'';display:block;position:absolute;right:2rem;top:100%;z-index:3}.admin__field-tooltip .admin__field-tooltip-content:after{border-top-color:#fffbbb;margin-top:-1px;z-index:4}.abs-admin__field-tooltip-content,.admin__field-tooltip .admin__field-tooltip-content{box-shadow:0 2px 8px 0 rgba(0,0,0,.3);background:#fffbbb;border:1px solid #afadac;border-radius:1px;padding:1.5rem 2.5rem;position:absolute;width:32rem;z-index:1}.admin__field-fallback-reset{font-size:1.25rem;white-space:nowrap;width:30px}.admin__field-fallback-reset>span{margin-left:.5rem;position:relative}.admin__field-fallback-reset:active{-ms-transform:scale(0.98);transform:scale(0.98)}.admin__field-fallback-reset:before{transition:color .1s linear;content:'\e642';font-size:1.3rem;margin-left:.5rem}.admin__field-fallback-reset:hover{cursor:pointer;text-decoration:none}.admin__field-fallback-reset:focus{background:0 0}.abs-field-size-x-small,.abs-field-sizes.admin__field-x-small>.admin__field-control,.admin__field.admin__field-x-small>.admin__field-control,.admin__fieldset>.admin__field.admin__field-x-small>.admin__field-control,[class*=admin__control-grouped]>.admin__field.admin__field-x-small>.admin__field-control{width:8rem}.abs-field-size-small,.abs-field-sizes.admin__field-small>.admin__field-control,.admin__control-grouped-date>.admin__field-date.admin__field>.admin__field-control,.admin__field.admin__field-small>.admin__field-control,.admin__fieldset>.admin__field.admin__field-small>.admin__field-control,[class*=admin__control-grouped]>.admin__field.admin__field-small>.admin__field-control{width:15rem}.abs-field-size-medium,.abs-field-sizes.admin__field-medium>.admin__field-control,.admin__field.admin__field-medium>.admin__field-control,.admin__fieldset>.admin__field.admin__field-medium>.admin__field-control,[class*=admin__control-grouped]>.admin__field.admin__field-medium>.admin__field-control{width:34rem}.abs-field-size-large,.abs-field-sizes.admin__field-large>.admin__field-control,.admin__field.admin__field-large>.admin__field-control,.admin__fieldset>.admin__field.admin__field-large>.admin__field-control,[class*=admin__control-grouped]>.admin__field.admin__field-large>.admin__field-control{width:64rem}.abs-field-no-label,.admin__field-group-additional,.admin__field-no-label,.admin__fieldset>.admin__field.admin__field-no-label>.admin__field-control{margin-left:calc((100%) * .25 + 30px)}.admin__fieldset{border:0;margin:0;min-width:0;padding:0}.admin__fieldset .fieldset-wrapper.admin__fieldset-section>.fieldset-wrapper-title{padding-left:1rem}.admin__fieldset .fieldset-wrapper.admin__fieldset-section>.fieldset-wrapper-title strong{font-size:1.7rem;font-weight:600}.admin__fieldset .fieldset-wrapper.admin__fieldset-section .admin__fieldset-wrapper-content>.admin__fieldset{padding-top:1rem}.admin__fieldset .fieldset-wrapper.admin__fieldset-section:last-child .admin__fieldset-wrapper-content>.admin__fieldset{padding-bottom:0}.admin__fieldset>.admin__field{border:0;margin:0 0 0 -30px;padding:0}.admin__fieldset>.admin__field:after{clear:both;content:'';display:table}.admin__fieldset>.admin__field>.admin__field-control{width:calc((100%) * .5 - 30px);float:left;margin-left:30px}.admin__fieldset>.admin__field>.admin__field-label{width:calc((100%) * .25 - 30px);float:left;margin-left:30px}.admin__fieldset>.admin__field.admin__field-no-label>.admin__field-label{display:none}.admin__fieldset>.admin__field+.admin__field._empty._no-header{margin-top:-3rem}.admin__fieldset-product-websites{position:relative;z-index:300}.admin__fieldset-note{margin-bottom:2rem}.admin__form-field{border:0;margin:0;padding:0}.admin__field-control .admin__control-text,.admin__field-control .admin__control-textarea,.admin__form-field-control .admin__control-text,.admin__form-field-control .admin__control-textarea{width:100%}.admin__field-label{color:#303030;cursor:pointer;margin:0;text-align:right}.admin__field-label+br{display:none}.admin__field:not(.admin__field-option)>.admin__field-label{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.4rem;font-weight:600;line-height:3.2rem;padding:0;white-space:nowrap}.admin__field:not(.admin__field-option)>.admin__field-label:before{opacity:0;visibility:hidden;content:'.';margin-left:-7px;overflow:hidden}.admin__field:not(.admin__field-option)>.admin__field-label span{display:inline-block;line-height:1.2;vertical-align:middle;white-space:normal}.admin__field:not(.admin__field-option)>.admin__field-label span[data-config-scope]{position:relative}._required>.admin__field-label>span:after,.required>.admin__field-label>span:after{color:#eb5202;content:'*';display:inline-block;font-size:1.6rem;font-weight:500;line-height:1;margin-left:10px;margin-top:.2rem;position:absolute;z-index:1}._disabled>.admin__field-label{color:#999;cursor:default}.admin__field{margin-bottom:0}.admin__field+.admin__field{margin-top:1.5rem}.admin__field:not(.admin__field-option)~.admin__field-option{margin-top:.5rem}.admin__field.admin__field-option~.admin__field-option{margin-top:.9rem}.admin__field~.admin__field-option:last-child{margin-bottom:.8rem}.admin__fieldset>.admin__field{margin-bottom:3rem;position:relative}.admin__field legend.admin__field-label{opacity:0}.admin__field[data-config-scope]:before{color:gray;content:attr(data-config-scope);display:inline-block;font-size:1.2rem;left:calc((100%) * .75 - 30px);line-height:3.2rem;margin-left:60px;position:absolute;width:calc((100%) * .25 - 30px)}.admin__field-control .admin__field[data-config-scope]:nth-child(n+2):before{content:''}.admin__field._error .admin__field-control [class*=admin__addon-]:before,.admin__field._error .admin__field-control [class*=admin__control-] [class*=admin__addon-]:before,.admin__field._error .admin__field-control>[class*=admin__control-]{border-color:#e22626}.admin__field._disabled,.admin__field._disabled:hover{box-shadow:inherit;cursor:inherit;opacity:1;outline:inherit}.admin__field._hidden{display:none}.admin__field-control+.admin__field-control{margin-top:1.5rem}.admin__field-control._with-tooltip>.admin__control-addon,.admin__field-control._with-tooltip>.admin__control-select,.admin__field-control._with-tooltip>.admin__control-text,.admin__field-control._with-tooltip>.admin__control-textarea,.admin__field-control._with-tooltip>.admin__field-option{max-width:calc(100% - 45px - 4px)}.admin__field-control._with-tooltip .admin__field-tooltip{width:auto}.admin__field-control._with-tooltip .admin__field-option{display:inline-block}.admin__field-control._with-reset>.admin__control-addon,.admin__field-control._with-reset>.admin__control-text,.admin__field-control._with-reset>.admin__control-textarea{width:calc(100% - 30px - .5rem - 4px)}.admin__field-control._with-reset .admin__field-fallback-reset{margin-left:.5rem;margin-top:1rem;vertical-align:top}.admin__field-control._with-reset._with-tooltip>.admin__control-addon,.admin__field-control._with-reset._with-tooltip>.admin__control-text,.admin__field-control._with-reset._with-tooltip>.admin__control-textarea{width:calc(100% - 30px - .5rem - 45px - 8px)}.admin__fieldset>.admin__field-collapsible{margin-bottom:0}.admin__fieldset>.admin__field-collapsible .admin__field-control{border-top:1px solid #ccc;display:block;font-size:1.7rem;font-weight:700;padding:1.7rem 0;width:calc(97%)}.admin__fieldset>.admin__field-collapsible .admin__field-option{padding-top:0}.admin__field-collapsible+div{margin-top:2.5rem}.admin__field-collapsible .admin__control-radio+label:before{height:1.8rem;width:1.8rem}.admin__field-collapsible .admin__control-radio:checked+label:after{left:4px;top:5px}.admin__field-error{background:#fffbbb;border:1px solid #ee7d7d;box-sizing:border-box;color:#555;display:block;font-size:1.2rem;font-weight:400;line-height:1.2;margin:.2rem 0 0;padding:.8rem 1rem .9rem}.admin__field-note{color:#303030;font-size:1.2rem;margin:10px 0 0;padding:0}.admin__additional-info{padding-top:1rem}.admin__field-option{padding-top:.8rem}.admin__field-option .admin__field-label{text-align:left}.admin__field-control>.admin__field-option:nth-child(1):nth-last-child(2),.admin__field-control>.admin__field-option:nth-child(2):nth-last-child(1){display:inline-block}.admin__field-control>.admin__field-option:nth-child(1):nth-last-child(2)+.admin__field-option,.admin__field-control>.admin__field-option:nth-child(2):nth-last-child(1)+.admin__field-option{display:inline-block;margin-left:41px;margin-top:0}.admin__field-control>.admin__field-option:nth-child(1):nth-last-child(2)+.admin__field-option:before,.admin__field-control>.admin__field-option:nth-child(2):nth-last-child(1)+.admin__field-option:before{background:#cacaca;content:'';display:inline-block;height:20px;margin-left:-20px;position:absolute;width:1px}.admin__field-value{padding-top:.8rem}.admin__field-service{padding-top:1rem}.admin__control-fields>.admin__field:first-child,[class*=admin__control-grouped]>.admin__field:first-child{position:static}.admin__control-fields>.admin__field:first-child>.admin__field-label,[class*=admin__control-grouped]>.admin__field:first-child>.admin__field-label{width:calc((100%) * .25 - 30px);float:left;margin-left:30px;background:#fff;cursor:pointer;left:0;position:absolute;top:0}.admin__control-fields>.admin__field:first-child>.admin__field-label span:before,[class*=admin__control-grouped]>.admin__field:first-child>.admin__field-label span:before{display:block}.admin__control-fields>.admin__field._disabled>.admin__field-label,[class*=admin__control-grouped]>.admin__field._disabled>.admin__field-label{cursor:default}.admin__control-fields>.admin__field>.admin__field-label span:before,[class*=admin__control-grouped]>.admin__field>.admin__field-label span:before{display:none}.admin__control-fields .admin__field-label~.admin__field-control{width:100%}.admin__control-fields .admin__field-option{padding-top:0}[class*=admin__control-grouped]{box-sizing:border-box;display:table;width:100%}[class*=admin__control-grouped]>.admin__field{display:table-cell;vertical-align:top}[class*=admin__control-grouped]>.admin__field>.admin__field-control{float:none;width:100%}[class*=admin__control-grouped]>.admin__field.admin__field-default,[class*=admin__control-grouped]>.admin__field.admin__field-large,[class*=admin__control-grouped]>.admin__field.admin__field-medium,[class*=admin__control-grouped]>.admin__field.admin__field-small,[class*=admin__control-grouped]>.admin__field.admin__field-x-small{width:1px}[class*=admin__control-grouped]>.admin__field.admin__field-default+.admin__field:last-child,[class*=admin__control-grouped]>.admin__field.admin__field-large+.admin__field:last-child,[class*=admin__control-grouped]>.admin__field.admin__field-medium+.admin__field:last-child,[class*=admin__control-grouped]>.admin__field.admin__field-small+.admin__field:last-child,[class*=admin__control-grouped]>.admin__field.admin__field-x-small+.admin__field:last-child{width:auto}[class*=admin__control-grouped]>.admin__field:nth-child(n+2){padding-left:20px}.admin__control-group-equal{table-layout:fixed}.admin__control-group-equal>.admin__field{width:50%}.admin__field-control-group{margin-top:.8rem}.admin__field-control-group>.admin__field{padding:0}.admin__control-grouped-date>.admin__field-date{white-space:nowrap;width:1px}.admin__control-grouped-date>.admin__field-date.admin__field>.admin__field-control{float:left;position:relative}.admin__control-grouped-date>.admin__field-date+.admin__field:last-child{width:auto}.admin__control-grouped-date>.admin__field-date+.admin__field-date>.admin__field-label{float:left;padding-right:20px}.admin__control-grouped-date .ui-datepicker-trigger{left:100%;top:0}.admin__field-group-columns.admin__field-control.admin__control-grouped{width:calc((100%) * 1 - 30px);float:left;margin-left:30px}.admin__field-group-columns>.admin__field:first-child>.admin__field-label{float:none;margin:0;opacity:1;position:static;text-align:left}.admin__field-group-columns .admin__control-select{width:100%}.admin__field-group-additional{clear:both}.admin__field-group-additional .action-advanced{margin-top:1rem}.admin__field-group-additional .action-secondary{width:100%}.admin__field-group-show-label{white-space:nowrap}.admin__field-group-show-label>.admin__field-control,.admin__field-group-show-label>.admin__field-label{display:inline-block;vertical-align:top}.admin__field-group-show-label>.admin__field-label{margin-right:20px}.admin__field-complex{margin:1rem 0 3rem;padding-left:1rem}.admin__field:not(._hidden)+.admin__field-complex{margin-top:3rem}.admin__field-complex .admin__field-complex-title{clear:both;color:#303030;font-size:1.7rem;font-weight:600;letter-spacing:.025em;margin-bottom:1rem}.admin__field-complex .admin__field-complex-elements{float:right;max-width:40%}.admin__field-complex .admin__field-complex-elements button{margin-left:1rem}.admin__field-complex .admin__field-complex-content{max-width:60%;overflow:hidden}.admin__field-complex+.admin__field._empty._no-header{margin-top:-3rem}.admin__legend{float:left;position:static;width:100%}.admin__legend+br{clear:left;display:block;height:0;overflow:hidden}.message{margin-bottom:3rem}.message-icon-top:before{margin-top:0;top:1.8rem}.nav{background-color:#f8f8f8;border-bottom:1px solid #e3e3e3;border-top:1px solid #e3e3e3;display:none;margin-bottom:3rem;padding:2.2rem 1.5rem 0 0}.nav .btn-group,.nav-bar-outer-actions{float:right;margin-bottom:1.7rem}.nav .btn-group .btn-wrap,.nav-bar-outer-actions .btn-wrap{float:right;margin-left:.5rem;margin-right:.5rem}.nav .btn-group .btn-wrap .btn,.nav-bar-outer-actions .btn-wrap .btn{padding-left:.5rem;padding-right:.5rem}.nav-bar-outer-actions{margin-top:-10.6rem;padding-right:1.5rem}.btn-wrap-try-again{width:9.5rem}.btn-wrap-next,.btn-wrap-prev{width:8.5rem}.nav-bar{counter-reset:i;float:left;margin:0 1rem 1.7rem 0;padding:0;position:relative;white-space:nowrap}.nav-bar:before{background-color:#d4d4d4;background-repeat:repeat-x;background-image:linear-gradient(to bottom,#d1d1d1 0,#d4d4d4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d1d1d1', endColorstr='#d4d4d4', GradientType=0);border-bottom:1px solid #d9d9d9;border-top:1px solid #bfbfbf;content:'';height:1rem;left:5.15rem;position:absolute;right:5.15rem;top:.7rem}.nav-bar>li{display:inline-block;font-size:0;position:relative;vertical-align:top;width:10.3rem}.nav-bar>li:first-child:after{display:none}.nav-bar>li:after{background-color:#514943;content:'';height:.5rem;left:calc(-50% + .25rem);position:absolute;right:calc(50% + .7rem);top:.9rem}.nav-bar>li.disabled:before,.nav-bar>li.ui-state-disabled:before{bottom:0;content:'';left:0;position:absolute;right:0;top:0;z-index:1}.nav-bar>li.active~li:after,.nav-bar>li.ui-state-active~li:after{display:none}.nav-bar>li.active~li a:after,.nav-bar>li.ui-state-active~li a:after{background-color:transparent;border-color:transparent;color:#a6a6a6}.nav-bar>li.active a,.nav-bar>li.ui-state-active a{color:#000}.nav-bar>li.active a:hover,.nav-bar>li.ui-state-active a:hover{cursor:default}.nav-bar>li.active a:after,.nav-bar>li.ui-state-active a:after{background-color:#fff;content:''}.nav-bar a{color:#514943;display:block;font-size:1.2rem;font-weight:600;line-height:1.2;overflow:hidden;padding:3rem .5em 0;position:relative;text-align:center;text-overflow:ellipsis}.nav-bar a:hover{text-decoration:none}.nav-bar a:after{background-color:#514943;border:.4rem solid #514943;border-radius:100%;color:#fff;content:counter(i);counter-increment:i;height:1.5rem;left:50%;line-height:.6;margin-left:-.8rem;position:absolute;right:auto;text-align:center;top:.4rem;width:1.5rem}.nav-bar a:before{background-color:#d6d6d6;border:1px solid transparent;border-bottom-color:#d9d9d9;border-radius:100%;border-top-color:#bfbfbf;content:'';height:2.3rem;left:50%;line-height:1;margin-left:-1.2rem;position:absolute;top:0;width:2.3rem}.tooltip{display:block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.19rem;font-weight:400;line-height:1.4;opacity:0;position:absolute;visibility:visible;z-index:10}.tooltip.in{opacity:.9}.tooltip.top{margin-top:-4px;padding:8px 0}.tooltip.right{margin-left:4px;padding:0 8px}.tooltip.bottom{margin-top:4px;padding:8px 0}.tooltip.left{margin-left:-4px;padding:0 8px}.tooltip p:last-child{margin-bottom:0}.tooltip-inner{background-color:#fff;border:1px solid #adadad;border-radius:0;box-shadow:1px 1px 1px #ccc;color:#41362f;max-width:31rem;padding:.5em 1em;text-decoration:none}.tooltip-arrow,.tooltip-arrow:after{border:solid transparent;height:0;position:absolute;width:0}.tooltip-arrow:after{content:'';position:absolute}.tooltip.top .tooltip-arrow,.tooltip.top .tooltip-arrow:after{border-top-color:#949494;border-width:8px 8px 0;bottom:0;left:50%;margin-left:-8px}.tooltip.top-left .tooltip-arrow,.tooltip.top-left .tooltip-arrow:after{border-top-color:#949494;border-width:8px 8px 0;bottom:0;margin-bottom:-8px;right:8px}.tooltip.top-right .tooltip-arrow,.tooltip.top-right .tooltip-arrow:after{border-top-color:#949494;border-width:8px 8px 0;bottom:0;left:8px;margin-bottom:-8px}.tooltip.right .tooltip-arrow,.tooltip.right .tooltip-arrow:after{border-right-color:#949494;border-width:8px 8px 8px 0;left:1px;margin-top:-8px;top:50%}.tooltip.right .tooltip-arrow:after{border-right-color:#fff;border-width:6px 7px 6px 0;margin-left:0;margin-top:-6px}.tooltip.left .tooltip-arrow,.tooltip.left .tooltip-arrow:after{border-left-color:#949494;border-width:8px 0 8px 8px;margin-top:-8px;right:0;top:50%}.tooltip.bottom .tooltip-arrow,.tooltip.bottom .tooltip-arrow:after{border-bottom-color:#949494;border-width:0 8px 8px;left:50%;margin-left:-8px;top:0}.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow:after{border-bottom-color:#949494;border-width:0 8px 8px;margin-top:-8px;right:8px;top:0}.tooltip.bottom-right .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow:after{border-bottom-color:#949494;border-width:0 8px 8px;left:8px;margin-top:-8px;top:0}.password-strength{display:block;margin:0 -.3rem 1em;white-space:nowrap}.password-strength.password-strength-too-short .password-strength-item:first-child,.password-strength.password-strength-weak .password-strength-item:first-child,.password-strength.password-strength-weak .password-strength-item:first-child+.password-strength-item{background-color:#e22626}.password-strength.password-strength-fair .password-strength-item:first-child,.password-strength.password-strength-fair .password-strength-item:first-child+.password-strength-item,.password-strength.password-strength-fair .password-strength-item:first-child+.password-strength-item+.password-strength-item{background-color:#ef672f}.password-strength.password-strength-good .password-strength-item:first-child,.password-strength.password-strength-good .password-strength-item:first-child+.password-strength-item,.password-strength.password-strength-good .password-strength-item:first-child+.password-strength-item+.password-strength-item,.password-strength.password-strength-good .password-strength-item:first-child+.password-strength-item+.password-strength-item+.password-strength-item,.password-strength.password-strength-strong .password-strength-item{background-color:#79a22e}.password-strength .password-strength-item{background-color:#ccc;display:inline-block;font-size:0;height:1.4rem;margin-right:.3rem;width:calc(20% - .6rem)}@keyframes progress-bar-stripes{from{background-position:4rem 0}to{background-position:0 0}}.progress{background-color:#fafafa;border:1px solid #ccc;clear:left;height:3rem;margin-bottom:3rem;overflow:hidden}.progress-bar{background-color:#79a22e;color:#fff;float:left;font-size:1.19rem;height:100%;line-height:3rem;text-align:center;transition:width .6s ease;width:0}.progress-bar.active{animation:progress-bar-stripes 2s linear infinite}.progress-bar-text-description{margin-bottom:1.6rem}.progress-bar-text-progress{text-align:right}.page-columns .page-inner-sidebar{margin:0 0 3rem}.page-header{margin-bottom:2.7rem;padding-bottom:2rem;position:relative}.page-header:before{border-bottom:1px solid #e3e3e3;bottom:0;content:'';display:block;height:1px;left:3rem;position:absolute;right:3rem}.container .page-header:before{content:normal}.page-header .message{margin-bottom:1.8rem}.page-header .message+.message{margin-top:-1.5rem}.page-header .admin__action-dropdown,.page-header .search-global-input{transition:none}.container .page-header{margin-bottom:0}.page-title-wrapper{margin-top:1.1rem}.container .page-title-wrapper{background:url(../../pub/images/logo.svg) no-repeat;min-height:41px;padding:4px 0 0 45px}.admin__menu .level-0:first-child>a{margin-top:1.6rem}.admin__menu .level-0:first-child>a:after{top:-1.6rem}.admin__menu .level-0:first-child._active>a:after{display:block}.admin__menu .level-0>a{padding-bottom:1.3rem;padding-top:1.3rem}.admin__menu .level-0>a:before{margin-bottom:.7rem}.admin__menu .item-home>a:before{content:'\e611';font-size:2.3rem;padding-top:-.1rem}.admin__menu .item-extension>a:before{content:'\e612'}.admin__menu .item-component>a:before{content:'\e647'}.admin__menu .item-upgrade>a:before{content:'\e614'}.admin__menu .item-system-config>a:before{content:'\e610'}.admin__menu .item-tools>a:before{content:'\e613'}.modal-sub-title{font-size:1.7rem;font-weight:600}.modal-connect-signin .modal-inner-wrap{max-width:80rem}@keyframes ngdialog-fadeout{0%{opacity:1}100%{opacity:0}}@keyframes ngdialog-fadein{0%{opacity:0}100%{opacity:1}}.ngdialog{-webkit-overflow-scrolling:touch;bottom:0;box-sizing:border-box;left:0;overflow:auto;position:fixed;right:0;top:0;z-index:999}.ngdialog *,.ngdialog:after,.ngdialog:before{box-sizing:inherit}.ngdialog.ngdialog-disabled-animation *{animation:none!important}.ngdialog.ngdialog-closing .ngdialog-content,.ngdialog.ngdialog-closing .ngdialog-overlay{-webkit-animation:ngdialog-fadeout .5s;-webkit-backface-visibility:hidden;animation:ngdialog-fadeout .5s}.ngdialog-overlay{-webkit-animation:ngdialog-fadein .5s;-webkit-backface-visibility:hidden;animation:ngdialog-fadein .5s;background:rgba(0,0,0,.4);bottom:0;left:0;position:fixed;right:0;top:0}.ngdialog-content{-webkit-animation:ngdialog-fadein .5s;-webkit-backface-visibility:hidden;animation:ngdialog-fadein .5s}body.ngdialog-open{overflow:hidden}.component-indicator{border-radius:50%;cursor:help;display:inline-block;height:16px;text-align:center;vertical-align:middle;width:16px}.component-indicator::after,.component-indicator::before{background:#fff;display:block;opacity:0;position:absolute;transition:opacity .2s linear .1s;visibility:hidden}.component-indicator::before{border:1px solid #adadad;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.4);content:attr(data-label);font-size:1.2rem;margin:30px 0 0 -10px;min-width:50px;padding:4px 5px}.component-indicator::after{border-color:#999;border-style:solid;border-width:1px 0 0 1px;box-shadow:-1px -1px 1px rgba(0,0,0,.1);content:'';height:10px;margin:9px 0 0 5px;-ms-transform:rotate(45deg);transform:rotate(45deg);width:10px}.component-indicator:hover::after,.component-indicator:hover::before{opacity:1;transition:opacity .2s linear;visibility:visible}.component-indicator span{display:block;height:16px;overflow:hidden;width:16px}.component-indicator span:before{content:'';display:block;font-family:Icons;font-size:16px;height:100%;line-height:16px;width:100%}.component-indicator._on{background:#79a22e}.component-indicator._off{background:#e22626}.component-indicator._off span:before{background:#fff;height:4px;margin:8px auto 20px;width:12px}.component-indicator._info{background:0 0}.component-indicator._info span{width:21px}.component-indicator._info span:before{color:#008bdb;content:'\e648';font-family:Icons;font-size:16px}.col-manager-item-name .data-grid-data{padding-left:5px}.col-manager-item-name .ng-hide+.data-grid-data{padding-left:24px}.col-manager-item-name ._hide-dependencies,.col-manager-item-name ._show-dependencies{cursor:pointer;padding-left:24px;position:relative}.col-manager-item-name ._hide-dependencies:before,.col-manager-item-name ._show-dependencies:before{display:block;font-family:Icons;font-size:12px;left:0;position:absolute;top:1px}.col-manager-item-name ._show-dependencies:before{content:'\e62b'}.col-manager-item-name ._hide-dependencies:before{content:'\e628'}.col-manager-item-name ._no-dependencies{padding-left:24px}.product-modules-block{font-size:1.2rem;padding:15px 0 0}.col-manager-item-name .product-modules-block{padding-left:1rem}.product-modules-descriprion,.product-modules-title{font-weight:700;margin:0 0 7px}.product-modules-list{font-size:1.1rem;list-style:none;margin:0}.col-manager-item-name .product-modules-list{margin-left:15px}.col-manager-item-name .product-modules-list li{padding:0 0 0 15px;position:relative}.product-modules-list li{margin:0 0 .5rem}.product-modules-list .component-indicator{height:10px;left:0;position:absolute;top:3px;width:10px}.module-summary{white-space:nowrap}.module-summary-title{font-size:2.1rem;margin-right:1rem}.app-updater .nav{display:block;margin-bottom:3.1rem;margin-top:-2.8rem}.app-updater .nav-bar-outer-actions{margin-top:1rem;padding-right:0}.app-updater .nav-bar-outer-actions .btn-wrap-cancel{margin-right:2.6rem}.main{padding-bottom:2rem;padding-top:3rem}.menu-wrapper .logo-static{pointer-events:none}.header{display:none}.header .logo{float:left;height:4.1rem;width:3.5rem}.header-title{font-size:2.8rem;letter-spacing:.02em;line-height:1.4;margin:2.5rem 0 3.5rem 5rem}.page-title{margin-bottom:1rem}.page-sub-title{font-size:2rem}.accent-box{margin-bottom:2rem}.accent-box .btn-prime{margin-top:1.5rem}.spinner.side{float:left;font-size:2.4rem;margin-left:2rem;margin-top:-5px}.page-landing{margin:7.6% auto 0;max-width:44rem;text-align:center}.page-landing .logo{height:5.6rem;margin-bottom:2rem;width:19.2rem}.page-landing .text-version{margin-bottom:3rem}.page-landing .text-welcome{margin-bottom:6.5rem}.page-landing .text-terms{margin-bottom:2.5rem;text-align:center}.page-landing .btn-submit,.page-license .license-text{margin-bottom:2rem}.page-license .page-license-footer{text-align:right}.readiness-check-item{margin-bottom:4rem;min-height:2.5rem}.readiness-check-item .spinner{float:left;font-size:2.5rem;margin:-.4rem 0 0 1.7rem}.readiness-check-title{font-size:1.4rem;font-weight:700;margin-bottom:.1rem;margin-left:5.7rem}.readiness-check-content{margin-left:5.7rem;margin-right:22rem;position:relative}.readiness-check-content .readiness-check-title{margin-left:0}.readiness-check-content .list{margin-top:-.3rem}.readiness-check-side{left:100%;padding-left:2.4rem;position:absolute;top:0;width:22rem}.readiness-check-side .side-title{margin-bottom:0}.readiness-check-icon{float:left;margin-left:1.7rem;margin-top:.3rem}.page-web-configuration .form-el-insider-wrap{width:auto}.page-web-configuration .form-el-insider{width:15.4rem}.page-web-configuration .form-el-insider-input .form-el-input{width:16.5rem}.customize-your-store .advanced-modules-count,.customize-your-store .advanced-modules-select{padding-left:1.5rem}.customize-your-store .customize-your-store-advanced{min-width:0}.customize-your-store .message-error:before{margin-top:0;top:1.8rem}.customize-your-store .message-error a{color:#333;text-decoration:underline}.customize-your-store .message-error .form-label:before{background:#fff}.customize-your-store .customize-database-clean p{margin-top:2.5rem}.content-install{margin-bottom:2rem}.console{border:1px solid #ccc;font-family:'Courier New',Courier,monospace;font-weight:300;height:20rem;margin:1rem 0 2rem;overflow-y:auto;padding:1.5rem 2rem 2rem;resize:vertical}.console .text-danger{color:#e22626}.console .text-success{color:#090}.console .hidden{display:none}.content-success .btn-prime{margin-top:1.5rem}.jumbo-title{font-size:3.6rem}.jumbo-title .jumbo-icon{font-size:3.8rem;margin-right:.25em;position:relative;top:.15em}.install-database-clean{margin-top:4rem}.install-database-clean .btn{margin-right:1rem}.page-sub-title{margin-bottom:2.1rem;margin-top:3rem}.multiselect-custom{max-width:71.1rem}.content-install{margin-top:3.7rem}.home-page-inner-wrap{margin:0 auto;max-width:91rem}.setup-home-title{margin-bottom:3.9rem;padding-top:1.8rem;text-align:center}.setup-home-item{background-color:#fafafa;border:1px solid #ccc;color:#333;display:block;margin-bottom:2rem;margin-left:1.3rem;margin-right:1.3rem;min-height:30rem;padding:2rem;text-align:center}.setup-home-item:hover{border-color:#8c8c8c;color:#333;text-decoration:none;transition:border-color .1s linear}.setup-home-item:active{-ms-transform:scale(0.99);transform:scale(0.99)}.setup-home-item:before{display:block;font-size:7rem;margin-bottom:3.3rem;margin-top:4rem}.setup-home-item-component:before,.setup-home-item-extension:before{content:'\e612'}.setup-home-item-module:before{content:'\e647'}.setup-home-item-upgrade:before{content:'\e614'}.setup-home-item-configuration:before{content:'\e610'}.setup-home-item-title{display:block;font-size:1.8rem;letter-spacing:.025em;margin-bottom:1rem}.setup-home-item-description{display:block}.extension-manager-wrap{border:1px solid #bbb;margin:0 0 4rem}.extension-manager-account{font-size:2.1rem;display:inline-block;font-weight:400}.extension-manager-title{font-size:3.2rem;background-color:#f8f8f8;border-bottom:1px solid #e3e3e3;color:#41362f;font-weight:600;line-height:1.2;padding:2rem}.extension-manager-content{padding:2.5rem 2rem 2rem}.extension-manager-items{list-style:none;margin:0;text-align:center}.extension-manager-items .btn{border:1px solid #adadad;display:block;margin:1rem auto 0}.extension-manager-items .item-title{font-size:2.1rem;display:inline-block;text-align:left}.extension-manager-items .item-number{font-size:4.1rem;display:inline-block;line-height:.8;margin:0 5px 1.5rem 0;vertical-align:top}.extension-manager-items .item-date{font-size:2.6rem;margin-top:1px}.extension-manager-items .item-date-title{font-size:1.5rem}.extension-manager-items .item-install{margin:0 0 2rem}.sync-login-wrap{padding:0 10% 4rem}.sync-login-wrap .legend{font-size:2.6rem;color:#eb5202;float:left;font-weight:300;line-height:1.2;margin:-1rem 0 2.5rem;position:static;width:100%}.sync-login-wrap .legend._hidden{display:none}.sync-login-wrap .login-header{font-size:3.4rem;font-weight:300;margin:0 0 2rem}.sync-login-wrap .login-header span{display:inline-block;padding:.9rem 0 0;vertical-align:top}.sync-login-wrap h4{font-size:1.4rem;margin:0 0 2rem}.sync-login-wrap .sync-login-steps{margin:0 0 2rem 1.5rem}.sync-login-wrap .sync-login-steps li{padding:0 0 0 1rem}.sync-login-wrap .form-row .form-label{display:inline-block}.sync-login-wrap .form-row .form-label.required{padding-left:1.5rem}.sync-login-wrap .form-row .form-label.required:after{left:0;position:absolute;right:auto}.sync-login-wrap .form-row{max-width:28rem}.sync-login-wrap .form-actions{display:table;margin-top:-1.3rem}.sync-login-wrap .form-actions .links{display:table-header-group}.sync-login-wrap .form-actions .actions{padding:3rem 0 0}@media all and (max-width:1047px){.admin__menu .submenu li{min-width:19.8rem}.nav{padding-bottom:5.38rem;padding-left:1.5rem;text-align:center}.nav-bar{display:inline-block;float:none;margin-right:0;vertical-align:top}.nav .btn-group,.nav-bar-outer-actions{display:inline-block;float:none;margin-top:-8.48rem;text-align:center;vertical-align:top;width:100%}.nav-bar-outer-actions{padding-right:0}.nav-bar-outer-actions .outer-actions-inner-wrap{display:inline-block}.app-updater .nav{padding-bottom:1.7rem}.app-updater .nav-bar-outer-actions{margin-top:2rem}}@media all and (min-width:768px){.page-layout-admin-2columns-left .page-columns{margin-left:-30px}.page-layout-admin-2columns-left .page-columns:after{clear:both;content:'';display:table}.page-layout-admin-2columns-left .page-columns .main-col{width:calc((100%) * .75 - 30px);float:right}.page-layout-admin-2columns-left .page-columns .side-col{width:calc((100%) * .25 - 30px);float:left;margin-left:30px}.col-m-1,.col-m-10,.col-m-11,.col-m-12,.col-m-2,.col-m-3,.col-m-4,.col-m-5,.col-m-6,.col-m-7,.col-m-8,.col-m-9{float:left}.col-m-12{width:100%}.col-m-11{width:91.66666667%}.col-m-10{width:83.33333333%}.col-m-9{width:75%}.col-m-8{width:66.66666667%}.col-m-7{width:58.33333333%}.col-m-6{width:50%}.col-m-5{width:41.66666667%}.col-m-4{width:33.33333333%}.col-m-3{width:25%}.col-m-2{width:16.66666667%}.col-m-1{width:8.33333333%}.col-m-pull-12{right:100%}.col-m-pull-11{right:91.66666667%}.col-m-pull-10{right:83.33333333%}.col-m-pull-9{right:75%}.col-m-pull-8{right:66.66666667%}.col-m-pull-7{right:58.33333333%}.col-m-pull-6{right:50%}.col-m-pull-5{right:41.66666667%}.col-m-pull-4{right:33.33333333%}.col-m-pull-3{right:25%}.col-m-pull-2{right:16.66666667%}.col-m-pull-1{right:8.33333333%}.col-m-pull-0{right:auto}.col-m-push-12{left:100%}.col-m-push-11{left:91.66666667%}.col-m-push-10{left:83.33333333%}.col-m-push-9{left:75%}.col-m-push-8{left:66.66666667%}.col-m-push-7{left:58.33333333%}.col-m-push-6{left:50%}.col-m-push-5{left:41.66666667%}.col-m-push-4{left:33.33333333%}.col-m-push-3{left:25%}.col-m-push-2{left:16.66666667%}.col-m-push-1{left:8.33333333%}.col-m-push-0{left:auto}.col-m-offset-12{margin-left:100%}.col-m-offset-11{margin-left:91.66666667%}.col-m-offset-10{margin-left:83.33333333%}.col-m-offset-9{margin-left:75%}.col-m-offset-8{margin-left:66.66666667%}.col-m-offset-7{margin-left:58.33333333%}.col-m-offset-6{margin-left:50%}.col-m-offset-5{margin-left:41.66666667%}.col-m-offset-4{margin-left:33.33333333%}.col-m-offset-3{margin-left:25%}.col-m-offset-2{margin-left:16.66666667%}.col-m-offset-1{margin-left:8.33333333%}.col-m-offset-0{margin-left:0}.page-columns{margin-left:-30px}.page-columns:after{clear:both;content:'';display:table}.page-columns .page-inner-content{width:calc((100%) * .75 - 30px);float:right}.page-columns .page-inner-sidebar{width:calc((100%) * .25 - 30px);float:left;margin-left:30px}}@media all and (min-width:1048px){.col-l-1,.col-l-10,.col-l-11,.col-l-12,.col-l-2,.col-l-3,.col-l-4,.col-l-5,.col-l-6,.col-l-7,.col-l-8,.col-l-9{float:left}.col-l-12{width:100%}.col-l-11{width:91.66666667%}.col-l-10{width:83.33333333%}.col-l-9{width:75%}.col-l-8{width:66.66666667%}.col-l-7{width:58.33333333%}.col-l-6{width:50%}.col-l-5{width:41.66666667%}.col-l-4{width:33.33333333%}.col-l-3{width:25%}.col-l-2{width:16.66666667%}.col-l-1{width:8.33333333%}.col-l-pull-12{right:100%}.col-l-pull-11{right:91.66666667%}.col-l-pull-10{right:83.33333333%}.col-l-pull-9{right:75%}.col-l-pull-8{right:66.66666667%}.col-l-pull-7{right:58.33333333%}.col-l-pull-6{right:50%}.col-l-pull-5{right:41.66666667%}.col-l-pull-4{right:33.33333333%}.col-l-pull-3{right:25%}.col-l-pull-2{right:16.66666667%}.col-l-pull-1{right:8.33333333%}.col-l-pull-0{right:auto}.col-l-push-12{left:100%}.col-l-push-11{left:91.66666667%}.col-l-push-10{left:83.33333333%}.col-l-push-9{left:75%}.col-l-push-8{left:66.66666667%}.col-l-push-7{left:58.33333333%}.col-l-push-6{left:50%}.col-l-push-5{left:41.66666667%}.col-l-push-4{left:33.33333333%}.col-l-push-3{left:25%}.col-l-push-2{left:16.66666667%}.col-l-push-1{left:8.33333333%}.col-l-push-0{left:auto}.col-l-offset-12{margin-left:100%}.col-l-offset-11{margin-left:91.66666667%}.col-l-offset-10{margin-left:83.33333333%}.col-l-offset-9{margin-left:75%}.col-l-offset-8{margin-left:66.66666667%}.col-l-offset-7{margin-left:58.33333333%}.col-l-offset-6{margin-left:50%}.col-l-offset-5{margin-left:41.66666667%}.col-l-offset-4{margin-left:33.33333333%}.col-l-offset-3{margin-left:25%}.col-l-offset-2{margin-left:16.66666667%}.col-l-offset-1{margin-left:8.33333333%}.col-l-offset-0{margin-left:0}}@media all and (min-width:1440px){.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9{float:left}.col-xl-12{width:100%}.col-xl-11{width:91.66666667%}.col-xl-10{width:83.33333333%}.col-xl-9{width:75%}.col-xl-8{width:66.66666667%}.col-xl-7{width:58.33333333%}.col-xl-6{width:50%}.col-xl-5{width:41.66666667%}.col-xl-4{width:33.33333333%}.col-xl-3{width:25%}.col-xl-2{width:16.66666667%}.col-xl-1{width:8.33333333%}.col-xl-pull-12{right:100%}.col-xl-pull-11{right:91.66666667%}.col-xl-pull-10{right:83.33333333%}.col-xl-pull-9{right:75%}.col-xl-pull-8{right:66.66666667%}.col-xl-pull-7{right:58.33333333%}.col-xl-pull-6{right:50%}.col-xl-pull-5{right:41.66666667%}.col-xl-pull-4{right:33.33333333%}.col-xl-pull-3{right:25%}.col-xl-pull-2{right:16.66666667%}.col-xl-pull-1{right:8.33333333%}.col-xl-pull-0{right:auto}.col-xl-push-12{left:100%}.col-xl-push-11{left:91.66666667%}.col-xl-push-10{left:83.33333333%}.col-xl-push-9{left:75%}.col-xl-push-8{left:66.66666667%}.col-xl-push-7{left:58.33333333%}.col-xl-push-6{left:50%}.col-xl-push-5{left:41.66666667%}.col-xl-push-4{left:33.33333333%}.col-xl-push-3{left:25%}.col-xl-push-2{left:16.66666667%}.col-xl-push-1{left:8.33333333%}.col-xl-push-0{left:auto}.col-xl-offset-12{margin-left:100%}.col-xl-offset-11{margin-left:91.66666667%}.col-xl-offset-10{margin-left:83.33333333%}.col-xl-offset-9{margin-left:75%}.col-xl-offset-8{margin-left:66.66666667%}.col-xl-offset-7{margin-left:58.33333333%}.col-xl-offset-6{margin-left:50%}.col-xl-offset-5{margin-left:41.66666667%}.col-xl-offset-4{margin-left:33.33333333%}.col-xl-offset-3{margin-left:25%}.col-xl-offset-2{margin-left:16.66666667%}.col-xl-offset-1{margin-left:8.33333333%}.col-xl-offset-0{margin-left:0}}@media all and (max-width:767px){.abs-clearer-mobile:after,.nav-bar:after{clear:both;content:'';display:table}.list-definition>dt{float:none}.list-definition>dd{margin-left:0}.form-row .form-label{text-align:left}.form-row .form-label.required:after{position:static}.nav{padding-bottom:0;padding-left:0;padding-right:0}.nav-bar-outer-actions{margin-top:0}.nav-bar{display:block;margin-bottom:0;margin-left:auto;margin-right:auto;width:30.9rem}.nav-bar:before{display:none}.nav-bar>li{float:left;min-height:9rem}.nav-bar>li:after{display:none}.nav-bar>li:nth-child(4n){clear:both}.nav-bar a{line-height:1.4}.tooltip{display:none!important}.readiness-check-content{margin-right:2rem}.readiness-check-side{padding:2rem 0;position:static}.form-el-insider,.form-el-insider-wrap,.page-web-configuration .form-el-insider-input,.page-web-configuration .form-el-insider-input .form-el-input{display:block;width:100%}}@media all and (max-width:479px){.nav-bar{width:23.175rem}.nav-bar>li{width:7.725rem}.nav .btn-group .btn-wrap-try-again,.nav-bar-outer-actions .btn-wrap-try-again{clear:both;display:block;float:none;margin-left:auto;margin-right:auto;margin-top:1rem;padding-top:1rem}}
\ No newline at end of file
+.abs-action-delete,.abs-icon,.action-close:before,.action-next:before,.action-previous:before,.admin-user .admin__action-dropdown:before,.admin__action-multiselect-dropdown:before,.admin__action-multiselect-search-label:before,.admin__control-checkbox+label:before,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete:before,.admin__control-table .action-delete:before,.admin__current-filters-list .action-remove:before,.admin__data-grid-action-bookmarks .action-delete:before,.admin__data-grid-action-bookmarks .action-edit:before,.admin__data-grid-action-bookmarks .action-submit:before,.admin__data-grid-action-bookmarks .admin__action-dropdown:before,.admin__data-grid-action-columns .admin__action-dropdown:before,.admin__data-grid-action-export .admin__action-dropdown:before,.admin__field-fallback-reset:before,.admin__menu .level-0>a:before,.admin__page-nav-item-message .admin__page-nav-item-message-icon,.admin__page-nav-title._collapsible:after,.data-grid-filters-action-wrap .action-default:before,.data-grid-row-changed:after,.data-grid-row-parent>td .data-grid-checkbox-cell-inner:before,.data-grid-search-control-wrap .action-submit:before,.extensions-information .list .extension-delete,.icon-failed:before,.icon-success:before,.notifications-action:before,.notifications-close:before,.page-actions .page-actions-buttons>button.action-back:before,.page-actions .page-actions-buttons>button.back:before,.page-actions>button.action-back:before,.page-actions>button.back:before,.page-title-jumbo-success:before,.search-global-label:before,.selectmenu .action-delete:before,.selectmenu .action-edit:before,.selectmenu .action-save:before,.setup-home-item:before,.sticky-header .data-grid-search-control-wrap .data-grid-search-label:before,.store-switcher .dropdown-menu .dropdown-toolbar a:before,.tooltip .help a:before,.tooltip .help span:before{-webkit-font-smoothing:antialiased;font-family:Icons;font-style:normal;font-weight:400;line-height:1;speak:none}.validation-symbol:after{color:#e22626;content:'*';font-weight:400;margin-left:3px}.abs-modal-overlay,.modals-overlay{background:rgba(0,0,0,.35);bottom:0;left:0;position:fixed;right:0;top:0}.abs-action-delete>span,.abs-visually-hidden,.action-multicheck-wrap .action-multicheck-toggle>span,.admin__actions-switch-checkbox,.admin__control-fields .admin__field:nth-child(n+2):not(.admin__field-option):not(.admin__field-group-show-label)>.admin__field-label,.admin__field-tooltip .admin__field-tooltip-action span,.customize-your-store .customize-your-store-default .legend,.extensions-information .list .extension-delete>span,.form-el-checkbox,.form-el-radio,.selectmenu .action-delete>span,.selectmenu .action-edit>span,.selectmenu .action-save>span,.selectmenu-toggle span,.tooltip .help a span,.tooltip .help span span,[class*=admin__control-grouped]>.admin__field:nth-child(n+2):not(.admin__field-option):not(.admin__field-group-show-label):not(.admin__field-date)>.admin__field-label{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.abs-visually-hidden-reset,.admin__field-group-columns>.admin__field:nth-child(n+2):not(.admin__field-option):not(.admin__field-group-show-label):not(.admin__field-date)>.admin__field-label[class]{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.abs-clearfix:after,.abs-clearfix:before,.action-multicheck-wrap:after,.action-multicheck-wrap:before,.actions-split:after,.actions-split:before,.admin__control-table-pagination:after,.admin__control-table-pagination:before,.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-content:after,.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-content:before,.admin__data-grid-filters-footer:after,.admin__data-grid-filters-footer:before,.admin__data-grid-filters:after,.admin__data-grid-filters:before,.admin__data-grid-header-row:after,.admin__data-grid-header-row:before,.admin__field-complex:after,.admin__field-complex:before,.modal-slide .magento-message .insert-title-inner:after,.modal-slide .magento-message .insert-title-inner:before,.modal-slide .main-col .insert-title-inner:after,.modal-slide .main-col .insert-title-inner:before,.page-actions._fixed:after,.page-actions._fixed:before,.page-content:after,.page-content:before,.page-header-actions:after,.page-header-actions:before,.page-main-actions:not(._hidden):after,.page-main-actions:not(._hidden):before{content:'';display:table}.abs-clearfix:after,.action-multicheck-wrap:after,.actions-split:after,.admin__control-table-pagination:after,.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-content:after,.admin__data-grid-filters-footer:after,.admin__data-grid-filters:after,.admin__data-grid-header-row:after,.admin__field-complex:after,.modal-slide .magento-message .insert-title-inner:after,.modal-slide .main-col .insert-title-inner:after,.page-actions._fixed:after,.page-content:after,.page-header-actions:after,.page-main-actions:not(._hidden):after{clear:both}.abs-list-reset-styles{margin:0;padding:0;list-style:none}.abs-draggable-handle,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .draggable-handle,.admin__control-table .draggable-handle,.data-grid .data-grid-draggable-row-cell .draggable-handle{cursor:-webkit-grab;cursor:move;font-size:0;margin-top:-4px;padding:0 1rem 0 0;vertical-align:middle;display:inline-block;text-decoration:none}.abs-draggable-handle:before,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .draggable-handle:before,.admin__control-table .draggable-handle:before,.data-grid .data-grid-draggable-row-cell .draggable-handle:before{-webkit-font-smoothing:antialiased;font-size:1.8rem;line-height:inherit;color:#9e9e9e;content:'\e617';font-family:Icons;vertical-align:middle;display:inline-block;font-weight:400;overflow:hidden;speak:none;text-align:center}.abs-draggable-handle:hover:before,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .draggable-handle:hover:before,.admin__control-table .draggable-handle:hover:before,.data-grid .data-grid-draggable-row-cell .draggable-handle:hover:before{color:#858585}.abs-config-scope-label,.admin__field:not(.admin__field-option)>.admin__field-label span[data-config-scope]:before{bottom:-1.3rem;color:gray;content:attr(data-config-scope);font-size:1.1rem;font-weight:400;min-width:15rem;position:absolute;right:0;text-transform:lowercase}.abs-word-wrap,.admin__field:not(.admin__field-option)>.admin__field-label{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box}*,:after,:before{box-sizing:inherit}:focus{box-shadow:none;outline:0}._keyfocus :focus{box-shadow:0 0 0 1px #008bdb}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}embed,img,object,video{max-width:100%}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@font-face{font-family:'Open Sans';src:url(../fonts/opensans/light/opensans-300.eot);src:url(../fonts/opensans/light/opensans-300.eot?#iefix) format('embedded-opentype'),url(../fonts/opensans/light/opensans-300.woff2) format('woff2'),url(../fonts/opensans/light/opensans-300.woff) format('woff'),url(../fonts/opensans/light/opensans-300.ttf) format('truetype'),url('../fonts/opensans/light/opensans-300.svg#Open Sans') format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Open Sans';src:url(../fonts/opensans/regular/opensans-400.eot);src:url(../fonts/opensans/regular/opensans-400.eot?#iefix) format('embedded-opentype'),url(../fonts/opensans/regular/opensans-400.woff2) format('woff2'),url(../fonts/opensans/regular/opensans-400.woff) format('woff'),url(../fonts/opensans/regular/opensans-400.ttf) format('truetype'),url('../fonts/opensans/regular/opensans-400.svg#Open Sans') format('svg');font-weight:400;font-style:normal}@font-face{font-family:'Open Sans';src:url(../fonts/opensans/semibold/opensans-600.eot);src:url(../fonts/opensans/semibold/opensans-600.eot?#iefix) format('embedded-opentype'),url(../fonts/opensans/semibold/opensans-600.woff2) format('woff2'),url(../fonts/opensans/semibold/opensans-600.woff) format('woff'),url(../fonts/opensans/semibold/opensans-600.ttf) format('truetype'),url('../fonts/opensans/semibold/opensans-600.svg#Open Sans') format('svg');font-weight:600;font-style:normal}@font-face{font-family:'Open Sans';src:url(../fonts/opensans/bold/opensans-700.eot);src:url(../fonts/opensans/bold/opensans-700.eot?#iefix) format('embedded-opentype'),url(../fonts/opensans/bold/opensans-700.woff2) format('woff2'),url(../fonts/opensans/bold/opensans-700.woff) format('woff'),url(../fonts/opensans/bold/opensans-700.ttf) format('truetype'),url('../fonts/opensans/bold/opensans-700.svg#Open Sans') format('svg');font-weight:700;font-style:normal}html{font-size:62.5%}body{color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;line-height:1.36;font-size:1.4rem}h1{margin:0 0 2rem;color:#41362f;font-weight:400;line-height:1.2;font-size:2.8rem}h2{margin:0 0 2rem;color:#41362f;font-weight:400;line-height:1.2;font-size:2rem}h3{margin:0 0 2rem;color:#41362f;font-weight:600;line-height:1.2;font-size:1.7rem}h4,h5,h6{font-weight:600;margin-top:0}p{margin:0 0 1em}small{font-size:1.2rem}a{color:#008bdb;text-decoration:none}a:hover{color:#0fa7ff;text-decoration:underline}dl,ol,ul{padding-left:0}nav ol,nav ul{list-style:none;margin:0;padding:0}html{height:100%}body{background-color:#fff;min-height:100%;min-width:102.4rem}.page-wrapper{background-color:#fff;display:inline-block;margin-left:-4px;vertical-align:top;width:calc(100% - 8.8rem)}.page-content{padding-bottom:3rem;padding-left:3rem;padding-right:3rem}.notices-wrapper{margin:0 3rem}.notices-wrapper .messages{margin-bottom:0}.row{margin-left:0;margin-right:0}.row:after{clear:both;content:'';display:table}.col-l-1,.col-l-10,.col-l-11,.col-l-12,.col-l-2,.col-l-3,.col-l-4,.col-l-5,.col-l-6,.col-l-7,.col-l-8,.col-l-9,.col-m-1,.col-m-10,.col-m-11,.col-m-12,.col-m-2,.col-m-3,.col-m-4,.col-m-5,.col-m-6,.col-m-7,.col-m-8,.col-m-9,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{min-height:1px;padding-left:0;padding-right:0;position:relative}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}.row-gutter{margin-left:-1.5rem;margin-right:-1.5rem}.row-gutter>[class*=col-]{padding-left:1.5rem;padding-right:1.5rem}.abs-clearer:after,.extension-manager-content:after,.extension-manager-title:after,.form-row:after,.header:after,.nav:after,body:after{clear:both;content:'';display:table}.ng-cloak{display:none!important}.hide.hide{display:none}.show.show{display:block}.text-center{text-align:center}.text-right{text-align:right}@font-face{font-family:Icons;src:url(../fonts/icons/icons.eot);src:url(../fonts/icons/icons.eot?#iefix) format('embedded-opentype'),url(../fonts/icons/icons.woff2) format('woff2'),url(../fonts/icons/icons.woff) format('woff'),url(../fonts/icons/icons.ttf) format('truetype'),url(../fonts/icons/icons.svg#Icons) format('svg');font-weight:400;font-style:normal}[class*=icon-]{display:inline-block;line-height:1}.icon-failed:before,.icon-success:before,[class*=icon-]:after{font-family:Icons}.icon-success{color:#79a22e}.icon-success:before{content:'\e62d'}.icon-failed{color:#e22626}.icon-failed:before{content:'\e632'}.icon-success-thick:after{content:'\e62d'}.icon-collapse:after{content:'\e615'}.icon-failed-thick:after{content:'\e632'}.icon-expand:after{content:'\e616'}.icon-warning:after{content:'\e623'}.icon-failed-round,.icon-success-round{border-radius:100%;color:#fff;font-size:2.5rem;height:1em;position:relative;text-align:center;width:1em}.icon-failed-round:after,.icon-success-round:after{bottom:0;font-size:.5em;left:0;position:absolute;right:0;top:.45em}.icon-success-round{background-color:#79a22e}.icon-success-round:after{content:'\e62d'}.icon-failed-round{background-color:#e22626}.icon-failed-round:after{content:'\e632'}dl,ol,ul{margin-top:0}.list{padding-left:0}.list>li{display:block;margin-bottom:.75em;position:relative}.list>li>.icon-failed,.list>li>.icon-success{font-size:1.6em;left:-.1em;position:absolute;top:0}.list>li>.icon-success{color:#79a22e}.list>li>.icon-failed{color:#e22626}.list-item-failed,.list-item-icon,.list-item-success,.list-item-warning{padding-left:3.5rem}.list-item-failed:before,.list-item-success:before,.list-item-warning:before{left:-.1em;position:absolute}.list-item-success:before{color:#79a22e}.list-item-failed:before{color:#e22626}.list-item-warning:before{color:#ef672f}.list-definition{margin:0 0 3rem;padding:0}.list-definition>dt{clear:left;float:left}.list-definition>dd{margin-bottom:1em;margin-left:20rem}.btn-wrap{margin:0 auto}.btn-wrap .btn{width:100%}.btn{background:#e3e3e3;border:none;color:#514943;display:inline-block;font-size:1.6rem;font-weight:600;padding:.45em .9em;text-align:center}.btn:hover{background-color:#dbdbdb;color:#514943;text-decoration:none}.btn:active{background-color:#d6d6d6}.btn.disabled,.btn[disabled]{cursor:default;opacity:.5;pointer-events:none}.ie9 .btn.disabled,.ie9 .btn[disabled]{background-color:#f0f0f0;opacity:1;text-shadow:none}.btn-large{padding:.75em 1.25em}.btn-medium{font-size:1.4rem;padding:.5em 1.5em .6em}.btn-link{background-color:transparent;border:none;color:#008bdb;font-family:1.6rem;font-size:1.5rem}.btn-link:active,.btn-link:focus,.btn-link:hover{background-color:transparent;color:#0fa7ff}.btn-prime{background-color:#eb5202;color:#fff;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.btn-prime:focus,.btn-prime:hover{background-color:#f65405;background-repeat:repeat-x;background-image:linear-gradient(to right,#e04f00 0,#f65405 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e04f00', endColorstr='#f65405', GradientType=1);color:#fff}.btn-prime:active{background-color:#e04f00;background-repeat:repeat-x;background-image:linear-gradient(to right,#f65405 0,#e04f00 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f65405', endColorstr='#e04f00', GradientType=1);color:#fff}.ie9 .btn-prime.disabled,.ie9 .btn-prime[disabled]{background-color:#fd6e23}.ie9 .btn-prime.disabled:active,.ie9 .btn-prime.disabled:hover,.ie9 .btn-prime[disabled]:active,.ie9 .btn-prime[disabled]:hover{background-color:#fd6e23;-webkit-filter:none;filter:none}.btn-secondary{background-color:#514943;color:#fff}.btn-secondary:hover{background-color:#5f564f;color:#fff}.btn-secondary:active,.btn-secondary:focus{background-color:#574e48;color:#fff}.ie9 .btn-secondary.disabled,.ie9 .btn-secondary[disabled]{background-color:#514943}.ie9 .btn-secondary.disabled:active,.ie9 .btn-secondary[disabled]:active{background-color:#514943;-webkit-filter:none;filter:none}[class*=btn-wrap-triangle]{overflow:hidden;position:relative}[class*=btn-wrap-triangle] .btn:after{border-style:solid;content:'';height:0;position:absolute;top:0;width:0}.btn-wrap-triangle-right{display:inline-block;padding-right:1.74rem;position:relative}.btn-wrap-triangle-right .btn{text-indent:.92rem}.btn-wrap-triangle-right .btn:after{border-color:transparent transparent transparent #e3e3e3;border-width:1.84rem 0 1.84rem 1.84rem;left:100%;margin-left:-1.74rem}.btn-wrap-triangle-right .btn:focus:after,.btn-wrap-triangle-right .btn:hover:after{border-left-color:#dbdbdb}.btn-wrap-triangle-right .btn:active:after{border-left-color:#d6d6d6}.btn-wrap-triangle-right .btn:not(.disabled):active,.btn-wrap-triangle-right .btn:not([disabled]):active{left:1px}.ie9 .btn-wrap-triangle-right .btn.disabled:after,.ie9 .btn-wrap-triangle-right .btn[disabled]:after{border-color:transparent transparent transparent #f0f0f0}.ie9 .btn-wrap-triangle-right .btn.disabled:active:after,.ie9 .btn-wrap-triangle-right .btn.disabled:focus:after,.ie9 .btn-wrap-triangle-right .btn.disabled:hover:after,.ie9 .btn-wrap-triangle-right .btn[disabled]:active:after,.ie9 .btn-wrap-triangle-right .btn[disabled]:focus:after,.ie9 .btn-wrap-triangle-right .btn[disabled]:hover:after{border-left-color:#f0f0f0}.btn-wrap-triangle-right .btn-prime:after{border-color:transparent transparent transparent #eb5202}.btn-wrap-triangle-right .btn-prime:focus:after,.btn-wrap-triangle-right .btn-prime:hover:after{border-left-color:#f65405}.btn-wrap-triangle-right .btn-prime:active:after{border-left-color:#e04f00}.btn-wrap-triangle-right .btn-prime:not(.disabled):active,.btn-wrap-triangle-right .btn-prime:not([disabled]):active{left:1px}.ie9 .btn-wrap-triangle-right .btn-prime.disabled:after,.ie9 .btn-wrap-triangle-right .btn-prime[disabled]:after{border-color:transparent transparent transparent #fd6e23}.ie9 .btn-wrap-triangle-right .btn-prime.disabled:active:after,.ie9 .btn-wrap-triangle-right .btn-prime.disabled:hover:after,.ie9 .btn-wrap-triangle-right .btn-prime[disabled]:active:after,.ie9 .btn-wrap-triangle-right .btn-prime[disabled]:hover:after{border-left-color:#fd6e23}.btn-wrap-triangle-left{display:inline-block;padding-left:1.74rem}.btn-wrap-triangle-left .btn{text-indent:-.92rem}.btn-wrap-triangle-left .btn:after{border-color:transparent #e3e3e3 transparent transparent;border-width:1.84rem 1.84rem 1.84rem 0;margin-right:-1.74rem;right:100%}.btn-wrap-triangle-left .btn:focus:after,.btn-wrap-triangle-left .btn:hover:after{border-right-color:#dbdbdb}.btn-wrap-triangle-left .btn:active:after{border-right-color:#d6d6d6}.btn-wrap-triangle-left .btn:not(.disabled):active,.btn-wrap-triangle-left .btn:not([disabled]):active{right:1px}.ie9 .btn-wrap-triangle-left .btn.disabled:after,.ie9 .btn-wrap-triangle-left .btn[disabled]:after{border-color:transparent #f0f0f0 transparent transparent}.ie9 .btn-wrap-triangle-left .btn.disabled:active:after,.ie9 .btn-wrap-triangle-left .btn.disabled:hover:after,.ie9 .btn-wrap-triangle-left .btn[disabled]:active:after,.ie9 .btn-wrap-triangle-left .btn[disabled]:hover:after{border-right-color:#f0f0f0}.btn-wrap-triangle-left .btn-prime:after{border-color:transparent #eb5202 transparent transparent}.btn-wrap-triangle-left .btn-prime:focus:after,.btn-wrap-triangle-left .btn-prime:hover:after{border-right-color:#e04f00}.btn-wrap-triangle-left .btn-prime:active:after{border-right-color:#f65405}.btn-wrap-triangle-left .btn-prime:not(.disabled):active,.btn-wrap-triangle-left .btn-prime:not([disabled]):active{right:1px}.ie9 .btn-wrap-triangle-left .btn-prime.disabled:after,.ie9 .btn-wrap-triangle-left .btn-prime[disabled]:after{border-color:transparent #fd6e23 transparent transparent}.ie9 .btn-wrap-triangle-left .btn-prime.disabled:active:after,.ie9 .btn-wrap-triangle-left .btn-prime.disabled:hover:after,.ie9 .btn-wrap-triangle-left .btn-prime[disabled]:active:after,.ie9 .btn-wrap-triangle-left .btn-prime[disabled]:hover:after{border-right-color:#fd6e23}.btn-expand{background-color:transparent;border:none;color:#303030;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.4rem;font-weight:700;padding:0;position:relative}.btn-expand.expanded:after{border-color:transparent transparent #303030;border-width:0 .285em .36em}.btn-expand.expanded:hover:after{border-color:transparent transparent #3d3d3d}.btn-expand:hover{background-color:transparent;border:none;color:#3d3d3d}.btn-expand:hover:after{border-color:#3d3d3d transparent transparent}.btn-expand:after{border-color:#303030 transparent transparent;border-style:solid;border-width:.36em .285em 0;content:'';height:0;left:100%;margin-left:.5em;margin-top:-.18em;position:absolute;top:50%;width:0}[class*=col-] .form-el-input,[class*=col-] .form-el-select{width:100%}.form-fieldset{border:none;margin:0 0 1em;padding:0}.form-row{margin-bottom:2.2rem}.form-row .form-row{margin-bottom:.4rem}.form-row .form-label{display:block;font-weight:600;padding:.6rem 2.1em 0 0;text-align:right}.form-row .form-label.required{position:relative}.form-row .form-label.required:after{color:#eb5202;content:'*';font-size:1.15em;position:absolute;right:.7em;top:.5em}.form-row .form-el-checkbox+.form-label:before,.form-row .form-el-radio+.form-label:before{top:.7rem}.form-row .form-el-checkbox+.form-label:after,.form-row .form-el-radio+.form-label:after{top:1.1rem}.form-row.form-row-text{padding-top:.6rem}.form-row.form-row-text .action-sign-out{font-size:1.2rem;margin-left:1rem}.form-note{font-size:1.2rem;font-weight:600;margin-top:1rem}.form-el-dummy{display:none}.fieldset{border:0;margin:0;min-width:0;padding:0}input:not([disabled]):focus,textarea:not([disabled]):focus{box-shadow:none}.form-el-input{border:1px solid #adadad;color:#303030;padding:.35em .55em .5em}.form-el-input:hover{border-color:#949494}.form-el-input:focus{border-color:#008bdb}.form-el-input:required{box-shadow:none}.form-label{margin-bottom:.5em}[class*=form-label][for]{cursor:pointer}.form-el-insider-wrap{display:table;width:100%}.form-el-insider-input{display:table-cell;width:100%}.form-el-insider{border-radius:2px;display:table-cell;padding:.43em .55em .5em 0;vertical-align:top}.form-legend,.form-legend-expand,.form-legend-light{display:block;margin:0}.form-legend,.form-legend-expand{font-size:1.25em;font-weight:600;margin-bottom:2.5em;padding-top:1.5em}.form-legend{border-top:1px solid #ccc;width:100%}.form-legend-light{font-size:1em;margin-bottom:1.5em}.form-legend-expand{cursor:pointer;transition:opacity .2s linear}.form-legend-expand:hover{opacity:.85}.form-legend-expand.expanded:after{content:'\e615'}.form-legend-expand:after{content:'\e616';font-family:Icons;font-size:1.15em;font-weight:400;margin-left:.5em;vertical-align:sub}.form-el-checkbox.disabled+.form-label,.form-el-checkbox.disabled+.form-label:before,.form-el-checkbox[disabled]+.form-label,.form-el-checkbox[disabled]+.form-label:before,.form-el-radio.disabled+.form-label,.form-el-radio.disabled+.form-label:before,.form-el-radio[disabled]+.form-label,.form-el-radio[disabled]+.form-label:before{cursor:default;opacity:.5;pointer-events:none}.form-el-checkbox:not(.disabled)+.form-label:hover:before,.form-el-checkbox:not([disabled])+.form-label:hover:before,.form-el-radio:not(.disabled)+.form-label:hover:before,.form-el-radio:not([disabled])+.form-label:hover:before{border-color:#514943}.form-el-checkbox+.form-label,.form-el-radio+.form-label{font-weight:400;padding-left:2em;padding-right:0;position:relative;text-align:left;transition:border-color .1s linear}.form-el-checkbox+.form-label:before,.form-el-radio+.form-label:before{border:1px solid;content:'';left:0;position:absolute;top:.1rem;transition:border-color .1s linear}.form-el-checkbox+.form-label:before{background-color:#fff;border-color:#adadad;border-radius:2px;font-size:1.2rem;height:1.6rem;line-height:1.2;width:1.6rem}.form-el-checkbox:checked+.form-label::before{content:'\e62d';font-family:Icons}.form-el-radio+.form-label:before{background-color:#fff;border:1px solid #adadad;border-radius:100%;height:1.8rem;width:1.8rem}.form-el-radio+.form-label:after{background:0 0;border:.5rem solid transparent;border-radius:100%;content:'';height:0;left:.4rem;position:absolute;top:.5rem;transition:background .3s linear;width:0}.form-el-radio:checked+.form-label{cursor:default}.form-el-radio:checked+.form-label:after{border-color:#514943}.form-select-label{border:1px solid #adadad;color:#303030;cursor:pointer;display:block;overflow:hidden;position:relative;z-index:0}.form-select-label:hover,.form-select-label:hover:after{border-color:#949494}.form-select-label:active,.form-select-label:active:after,.form-select-label:focus,.form-select-label:focus:after{border-color:#008bdb}.form-select-label:after{background:#e3e3e3;border-left:1px solid #adadad;bottom:0;content:'';position:absolute;right:0;top:0;width:2.36em;z-index:-2}.ie9 .form-select-label:after{display:none}.form-select-label:before{border-color:#303030 transparent transparent;border-style:solid;border-width:5px 4px 0;content:'';height:0;margin-right:-4px;margin-top:-2.5px;position:absolute;right:1.18em;top:50%;width:0;z-index:-1}.ie9 .form-select-label:before{display:none}.form-select-label .form-el-select{background:0 0;border:none;border-radius:0;content:'';display:block;margin:0;padding:.35em calc(2.36em + 10%) .5em .55em;width:110%}.ie9 .form-select-label .form-el-select{padding-right:.55em;width:100%}.form-select-label .form-el-select::-ms-expand{display:none}.form-el-select{background:#fff;border:1px solid #adadad;border-radius:2px;color:#303030;display:block;padding:.35em .55em}.multiselect-custom{border:1px solid #adadad;height:45.2rem;margin:0 0 1.5rem;overflow:auto;position:relative}.multiselect-custom ul{margin:0;padding:0;list-style:none;min-width:29rem}.multiselect-custom .item{padding:1rem 1.4rem}.multiselect-custom .selected{background-color:#e0f6fe}.multiselect-custom .form-label{margin-bottom:0}[class*=form-el-].invalid{border-color:#e22626}[class*=form-el-].invalid+.error-container{display:block}.error-container{background-color:#fffbbb;border:1px solid #ee7d7d;color:#514943;display:none;font-size:1.19rem;margin-top:.2rem;padding:.8rem 1rem .9rem}.check-result-message{margin-left:.5em;min-height:3.68rem;-ms-align-items:center;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.check-result-text{margin-left:.5em}body:not([class]){min-width:0}.container{display:block;margin:0 auto 4rem;max-width:100rem;padding:0}.abs-action-delete,.action-close:before,.action-next:before,.action-previous:before,.admin-user .admin__action-dropdown:before,.admin__action-multiselect-dropdown:before,.admin__action-multiselect-search-label:before,.admin__control-checkbox+label:before,.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete:before,.admin__control-table .action-delete:before,.admin__current-filters-list .action-remove:before,.admin__data-grid-action-bookmarks .action-delete:before,.admin__data-grid-action-bookmarks .action-edit:before,.admin__data-grid-action-bookmarks .action-submit:before,.admin__data-grid-action-bookmarks .admin__action-dropdown:before,.admin__data-grid-action-columns .admin__action-dropdown:before,.admin__data-grid-action-export .admin__action-dropdown:before,.admin__field-fallback-reset:before,.admin__menu .level-0>a:before,.admin__page-nav-item-message .admin__page-nav-item-message-icon,.admin__page-nav-title._collapsible:after,.data-grid-filters-action-wrap .action-default:before,.data-grid-row-changed:after,.data-grid-row-parent>td .data-grid-checkbox-cell-inner:before,.data-grid-search-control-wrap .action-submit:before,.extensions-information .list .extension-delete,.icon-failed:before,.icon-success:before,.notifications-action:before,.notifications-close:before,.page-actions .page-actions-buttons>button.action-back:before,.page-actions .page-actions-buttons>button.back:before,.page-actions>button.action-back:before,.page-actions>button.back:before,.page-title-jumbo-success:before,.search-global-label:before,.selectmenu .action-delete:before,.selectmenu .action-edit:before,.selectmenu .action-save:before,.setup-home-item:before,.sticky-header .data-grid-search-control-wrap .data-grid-search-label:before,.store-switcher .dropdown-menu .dropdown-toolbar a:before,.tooltip .help a:before,.tooltip .help span:before{-webkit-font-smoothing:antialiased;font-family:Icons;font-style:normal;font-weight:400;line-height:1;speak:none}.text-stretch{margin-bottom:1.5em}.page-title-jumbo{font-size:4rem;font-weight:300;letter-spacing:-.05em;margin-bottom:2.9rem}.page-title-jumbo-success:before{color:#79a22e;content:'\e62d';font-size:3.9rem;margin-left:-.3rem;margin-right:2.4rem}.list{margin-bottom:3rem}.list-dot .list-item{display:list-item;list-style-position:inside;margin-bottom:1.2rem}.list-title{color:#333;font-size:1.4rem;font-weight:700;letter-spacing:.025em;margin-bottom:1.2rem}.list-item-failed:before,.list-item-success:before,.list-item-warning:before{font-family:Icons;font-size:1.6rem;top:0}.list-item-success:before{content:'\e62d';font-size:1.6rem}.list-item-failed:before{content:'\e632';font-size:1.4rem;left:.1rem;top:.2rem}.list-item-warning:before{content:'\e623';font-size:1.3rem;left:.2rem}.form-wrap{margin-bottom:3.6rem;padding-top:2.1rem}.form-el-label-horizontal{display:inline-block;font-size:1.3rem;font-weight:600;letter-spacing:.025em;margin-bottom:.4rem;margin-left:.4rem}.app-updater{min-width:768px}body._has-modal{height:100%;overflow:hidden;width:100%}.modals-overlay{z-index:899}.modal-popup,.modal-slide{bottom:0;min-width:0;position:fixed;right:0;top:0;visibility:hidden}.modal-popup._show,.modal-slide._show{visibility:visible}.modal-popup._show .modal-inner-wrap,.modal-slide._show .modal-inner-wrap{-ms-transform:translate(0,0);transform:translate(0,0)}.modal-popup .modal-inner-wrap,.modal-slide .modal-inner-wrap{background-color:#fff;box-shadow:0 0 12px 2px rgba(0,0,0,.35);opacity:1;pointer-events:auto}.modal-slide{left:14.8rem;z-index:900}.modal-slide._show .modal-inner-wrap{-ms-transform:translateX(0);transform:translateX(0)}.modal-slide .modal-inner-wrap{height:100%;overflow-y:auto;position:static;-ms-transform:translateX(100%);transform:translateX(100%);transition-duration:.3s;transition-property:transform,visibility;transition-timing-function:ease-in-out;width:auto}.modal-slide._inner-scroll .modal-inner-wrap{overflow-y:visible;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.modal-slide._inner-scroll .modal-footer,.modal-slide._inner-scroll .modal-header{-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.modal-slide._inner-scroll .modal-content{overflow-y:auto}.modal-slide._inner-scroll .modal-footer{margin-top:auto}.modal-slide .modal-content,.modal-slide .modal-footer,.modal-slide .modal-header{padding:0 2.6rem 2.6rem}.modal-slide .modal-header{padding-bottom:2.1rem;padding-top:2.1rem}.modal-popup{z-index:900;left:0;overflow-y:auto}.modal-popup._show .modal-inner-wrap{-ms-transform:translateY(0);transform:translateY(0)}.modal-popup .modal-inner-wrap{margin:5rem auto;width:75%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;box-sizing:border-box;height:auto;left:0;position:absolute;right:0;-ms-transform:translateY(-200%);transform:translateY(-200%);transition-duration:.2s;transition-property:transform,visibility;transition-timing-function:ease}.modal-popup._inner-scroll{overflow-y:visible}.ie10 .modal-popup._inner-scroll,.ie9 .modal-popup._inner-scroll{overflow-y:auto}.modal-popup._inner-scroll .modal-inner-wrap{max-height:90%}.ie10 .modal-popup._inner-scroll .modal-inner-wrap,.ie9 .modal-popup._inner-scroll .modal-inner-wrap{max-height:none}.modal-popup._inner-scroll .modal-content{overflow-y:auto}.modal-popup .modal-content,.modal-popup .modal-footer,.modal-popup .modal-header{padding-left:3rem;padding-right:3rem}.modal-popup .modal-footer,.modal-popup .modal-header{-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.modal-popup .modal-header{padding-bottom:1.2rem;padding-top:3rem}.modal-popup .modal-footer{margin-top:auto;padding-bottom:3rem}.modal-popup .modal-footer-actions{text-align:right}.admin__action-dropdown-wrap{display:inline-block;position:relative}.admin__action-dropdown-wrap .admin__action-dropdown-text:after{left:-6px;right:0}.admin__action-dropdown-wrap .admin__action-dropdown-menu{left:auto;right:0}.admin__action-dropdown-wrap._active .admin__action-dropdown,.admin__action-dropdown-wrap.active .admin__action-dropdown{border-color:#007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5)}.admin__action-dropdown-wrap._active .admin__action-dropdown-text:after,.admin__action-dropdown-wrap.active .admin__action-dropdown-text:after{background-color:#fff;content:'';height:6px;position:absolute;top:100%}.admin__action-dropdown-wrap._active .admin__action-dropdown-menu,.admin__action-dropdown-wrap.active .admin__action-dropdown-menu{display:block}.admin__action-dropdown-wrap._disabled .admin__action-dropdown{cursor:default}.admin__action-dropdown-wrap._disabled:hover .admin__action-dropdown{color:#333}.admin__action-dropdown{background-color:#fff;border:1px solid transparent;border-bottom:none;border-radius:0;box-shadow:none;color:#333;display:inline-block;font-size:1.3rem;font-weight:400;letter-spacing:-.025em;padding:.7rem 3.3rem .8rem 1.5rem;position:relative;vertical-align:baseline;z-index:2}.admin__action-dropdown._active:after,.admin__action-dropdown.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.admin__action-dropdown:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;top:50%;transition:all .2s linear;width:0}._active .admin__action-dropdown:after,.active .admin__action-dropdown:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.admin__action-dropdown:hover:after{border-color:#000 transparent transparent}.admin__action-dropdown:focus,.admin__action-dropdown:hover{background-color:#fff;color:#000;text-decoration:none}.admin__action-dropdown:after{right:1.5rem}.admin__action-dropdown:before{margin-right:1rem}.admin__action-dropdown-menu{background-color:#fff;border:1px solid #007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5);display:none;line-height:1.36;margin-top:-1px;min-width:120%;padding:.5rem 1rem;position:absolute;top:100%;transition:all .15s ease;z-index:1}.admin__action-dropdown-menu>li{display:block}.admin__action-dropdown-menu>li>a{color:#333;display:block;text-decoration:none;padding:.6rem .5rem}.selectmenu{display:inline-block;position:relative;text-align:left;z-index:1}.selectmenu._active{border-color:#007bdb;z-index:500}.selectmenu .action-delete,.selectmenu .action-edit,.selectmenu .action-save{background-color:transparent;border-color:transparent;box-shadow:none;padding:0 1rem}.selectmenu .action-delete:hover,.selectmenu .action-edit:hover,.selectmenu .action-save:hover{background-color:transparent;border-color:transparent;box-shadow:none}.selectmenu .action-delete:before,.selectmenu .action-edit:before,.selectmenu .action-save:before{content:'\e630'}.selectmenu .action-delete,.selectmenu .action-edit{border:0 solid #fff;border-left-width:1px;bottom:0;position:absolute;right:0;top:0;z-index:1}.selectmenu .action-delete:hover,.selectmenu .action-edit:hover{border:0 solid #fff;border-left-width:1px}.selectmenu .action-save:before{content:'\e625'}.selectmenu .action-edit:before{content:'\e631'}.selectmenu-value{display:inline-block}.selectmenu-value input[type=text]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:0;display:inline;margin:0;width:6rem}body._keyfocus .selectmenu-value input[type=text]:focus{box-shadow:none}.selectmenu-toggle{padding-right:3rem;background:0 0;border-width:0;bottom:0;float:right;position:absolute;right:0;top:0;width:0}.selectmenu-toggle._active:after,.selectmenu-toggle.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.selectmenu-toggle:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;right:1.1rem;top:50%;transition:all .2s linear;width:0}._active .selectmenu-toggle:after,.active .selectmenu-toggle:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.selectmenu-toggle:hover:after{border-color:#000 transparent transparent}.selectmenu-toggle:active,.selectmenu-toggle:focus,.selectmenu-toggle:hover{background:0 0}.selectmenu._active .selectmenu-toggle:before{border-color:#007bdb}body._keyfocus .selectmenu-toggle:focus{box-shadow:none}.selectmenu-toggle:before{background:#e3e3e3;border-left:1px solid #adadad;bottom:0;content:'';display:block;position:absolute;right:0;top:0;width:3.2rem}.selectmenu-items{background:#fff;border:1px solid #007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5);display:none;float:left;left:-1px;margin-top:3px;max-width:20rem;min-width:calc(100% + 2px);position:absolute;top:100%}.selectmenu-items._active{display:block}.selectmenu-items ul{float:left;list-style-type:none;margin:0;min-width:100%;padding:0}.selectmenu-items li{-webkit-flex-direction:row;display:flex;-ms-flex-direction:row;flex-direction:row;transition:background .2s linear}.selectmenu-items li:hover{background:#e3e3e3}.selectmenu-items li:last-child .selectmenu-item-action,.selectmenu-items li:last-child .selectmenu-item-action:visited{color:#008bdb;text-decoration:none}.selectmenu-items li:last-child .selectmenu-item-action:hover{color:#0fa7ff;text-decoration:underline}.selectmenu-items li:last-child .selectmenu-item-action:active{color:#ff5501;text-decoration:underline}.selectmenu-item{position:relative;width:100%;z-index:1}li._edit>.selectmenu-item{display:none}.selectmenu-item-edit{display:none;padding:.3rem 4rem .3rem .4rem;position:relative;white-space:nowrap;z-index:1}li:last-child .selectmenu-item-edit{padding-right:.4rem}.selectmenu-item-edit .admin__control-text{margin:0;width:5.4rem}li._edit .selectmenu-item-edit{display:block}.selectmenu-item-action{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:0 0;border:0;color:#333;display:block;font-size:1.4rem;font-weight:400;min-width:100%;padding:1rem 6rem 1rem 1.5rem;text-align:left;transition:background .2s linear;width:5rem}.selectmenu-item-action:focus,.selectmenu-item-action:hover{background:#e3e3e3}.abs-actions-split-xl .action-default,.page-actions .actions-split .action-default{margin-right:4rem}.abs-actions-split-xl .action-toggle,.page-actions .actions-split .action-toggle{padding-right:4rem}.abs-actions-split-xl .action-toggle:after,.page-actions .actions-split .action-toggle:after{border-width:.9rem .6rem 0;margin-top:-.3rem;right:1.4rem}.actions-split{position:relative;z-index:400}.actions-split._active,.actions-split.active,.actions-split:hover{box-shadow:0 0 0 1px #007bdb}.actions-split._active .action-toggle.action-primary,.actions-split._active .action-toggle.primary,.actions-split.active .action-toggle.action-primary,.actions-split.active .action-toggle.primary{background-color:#ba4000;border-color:#ba4000}.actions-split._active .dropdown-menu,.actions-split.active .dropdown-menu{opacity:1;visibility:visible;display:block}.actions-split .action-default,.actions-split .action-toggle{float:left;margin:0}.actions-split .action-default._active,.actions-split .action-default.active,.actions-split .action-default:hover,.actions-split .action-toggle._active,.actions-split .action-toggle.active,.actions-split .action-toggle:hover{box-shadow:none}.actions-split .action-default{margin-right:3.2rem;min-width:9.3rem}.actions-split .action-toggle{padding-right:3.2rem;border-left-color:rgba(0,0,0,.2);bottom:0;padding-left:0;position:absolute;right:0;top:0}.actions-split .action-toggle._active:after,.actions-split .action-toggle.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.actions-split .action-toggle:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;right:1.2rem;top:50%;transition:all .2s linear;width:0}._active .actions-split .action-toggle:after,.active .actions-split .action-toggle:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.actions-split .action-toggle:hover:after{border-color:#000 transparent transparent}.actions-split .action-toggle.action-primary:after,.actions-split .action-toggle.action-secondary:after,.actions-split .action-toggle.primary:after,.actions-split .action-toggle.secondary:after{border-color:#fff transparent transparent}.actions-split .action-toggle>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.action-select-wrap{display:inline-block;position:relative}.action-select-wrap .action-select{padding-right:3.2rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#fff;font-weight:400;text-align:left}.action-select-wrap .action-select._active:after,.action-select-wrap .action-select.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-select-wrap .action-select:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;right:1.2rem;top:50%;transition:all .2s linear;width:0}._active .action-select-wrap .action-select:after,.active .action-select-wrap .action-select:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-select-wrap .action-select:hover:after{border-color:#000 transparent transparent}.action-select-wrap .action-select:hover,.action-select-wrap .action-select:hover:before{border-color:#878787}.action-select-wrap .action-select:before{background-color:#e3e3e3;border:1px solid #adadad;bottom:0;content:'';position:absolute;right:0;top:0;width:3.2rem}.action-select-wrap .action-select._active{border-color:#007bdb}.action-select-wrap .action-select._active:before{border-color:#007bdb #007bdb #007bdb #adadad}.action-select-wrap .action-select[disabled]{color:#333}.action-select-wrap .action-select[disabled]:after{border-color:#333 transparent transparent}.action-select-wrap._active{z-index:500}.action-select-wrap._active .action-select,.action-select-wrap._active .action-select:before{border-color:#007bdb}.action-select-wrap._active .action-select:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-select-wrap .abs-action-menu .action-submenu,.action-select-wrap .abs-action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu,.action-select-wrap .action-menu .action-submenu,.action-select-wrap .actions-split .action-menu .action-submenu,.action-select-wrap .actions-split .action-menu .action-submenu .action-submenu,.action-select-wrap .actions-split .dropdown-menu .action-submenu,.action-select-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{max-height:45rem;overflow-y:auto}.action-select-wrap .abs-action-menu .action-submenu ._disabled:hover,.action-select-wrap .abs-action-menu .action-submenu .action-submenu ._disabled:hover,.action-select-wrap .action-menu ._disabled:hover,.action-select-wrap .action-menu .action-submenu ._disabled:hover,.action-select-wrap .actions-split .action-menu .action-submenu ._disabled:hover,.action-select-wrap .actions-split .action-menu .action-submenu .action-submenu ._disabled:hover,.action-select-wrap .actions-split .dropdown-menu .action-submenu ._disabled:hover,.action-select-wrap .actions-split .dropdown-menu .action-submenu .action-submenu ._disabled:hover{background:#fff}.action-select-wrap .abs-action-menu .action-submenu ._disabled .action-menu-item,.action-select-wrap .abs-action-menu .action-submenu .action-submenu ._disabled .action-menu-item,.action-select-wrap .action-menu ._disabled .action-menu-item,.action-select-wrap .action-menu .action-submenu ._disabled .action-menu-item,.action-select-wrap .actions-split .action-menu .action-submenu ._disabled .action-menu-item,.action-select-wrap .actions-split .action-menu .action-submenu .action-submenu ._disabled .action-menu-item,.action-select-wrap .actions-split .dropdown-menu .action-submenu ._disabled .action-menu-item,.action-select-wrap .actions-split .dropdown-menu .action-submenu .action-submenu ._disabled .action-menu-item{cursor:default;opacity:.5}.action-select-wrap .action-menu-items{left:0;position:absolute;right:0;top:100%}.action-select-wrap .action-menu-items>.abs-action-menu .action-submenu,.action-select-wrap .action-menu-items>.abs-action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.action-menu,.action-select-wrap .action-menu-items>.action-menu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .action-menu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .dropdown-menu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .dropdown-menu .action-submenu .action-submenu{min-width:100%;position:static}.action-select-wrap .action-menu-items>.abs-action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.abs-action-menu .action-submenu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.action-menu .action-submenu,.action-select-wrap .action-menu-items>.action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .action-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .action-menu .action-submenu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .dropdown-menu .action-submenu .action-submenu,.action-select-wrap .action-menu-items>.actions-split .dropdown-menu .action-submenu .action-submenu .action-submenu{position:absolute}.action-multicheck-wrap{display:inline-block;height:1.6rem;padding-top:1px;position:relative;width:3.1rem;z-index:200}.action-multicheck-wrap:hover .action-multicheck-toggle,.action-multicheck-wrap:hover .admin__control-checkbox+label:before{border-color:#878787}.action-multicheck-wrap._active .action-multicheck-toggle,.action-multicheck-wrap._active .admin__control-checkbox+label:before{border-color:#007bdb}.action-multicheck-wrap._active .abs-action-menu .action-submenu,.action-multicheck-wrap._active .abs-action-menu .action-submenu .action-submenu,.action-multicheck-wrap._active .action-menu,.action-multicheck-wrap._active .action-menu .action-submenu,.action-multicheck-wrap._active .actions-split .action-menu .action-submenu,.action-multicheck-wrap._active .actions-split .action-menu .action-submenu .action-submenu,.action-multicheck-wrap._active .actions-split .dropdown-menu .action-submenu,.action-multicheck-wrap._active .actions-split .dropdown-menu .action-submenu .action-submenu{opacity:1;visibility:visible;display:block}.action-multicheck-wrap._disabled .admin__control-checkbox+label:before{background-color:#fff}.action-multicheck-wrap._disabled .action-multicheck-toggle,.action-multicheck-wrap._disabled .admin__control-checkbox+label:before{border-color:#adadad;opacity:1}.action-multicheck-wrap .action-multicheck-toggle,.action-multicheck-wrap .admin__control-checkbox,.action-multicheck-wrap .admin__control-checkbox+label{float:left}.action-multicheck-wrap .action-multicheck-toggle{border-radius:0 1px 1px 0;height:1.6rem;margin-left:-1px;padding:0;position:relative;transition:border-color .1s linear;width:1.6rem}.action-multicheck-wrap .action-multicheck-toggle._active:after,.action-multicheck-wrap .action-multicheck-toggle.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-multicheck-wrap .action-multicheck-toggle:after{border-color:#000 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;top:50%;transition:all .2s linear;width:0}._active .action-multicheck-wrap .action-multicheck-toggle:after,.active .action-multicheck-wrap .action-multicheck-toggle:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.action-multicheck-wrap .action-multicheck-toggle:hover:after{border-color:#000 transparent transparent}.action-multicheck-wrap .action-multicheck-toggle:focus{border-color:#007bdb}.action-multicheck-wrap .action-multicheck-toggle:after{right:.3rem}.action-multicheck-wrap .abs-action-menu .action-submenu,.action-multicheck-wrap .abs-action-menu .action-submenu .action-submenu,.action-multicheck-wrap .action-menu,.action-multicheck-wrap .action-menu .action-submenu,.action-multicheck-wrap .actions-split .action-menu .action-submenu,.action-multicheck-wrap .actions-split .action-menu .action-submenu .action-submenu,.action-multicheck-wrap .actions-split .dropdown-menu .action-submenu,.action-multicheck-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{left:-1.1rem;margin-top:1px;right:auto;text-align:left}.action-multicheck-wrap .action-menu-item{white-space:nowrap}.admin__action-multiselect-wrap{display:block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.admin__action-multiselect-wrap.action-select-wrap:focus{box-shadow:none}.admin__action-multiselect-wrap.action-select-wrap .abs-action-menu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .abs-action-menu .action-submenu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .action-menu,.admin__action-multiselect-wrap.action-select-wrap .action-menu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .actions-split .action-menu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .actions-split .action-menu .action-submenu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .actions-split .dropdown-menu .action-submenu,.admin__action-multiselect-wrap.action-select-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{max-height:none;overflow-y:inherit}.admin__action-multiselect-wrap .action-menu-item{transition:background-color .1s linear}.admin__action-multiselect-wrap .action-menu-item._selected{background-color:#e0f6fe}.admin__action-multiselect-wrap .action-menu-item._hover{background-color:#e3e3e3}.admin__action-multiselect-wrap .action-menu-item._unclickable{cursor:default}.admin__action-multiselect-wrap .admin__action-multiselect{border:1px solid #adadad;cursor:pointer;display:block;min-height:3.2rem;padding-right:3.6rem;white-space:normal}.admin__action-multiselect-wrap .admin__action-multiselect:after{bottom:1.25rem;top:auto}.admin__action-multiselect-wrap .admin__action-multiselect:before{height:3.3rem;top:auto}.admin__control-table-wrapper .admin__action-multiselect-wrap{position:static}.admin__control-table-wrapper .admin__action-multiselect-wrap .admin__action-multiselect{position:relative}.admin__control-table-wrapper .admin__action-multiselect-wrap .admin__action-multiselect:before{right:-1px;top:-1px}.admin__control-table-wrapper .admin__action-multiselect-wrap .abs-action-menu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .abs-action-menu .action-submenu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .action-menu,.admin__control-table-wrapper .admin__action-multiselect-wrap .action-menu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .actions-split .action-menu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .actions-split .action-menu .action-submenu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .actions-split .dropdown-menu .action-submenu,.admin__control-table-wrapper .admin__action-multiselect-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{left:auto;min-width:34rem;right:auto;top:auto;z-index:1}.admin__action-multiselect-wrap .admin__action-multiselect-item-path{color:#a79d95;font-size:1.2rem;font-weight:400;padding-left:1rem}.admin__action-multiselect-actions-wrap{border-top:1px solid #e3e3e3;margin:0 1rem;padding:1rem 0;text-align:center}.admin__action-multiselect-actions-wrap .action-default{font-size:1.3rem;min-width:13rem}.admin__action-multiselect-text{padding:.6rem 1rem}.abs-action-menu .action-submenu,.abs-action-menu .action-submenu .action-submenu,.action-menu,.action-menu .action-submenu,.actions-split .action-menu .action-submenu,.actions-split .action-menu .action-submenu .action-submenu,.actions-split .dropdown-menu .action-submenu,.actions-split .dropdown-menu .action-submenu .action-submenu{text-align:left}.admin__action-multiselect-label{cursor:pointer;position:relative;z-index:1}.admin__action-multiselect-label:before{margin-right:.5rem}._unclickable .admin__action-multiselect-label{cursor:default;font-weight:700}.admin__action-multiselect-search-wrap{border-bottom:1px solid #e3e3e3;margin:0 1rem;padding:1rem 0;position:relative}.admin__action-multiselect-search{padding-right:3rem;width:100%}.admin__action-multiselect-search-label{display:block;font-size:1.5rem;height:1em;overflow:hidden;position:absolute;right:2.2rem;top:1.7rem;width:1em}.admin__action-multiselect-search-label:before{content:'\e60c'}.admin__action-multiselect-search-count{color:#a79d95;margin-top:1rem}.admin__action-multiselect-menu-inner{margin-bottom:0;max-height:46rem;overflow-y:auto}.admin__action-multiselect-menu-inner .admin__action-multiselect-menu-inner{list-style:none;max-height:none;overflow:hidden;padding-left:2.2rem}.admin__action-multiselect-menu-inner ._hidden{display:none}.admin__action-multiselect-crumb{background-color:#f5f5f5;border:1px solid #a79d95;border-radius:1px;display:inline-block;font-size:1.2rem;margin:.3rem -4px .3rem .3rem;padding:.3rem 2.4rem .4rem 1rem;position:relative;transition:border-color .1s linear}.admin__action-multiselect-crumb:hover{border-color:#908379}.admin__action-multiselect-crumb .action-close{bottom:0;font-size:.5em;position:absolute;right:0;top:0;width:2rem}.admin__action-multiselect-crumb .action-close:hover{color:#000}.admin__action-multiselect-crumb .action-close:active,.admin__action-multiselect-crumb .action-close:focus{background-color:transparent}.admin__action-multiselect-crumb .action-close:active{-ms-transform:scale(0.9);transform:scale(0.9)}.admin__action-multiselect-tree .abs-action-menu .action-submenu,.admin__action-multiselect-tree .abs-action-menu .action-submenu .action-submenu,.admin__action-multiselect-tree .action-menu,.admin__action-multiselect-tree .action-menu .action-submenu,.admin__action-multiselect-tree .actions-split .action-menu .action-submenu,.admin__action-multiselect-tree .actions-split .action-menu .action-submenu .action-submenu,.admin__action-multiselect-tree .actions-split .dropdown-menu .action-submenu,.admin__action-multiselect-tree .actions-split .dropdown-menu .action-submenu .action-submenu{min-width:34.7rem}.admin__action-multiselect-tree .abs-action-menu .action-submenu .action-menu-item,.admin__action-multiselect-tree .abs-action-menu .action-submenu .action-submenu .action-menu-item,.admin__action-multiselect-tree .action-menu .action-menu-item,.admin__action-multiselect-tree .action-menu .action-submenu .action-menu-item,.admin__action-multiselect-tree .actions-split .action-menu .action-submenu .action-menu-item,.admin__action-multiselect-tree .actions-split .action-menu .action-submenu .action-submenu .action-menu-item,.admin__action-multiselect-tree .actions-split .dropdown-menu .action-submenu .action-menu-item,.admin__action-multiselect-tree .actions-split .dropdown-menu .action-submenu .action-submenu .action-menu-item{margin-top:.1rem}.admin__action-multiselect-tree .action-menu-item{margin-left:4.2rem;position:relative}.admin__action-multiselect-tree .action-menu-item._expended:before{border-left:1px dashed #a79d95;bottom:0;content:'';left:-1rem;position:absolute;top:1rem;width:1px}.admin__action-multiselect-tree .action-menu-item._expended .admin__action-multiselect-dropdown:before{content:'\e615'}.admin__action-multiselect-tree .action-menu-item._with-checkbox .admin__action-multiselect-label{padding-left:2.6rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner{position:relative}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner .admin__action-multiselect-menu-inner{padding-left:3.2rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner .admin__action-multiselect-menu-inner:before{left:4.3rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item{position:relative}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:last-child:before{height:2.1rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:after,.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:before{content:'';left:0;position:absolute}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:after{border-top:1px dashed #a79d95;height:1px;top:2.1rem;width:5.2rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item:before{border-left:1px dashed #a79d95;height:100%;top:0;width:1px}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._parent:after{width:4.2rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root{margin-left:-1rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root:after{left:3.2rem;width:2.2rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root:before{left:3.2rem;top:1rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root._parent:after{display:none}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root:first-child:before{top:2.1rem}.admin__action-multiselect-tree .admin__action-multiselect-menu-inner-item._root:last-child:before{height:1rem}.admin__action-multiselect-tree .admin__action-multiselect-label{line-height:2.2rem;vertical-align:middle;word-break:break-all}.admin__action-multiselect-tree .admin__action-multiselect-label:before{left:0;position:absolute;top:.4rem}.admin__action-multiselect-dropdown{border-radius:50%;height:2.2rem;left:-2.2rem;position:absolute;top:1rem;width:2.2rem;z-index:1}.admin__action-multiselect-dropdown:before{background:#fff;color:#a79d95;content:'\e616';font-size:2.2rem}.admin__actions-switch{display:inline-block;position:relative;vertical-align:middle}.admin__field-control .admin__actions-switch{line-height:3.2rem}.admin__actions-switch+.admin__field-service{min-width:34rem}._disabled .admin__actions-switch-checkbox+.admin__actions-switch-label,.admin__actions-switch-checkbox.disabled+.admin__actions-switch-label{cursor:not-allowed;opacity:.5;pointer-events:none}.admin__actions-switch-checkbox:checked+.admin__actions-switch-label:before{left:15px}.admin__actions-switch-checkbox:checked+.admin__actions-switch-label:after{background:#79a22e}.admin__actions-switch-checkbox:checked+.admin__actions-switch-label .admin__actions-switch-text:before{content:attr(data-text-on)}.admin__actions-switch-checkbox:focus+.admin__actions-switch-label:after,.admin__actions-switch-checkbox:focus+.admin__actions-switch-label:before{border-color:#007bdb}._error .admin__actions-switch-checkbox+.admin__actions-switch-label:after,._error .admin__actions-switch-checkbox+.admin__actions-switch-label:before{border-color:#e22626}.admin__actions-switch-label{cursor:pointer;display:inline-block;height:22px;line-height:22px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}.admin__actions-switch-label:after,.admin__actions-switch-label:before{left:0;position:absolute;right:auto;top:0}.admin__actions-switch-label:before{background:#fff;border:1px solid #aaa6a0;border-radius:100%;content:'';display:block;height:22px;transition:left .2s ease-in 0s;width:22px;z-index:1}.admin__actions-switch-label:after{background:#e3e3e3;border:1px solid #aaa6a0;border-radius:12px;content:'';display:block;height:22px;transition:background .2s ease-in 0s;vertical-align:middle;width:37px;z-index:0}.admin__actions-switch-text:before{content:attr(data-text-off);padding-left:47px;white-space:nowrap}.abs-action-delete,.abs-action-reset,.action-close,.admin__field-fallback-reset,.extensions-information .list .extension-delete,.notifications-close,.search-global-field._active .search-global-action{background-color:transparent;border:none;border-radius:0;box-shadow:none;margin:0;padding:0}.abs-action-delete:hover,.abs-action-reset:hover,.action-close:hover,.admin__field-fallback-reset:hover,.extensions-information .list .extension-delete:hover,.notifications-close:hover,.search-global-field._active .search-global-action:hover{background-color:transparent;border:none;box-shadow:none}.abs-action-default,.abs-action-pattern,.abs-action-primary,.abs-action-quaternary,.abs-action-secondary,.abs-action-tertiary,.action-default,.action-primary,.action-quaternary,.action-secondary,.action-tertiary,.modal-popup .modal-footer .action-primary,.modal-popup .modal-footer .action-secondary,.page-actions .page-actions-buttons>button,.page-actions .page-actions-buttons>button.action-primary,.page-actions .page-actions-buttons>button.action-secondary,.page-actions .page-actions-buttons>button.primary,.page-actions>button,.page-actions>button.action-primary,.page-actions>button.action-secondary,.page-actions>button.primary,button,button.primary,button.secondary,button.tertiary{border:1px solid;border-radius:0;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.4rem;font-weight:600;line-height:1.36;padding:.6rem 1em;text-align:center;vertical-align:baseline}.abs-action-default.disabled,.abs-action-default[disabled],.abs-action-pattern.disabled,.abs-action-pattern[disabled],.abs-action-primary.disabled,.abs-action-primary[disabled],.abs-action-quaternary.disabled,.abs-action-quaternary[disabled],.abs-action-secondary.disabled,.abs-action-secondary[disabled],.abs-action-tertiary.disabled,.abs-action-tertiary[disabled],.action-default.disabled,.action-default[disabled],.action-primary.disabled,.action-primary[disabled],.action-quaternary.disabled,.action-quaternary[disabled],.action-secondary.disabled,.action-secondary[disabled],.action-tertiary.disabled,.action-tertiary[disabled],.modal-popup .modal-footer .action-primary.disabled,.modal-popup .modal-footer .action-primary[disabled],.modal-popup .modal-footer .action-secondary.disabled,.modal-popup .modal-footer .action-secondary[disabled],.page-actions .page-actions-buttons>button.action-primary.disabled,.page-actions .page-actions-buttons>button.action-primary[disabled],.page-actions .page-actions-buttons>button.action-secondary.disabled,.page-actions .page-actions-buttons>button.action-secondary[disabled],.page-actions .page-actions-buttons>button.disabled,.page-actions .page-actions-buttons>button.primary.disabled,.page-actions .page-actions-buttons>button.primary[disabled],.page-actions .page-actions-buttons>button[disabled],.page-actions>button.action-primary.disabled,.page-actions>button.action-primary[disabled],.page-actions>button.action-secondary.disabled,.page-actions>button.action-secondary[disabled],.page-actions>button.disabled,.page-actions>button.primary.disabled,.page-actions>button.primary[disabled],.page-actions>button[disabled],button.disabled,button.primary.disabled,button.primary[disabled],button.secondary.disabled,button.secondary[disabled],button.tertiary.disabled,button.tertiary[disabled],button[disabled]{cursor:default;opacity:.5;pointer-events:none}.abs-action-l,.modal-popup .modal-footer .action-primary,.modal-popup .modal-footer .action-secondary,.page-actions .page-actions-buttons>button,.page-actions .page-actions-buttons>button.action-primary,.page-actions .page-actions-buttons>button.action-secondary,.page-actions .page-actions-buttons>button.primary,.page-actions button,.page-actions>button.action-primary,.page-actions>button.action-secondary,.page-actions>button.primary{font-size:1.6rem;letter-spacing:.025em;padding-bottom:.6875em;padding-top:.6875em}.abs-action-delete,.extensions-information .list .extension-delete{display:inline-block;font-size:1.6rem;margin-left:1.2rem;padding-top:.7rem;text-decoration:none;vertical-align:middle}.abs-action-delete:after,.extensions-information .list .extension-delete:after{color:#666;content:'\e630'}.abs-action-delete:hover:after,.extensions-information .list .extension-delete:hover:after{color:#35302c}.abs-action-button-as-link,.action-advanced,.data-grid .action-delete{line-height:1.36;padding:0;color:#008bdb;text-decoration:none;background:0 0;border:0;display:inline;font-weight:400;border-radius:0}.abs-action-button-as-link:visited,.action-advanced:visited,.data-grid .action-delete:visited{color:#008bdb;text-decoration:none}.abs-action-button-as-link:hover,.action-advanced:hover,.data-grid .action-delete:hover{text-decoration:underline}.abs-action-button-as-link:active,.action-advanced:active,.data-grid .action-delete:active{color:#ff5501;text-decoration:underline}.abs-action-button-as-link:hover,.action-advanced:hover,.data-grid .action-delete:hover{color:#0fa7ff}.abs-action-button-as-link:active,.abs-action-button-as-link:focus,.abs-action-button-as-link:hover,.action-advanced:active,.action-advanced:focus,.action-advanced:hover,.data-grid .action-delete:active,.data-grid .action-delete:focus,.data-grid .action-delete:hover{background:0 0;border:0}.abs-action-button-as-link.disabled,.abs-action-button-as-link[disabled],.action-advanced.disabled,.action-advanced[disabled],.data-grid .action-delete.disabled,.data-grid .action-delete[disabled],fieldset[disabled] .abs-action-button-as-link,fieldset[disabled] .action-advanced,fieldset[disabled] .data-grid .action-delete{color:#008bdb;opacity:.5;cursor:default;pointer-events:none;text-decoration:underline}.abs-action-button-as-link:active,.abs-action-button-as-link:not(:focus),.action-advanced:active,.action-advanced:not(:focus),.data-grid .action-delete:active,.data-grid .action-delete:not(:focus){box-shadow:none}.abs-action-button-as-link:focus,.action-advanced:focus,.data-grid .action-delete:focus{color:#0fa7ff}.abs-action-default,button{background:#e3e3e3;border-color:#adadad;color:#514943}.abs-action-default:active,.abs-action-default:focus,.abs-action-default:hover,button:active,button:focus,button:hover{background-color:#dbdbdb;color:#514943;text-decoration:none}.abs-action-primary,.page-actions .page-actions-buttons>button.action-primary,.page-actions .page-actions-buttons>button.primary,.page-actions>button.action-primary,.page-actions>button.primary,button.primary{background-color:#eb5202;border-color:#eb5202;color:#fff;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.abs-action-primary:active,.abs-action-primary:focus,.abs-action-primary:hover,.page-actions .page-actions-buttons>button.action-primary:active,.page-actions .page-actions-buttons>button.action-primary:focus,.page-actions .page-actions-buttons>button.action-primary:hover,.page-actions .page-actions-buttons>button.primary:active,.page-actions .page-actions-buttons>button.primary:focus,.page-actions .page-actions-buttons>button.primary:hover,.page-actions>button.action-primary:active,.page-actions>button.action-primary:focus,.page-actions>button.action-primary:hover,.page-actions>button.primary:active,.page-actions>button.primary:focus,.page-actions>button.primary:hover,button.primary:active,button.primary:focus,button.primary:hover{background-color:#ba4000;border-color:#b84002;box-shadow:0 0 0 1px #007bdb;color:#fff;text-decoration:none}.abs-action-primary.disabled,.abs-action-primary[disabled],.page-actions .page-actions-buttons>button.action-primary.disabled,.page-actions .page-actions-buttons>button.action-primary[disabled],.page-actions .page-actions-buttons>button.primary.disabled,.page-actions .page-actions-buttons>button.primary[disabled],.page-actions>button.action-primary.disabled,.page-actions>button.action-primary[disabled],.page-actions>button.primary.disabled,.page-actions>button.primary[disabled],button.primary.disabled,button.primary[disabled]{cursor:default;opacity:.5;pointer-events:none}.abs-action-secondary,.modal-popup .modal-footer .action-primary,.page-actions .page-actions-buttons>button.action-secondary,.page-actions>button.action-secondary,button.secondary{background-color:#514943;border-color:#514943;color:#fff;text-shadow:1px 1px 1px rgba(0,0,0,.3)}.abs-action-secondary:active,.abs-action-secondary:focus,.abs-action-secondary:hover,.modal-popup .modal-footer .action-primary:active,.modal-popup .modal-footer .action-primary:focus,.modal-popup .modal-footer .action-primary:hover,.page-actions .page-actions-buttons>button.action-secondary:active,.page-actions .page-actions-buttons>button.action-secondary:focus,.page-actions .page-actions-buttons>button.action-secondary:hover,.page-actions>button.action-secondary:active,.page-actions>button.action-secondary:focus,.page-actions>button.action-secondary:hover,button.secondary:active,button.secondary:focus,button.secondary:hover{background-color:#35302c;border-color:#35302c;box-shadow:0 0 0 1px #007bdb;color:#fff;text-decoration:none}.abs-action-secondary:active,.modal-popup .modal-footer .action-primary:active,.page-actions .page-actions-buttons>button.action-secondary:active,.page-actions>button.action-secondary:active,button.secondary:active{background-color:#35302c}.abs-action-tertiary,.modal-popup .modal-footer .action-secondary,button.tertiary{background-color:transparent;border-color:transparent;text-shadow:none;color:#008bdb}.abs-action-tertiary:active,.abs-action-tertiary:focus,.abs-action-tertiary:hover,.modal-popup .modal-footer .action-secondary:active,.modal-popup .modal-footer .action-secondary:focus,.modal-popup .modal-footer .action-secondary:hover,button.tertiary:active,button.tertiary:focus,button.tertiary:hover{background-color:transparent;border-color:transparent;box-shadow:none;color:#0fa7ff;text-decoration:underline}.abs-action-quaternary,.page-actions .page-actions-buttons>button,.page-actions>button{background-color:transparent;border-color:transparent;text-shadow:none;color:#333}.abs-action-quaternary:active,.abs-action-quaternary:focus,.abs-action-quaternary:hover,.page-actions .page-actions-buttons>button:active,.page-actions .page-actions-buttons>button:focus,.page-actions .page-actions-buttons>button:hover,.page-actions>button:active,.page-actions>button:focus,.page-actions>button:hover{background-color:transparent;border-color:transparent;box-shadow:none;color:#1a1a1a}.abs-action-menu,.actions-split .abs-action-menu .action-submenu,.actions-split .abs-action-menu .action-submenu .action-submenu,.actions-split .action-menu,.actions-split .action-menu .action-submenu,.actions-split .actions-split .dropdown-menu .action-submenu,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu,.actions-split .dropdown-menu{text-align:left;background-color:#fff;border:1px solid #007bdb;border-radius:1px;box-shadow:1px 1px 5px rgba(0,0,0,.5);color:#333;display:none;font-weight:400;left:0;list-style:none;margin:2px 0 0;min-width:0;padding:0;position:absolute;right:0;top:100%}.abs-action-menu._active,.actions-split .abs-action-menu .action-submenu .action-submenu._active,.actions-split .abs-action-menu .action-submenu._active,.actions-split .action-menu .action-submenu._active,.actions-split .action-menu._active,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu._active,.actions-split .actions-split .dropdown-menu .action-submenu._active,.actions-split .dropdown-menu._active{display:block}.abs-action-menu>li,.actions-split .abs-action-menu .action-submenu .action-submenu>li,.actions-split .abs-action-menu .action-submenu>li,.actions-split .action-menu .action-submenu>li,.actions-split .action-menu>li,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li,.actions-split .actions-split .dropdown-menu .action-submenu>li,.actions-split .dropdown-menu>li{border:none;display:block;padding:0;transition:background-color .1s linear}.abs-action-menu>li>a:hover,.actions-split .abs-action-menu .action-submenu .action-submenu>li>a:hover,.actions-split .abs-action-menu .action-submenu>li>a:hover,.actions-split .action-menu .action-submenu>li>a:hover,.actions-split .action-menu>li>a:hover,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li>a:hover,.actions-split .actions-split .dropdown-menu .action-submenu>li>a:hover,.actions-split .dropdown-menu>li>a:hover{text-decoration:none}.abs-action-menu>li._visible,.abs-action-menu>li:hover,.actions-split .abs-action-menu .action-submenu .action-submenu>li._visible,.actions-split .abs-action-menu .action-submenu .action-submenu>li:hover,.actions-split .abs-action-menu .action-submenu>li._visible,.actions-split .abs-action-menu .action-submenu>li:hover,.actions-split .action-menu .action-submenu>li._visible,.actions-split .action-menu .action-submenu>li:hover,.actions-split .action-menu>li._visible,.actions-split .action-menu>li:hover,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li._visible,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li:hover,.actions-split .actions-split .dropdown-menu .action-submenu>li._visible,.actions-split .actions-split .dropdown-menu .action-submenu>li:hover,.actions-split .dropdown-menu>li._visible,.actions-split .dropdown-menu>li:hover{background-color:#e3e3e3}.abs-action-menu>li:active,.actions-split .abs-action-menu .action-submenu .action-submenu>li:active,.actions-split .abs-action-menu .action-submenu>li:active,.actions-split .action-menu .action-submenu>li:active,.actions-split .action-menu>li:active,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li:active,.actions-split .actions-split .dropdown-menu .action-submenu>li:active,.actions-split .dropdown-menu>li:active{background-color:#cacaca}.abs-action-menu>li._parent,.actions-split .abs-action-menu .action-submenu .action-submenu>li._parent,.actions-split .abs-action-menu .action-submenu>li._parent,.actions-split .action-menu .action-submenu>li._parent,.actions-split .action-menu>li._parent,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li._parent,.actions-split .actions-split .dropdown-menu .action-submenu>li._parent,.actions-split .dropdown-menu>li._parent{-webkit-flex-direction:row;display:flex;-ms-flex-direction:row;flex-direction:row}.abs-action-menu>li._parent>.action-menu-item,.actions-split .abs-action-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.actions-split .abs-action-menu .action-submenu>li._parent>.action-menu-item,.actions-split .action-menu .action-submenu>li._parent>.action-menu-item,.actions-split .action-menu>li._parent>.action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu>li._parent>.action-menu-item,.actions-split .dropdown-menu>li._parent>.action-menu-item{min-width:100%}.abs-action-menu .action-menu-item,.abs-action-menu .item,.actions-split .abs-action-menu .action-submenu .action-menu-item,.actions-split .abs-action-menu .action-submenu .action-submenu .action-menu-item,.actions-split .abs-action-menu .action-submenu .action-submenu .item,.actions-split .abs-action-menu .action-submenu .item,.actions-split .action-menu .action-menu-item,.actions-split .action-menu .action-submenu .action-menu-item,.actions-split .action-menu .action-submenu .item,.actions-split .action-menu .item,.actions-split .actions-split .dropdown-menu .action-submenu .action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu .action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu .item,.actions-split .actions-split .dropdown-menu .action-submenu .item,.actions-split .dropdown-menu .action-menu-item,.actions-split .dropdown-menu .item{cursor:pointer;display:block;padding:.6875em 1em}.abs-action-menu .action-submenu,.actions-split .action-menu .action-submenu,.actions-split .action-menu .action-submenu .action-submenu,.actions-split .dropdown-menu .action-submenu{bottom:auto;left:auto;margin-left:0;margin-top:-1px;position:absolute;right:auto;top:auto}.ie9 .abs-action-menu .action-submenu,.ie9 .actions-split .abs-action-menu .action-submenu .action-submenu,.ie9 .actions-split .abs-action-menu .action-submenu .action-submenu .action-submenu,.ie9 .actions-split .action-menu .action-submenu,.ie9 .actions-split .action-menu .action-submenu .action-submenu,.ie9 .actions-split .actions-split .dropdown-menu .action-submenu .action-submenu,.ie9 .actions-split .actions-split .dropdown-menu .action-submenu .action-submenu .action-submenu,.ie9 .actions-split .dropdown-menu .action-submenu{margin-left:99%;margin-top:-3.5rem}.abs-action-menu a.action-menu-item,.actions-split .abs-action-menu .action-submenu .action-submenu a.action-menu-item,.actions-split .abs-action-menu .action-submenu a.action-menu-item,.actions-split .action-menu .action-submenu a.action-menu-item,.actions-split .action-menu a.action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu a.action-menu-item,.actions-split .actions-split .dropdown-menu .action-submenu a.action-menu-item,.actions-split .dropdown-menu a.action-menu-item{color:#333}.abs-action-menu a.action-menu-item:focus,.actions-split .abs-action-menu .action-submenu .action-submenu a.action-menu-item:focus,.actions-split .abs-action-menu .action-submenu a.action-menu-item:focus,.actions-split .action-menu .action-submenu a.action-menu-item:focus,.actions-split .action-menu a.action-menu-item:focus,.actions-split .actions-split .dropdown-menu .action-submenu .action-submenu a.action-menu-item:focus,.actions-split .actions-split .dropdown-menu .action-submenu a.action-menu-item:focus,.actions-split .dropdown-menu a.action-menu-item:focus{background-color:#e3e3e3;box-shadow:none}.abs-action-wrap-triangle{position:relative}.abs-action-wrap-triangle .action-default{width:100%}.abs-action-wrap-triangle .action-default:after,.abs-action-wrap-triangle .action-default:before{border-style:solid;content:'';height:0;position:absolute;top:0;width:0}.abs-action-wrap-triangle .action-default:active,.abs-action-wrap-triangle .action-default:focus,.abs-action-wrap-triangle .action-default:hover{box-shadow:none}._keyfocus .abs-action-wrap-triangle .action-default:focus{box-shadow:0 0 0 1px #007bdb}.ie10 .abs-action-wrap-triangle .action-default.disabled,.ie10 .abs-action-wrap-triangle .action-default[disabled],.ie9 .abs-action-wrap-triangle .action-default.disabled,.ie9 .abs-action-wrap-triangle .action-default[disabled]{background-color:#fcfcfc;opacity:1;text-shadow:none}.abs-action-wrap-triangle-right{display:inline-block;padding-right:1.6rem;position:relative}.abs-action-wrap-triangle-right .action-default:after,.abs-action-wrap-triangle-right .action-default:before{border-color:transparent transparent transparent #e3e3e3;border-width:1.7rem 0 1.6rem 1.7rem;left:100%;margin-left:-1.7rem}.abs-action-wrap-triangle-right .action-default:before{border-left-color:#949494;right:-1px}.abs-action-wrap-triangle-right .action-default:active:after,.abs-action-wrap-triangle-right .action-default:focus:after,.abs-action-wrap-triangle-right .action-default:hover:after{border-left-color:#dbdbdb}.ie10 .abs-action-wrap-triangle-right .action-default.disabled:after,.ie10 .abs-action-wrap-triangle-right .action-default[disabled]:after,.ie9 .abs-action-wrap-triangle-right .action-default.disabled:after,.ie9 .abs-action-wrap-triangle-right .action-default[disabled]:after{border-color:transparent transparent transparent #fcfcfc}.abs-action-wrap-triangle-right .action-primary:after{border-color:transparent transparent transparent #eb5202}.abs-action-wrap-triangle-right .action-primary:active:after,.abs-action-wrap-triangle-right .action-primary:focus:after,.abs-action-wrap-triangle-right .action-primary:hover:after{border-left-color:#ba4000}.abs-action-wrap-triangle-left{display:inline-block;padding-left:1.6rem}.abs-action-wrap-triangle-left .action-default{text-indent:-.85rem}.abs-action-wrap-triangle-left .action-default:after,.abs-action-wrap-triangle-left .action-default:before{border-color:transparent #e3e3e3 transparent transparent;border-width:1.7rem 1.7rem 1.6rem 0;margin-right:-1.7rem;right:100%}.abs-action-wrap-triangle-left .action-default:before{border-right-color:#949494;left:-1px}.abs-action-wrap-triangle-left .action-default:active:after,.abs-action-wrap-triangle-left .action-default:focus:after,.abs-action-wrap-triangle-left .action-default:hover:after{border-right-color:#dbdbdb}.ie10 .abs-action-wrap-triangle-left .action-default.disabled:after,.ie10 .abs-action-wrap-triangle-left .action-default[disabled]:after,.ie9 .abs-action-wrap-triangle-left .action-default.disabled:after,.ie9 .abs-action-wrap-triangle-left .action-default[disabled]:after{border-color:transparent #fcfcfc transparent transparent}.abs-action-wrap-triangle-left .action-primary:after{border-color:transparent #eb5202 transparent transparent}.abs-action-wrap-triangle-left .action-primary:active:after,.abs-action-wrap-triangle-left .action-primary:focus:after,.abs-action-wrap-triangle-left .action-primary:hover:after{border-right-color:#ba4000}.action-default,button{background:#e3e3e3;border-color:#adadad;color:#514943}.action-default:active,.action-default:focus,.action-default:hover,button:active,button:focus,button:hover{background-color:#dbdbdb;color:#514943;text-decoration:none}.action-primary{background-color:#eb5202;border-color:#eb5202;color:#fff;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.action-primary:active,.action-primary:focus,.action-primary:hover{background-color:#ba4000;border-color:#b84002;box-shadow:0 0 0 1px #007bdb;color:#fff;text-decoration:none}.action-primary.disabled,.action-primary[disabled]{cursor:default;opacity:.5;pointer-events:none}.action-secondary{background-color:#514943;border-color:#514943;color:#fff;text-shadow:1px 1px 1px rgba(0,0,0,.3)}.action-secondary:active,.action-secondary:focus,.action-secondary:hover{background-color:#35302c;border-color:#35302c;box-shadow:0 0 0 1px #007bdb;color:#fff;text-decoration:none}.action-secondary:active{background-color:#35302c}.action-quaternary,.action-tertiary{background-color:transparent;border-color:transparent;text-shadow:none}.action-quaternary:active,.action-quaternary:focus,.action-quaternary:hover,.action-tertiary:active,.action-tertiary:focus,.action-tertiary:hover{background-color:transparent;border-color:transparent;box-shadow:none}.action-tertiary{color:#008bdb}.action-tertiary:active,.action-tertiary:focus,.action-tertiary:hover{color:#0fa7ff;text-decoration:underline}.action-quaternary{color:#333}.action-quaternary:active,.action-quaternary:focus,.action-quaternary:hover{color:#1a1a1a}.action-close>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.action-close:active{-ms-transform:scale(0.9);transform:scale(0.9)}.action-close:before{content:'\e62f';transition:color .1s linear}.action-close:hover{cursor:pointer;text-decoration:none}.abs-action-menu .action-submenu,.abs-action-menu .action-submenu .action-submenu,.action-menu,.action-menu .action-submenu,.actions-split .action-menu .action-submenu,.actions-split .action-menu .action-submenu .action-submenu,.actions-split .dropdown-menu .action-submenu,.actions-split .dropdown-menu .action-submenu .action-submenu{background-color:#fff;border:1px solid #007bdb;border-radius:1px;box-shadow:1px 1px 5px rgba(0,0,0,.5);color:#333;display:none;font-weight:400;left:0;list-style:none;margin:2px 0 0;min-width:0;padding:0;position:absolute;right:0;top:100%}.abs-action-menu .action-submenu .action-submenu._active,.abs-action-menu .action-submenu._active,.action-menu .action-submenu._active,.action-menu._active,.actions-split .action-menu .action-submenu .action-submenu._active,.actions-split .action-menu .action-submenu._active,.actions-split .dropdown-menu .action-submenu .action-submenu._active,.actions-split .dropdown-menu .action-submenu._active{display:block}.abs-action-menu .action-submenu .action-submenu>li,.abs-action-menu .action-submenu>li,.action-menu .action-submenu>li,.action-menu>li,.actions-split .action-menu .action-submenu .action-submenu>li,.actions-split .action-menu .action-submenu>li,.actions-split .dropdown-menu .action-submenu .action-submenu>li,.actions-split .dropdown-menu .action-submenu>li{border:none;display:block;padding:0;transition:background-color .1s linear}.abs-action-menu .action-submenu .action-submenu>li>a:hover,.abs-action-menu .action-submenu>li>a:hover,.action-menu .action-submenu>li>a:hover,.action-menu>li>a:hover,.actions-split .action-menu .action-submenu .action-submenu>li>a:hover,.actions-split .action-menu .action-submenu>li>a:hover,.actions-split .dropdown-menu .action-submenu .action-submenu>li>a:hover,.actions-split .dropdown-menu .action-submenu>li>a:hover{text-decoration:none}.abs-action-menu .action-submenu .action-submenu>li._visible,.abs-action-menu .action-submenu .action-submenu>li:hover,.abs-action-menu .action-submenu>li._visible,.abs-action-menu .action-submenu>li:hover,.action-menu .action-submenu>li._visible,.action-menu .action-submenu>li:hover,.action-menu>li._visible,.action-menu>li:hover,.actions-split .action-menu .action-submenu .action-submenu>li._visible,.actions-split .action-menu .action-submenu .action-submenu>li:hover,.actions-split .action-menu .action-submenu>li._visible,.actions-split .action-menu .action-submenu>li:hover,.actions-split .dropdown-menu .action-submenu .action-submenu>li._visible,.actions-split .dropdown-menu .action-submenu .action-submenu>li:hover,.actions-split .dropdown-menu .action-submenu>li._visible,.actions-split .dropdown-menu .action-submenu>li:hover{background-color:#e3e3e3}.abs-action-menu .action-submenu .action-submenu>li:active,.abs-action-menu .action-submenu>li:active,.action-menu .action-submenu>li:active,.action-menu>li:active,.actions-split .action-menu .action-submenu .action-submenu>li:active,.actions-split .action-menu .action-submenu>li:active,.actions-split .dropdown-menu .action-submenu .action-submenu>li:active,.actions-split .dropdown-menu .action-submenu>li:active{background-color:#cacaca}.abs-action-menu .action-submenu .action-submenu>li._parent,.abs-action-menu .action-submenu>li._parent,.action-menu .action-submenu>li._parent,.action-menu>li._parent,.actions-split .action-menu .action-submenu .action-submenu>li._parent,.actions-split .action-menu .action-submenu>li._parent,.actions-split .dropdown-menu .action-submenu .action-submenu>li._parent,.actions-split .dropdown-menu .action-submenu>li._parent{-webkit-flex-direction:row;display:flex;-ms-flex-direction:row;flex-direction:row}.abs-action-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.abs-action-menu .action-submenu>li._parent>.action-menu-item,.action-menu .action-submenu>li._parent>.action-menu-item,.action-menu>li._parent>.action-menu-item,.actions-split .action-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.actions-split .action-menu .action-submenu>li._parent>.action-menu-item,.actions-split .dropdown-menu .action-submenu .action-submenu>li._parent>.action-menu-item,.actions-split .dropdown-menu .action-submenu>li._parent>.action-menu-item{min-width:100%}.abs-action-menu .action-submenu .action-menu-item,.abs-action-menu .action-submenu .action-submenu .action-menu-item,.abs-action-menu .action-submenu .action-submenu .item,.abs-action-menu .action-submenu .item,.action-menu .action-menu-item,.action-menu .action-submenu .action-menu-item,.action-menu .action-submenu .item,.action-menu .item,.actions-split .action-menu .action-submenu .action-menu-item,.actions-split .action-menu .action-submenu .action-submenu .action-menu-item,.actions-split .action-menu .action-submenu .action-submenu .item,.actions-split .action-menu .action-submenu .item,.actions-split .dropdown-menu .action-submenu .action-menu-item,.actions-split .dropdown-menu .action-submenu .action-submenu .action-menu-item,.actions-split .dropdown-menu .action-submenu .action-submenu .item,.actions-split .dropdown-menu .action-submenu .item{cursor:pointer;display:block;padding:.6875em 1em}.abs-action-menu .action-submenu .action-submenu,.action-menu .action-submenu,.actions-split .action-menu .action-submenu .action-submenu,.actions-split .dropdown-menu .action-submenu .action-submenu{bottom:auto;left:auto;margin-left:0;margin-top:-1px;position:absolute;right:auto;top:auto}.ie9 .abs-action-menu .action-submenu .action-submenu,.ie9 .abs-action-menu .action-submenu .action-submenu .action-submenu,.ie9 .action-menu .action-submenu,.ie9 .action-menu .action-submenu .action-submenu,.ie9 .actions-split .action-menu .action-submenu .action-submenu,.ie9 .actions-split .action-menu .action-submenu .action-submenu .action-submenu,.ie9 .actions-split .dropdown-menu .action-submenu .action-submenu,.ie9 .actions-split .dropdown-menu .action-submenu .action-submenu .action-submenu{margin-left:99%;margin-top:-3.5rem}.abs-action-menu .action-submenu .action-submenu a.action-menu-item,.abs-action-menu .action-submenu a.action-menu-item,.action-menu .action-submenu a.action-menu-item,.action-menu a.action-menu-item,.actions-split .action-menu .action-submenu .action-submenu a.action-menu-item,.actions-split .action-menu .action-submenu a.action-menu-item,.actions-split .dropdown-menu .action-submenu .action-submenu a.action-menu-item,.actions-split .dropdown-menu .action-submenu a.action-menu-item{color:#333}.abs-action-menu .action-submenu .action-submenu a.action-menu-item:focus,.abs-action-menu .action-submenu a.action-menu-item:focus,.action-menu .action-submenu a.action-menu-item:focus,.action-menu a.action-menu-item:focus,.actions-split .action-menu .action-submenu .action-submenu a.action-menu-item:focus,.actions-split .action-menu .action-submenu a.action-menu-item:focus,.actions-split .dropdown-menu .action-submenu .action-submenu a.action-menu-item:focus,.actions-split .dropdown-menu .action-submenu a.action-menu-item:focus{background-color:#e3e3e3;box-shadow:none}.messages .message:last-child{margin:0 0 2rem}.message{background:#fffbbb;border:none;border-radius:0;color:#333;font-size:1.4rem;margin:0 0 1px;padding:1.8rem 4rem 1.8rem 5.5rem;position:relative;text-shadow:none}.message:before{background:0 0;border:0;color:#007bdb;content:'\e61a';font-family:Icons;font-size:1.9rem;font-style:normal;font-weight:400;height:auto;left:1.9rem;line-height:inherit;margin-top:-1.3rem;position:absolute;speak:none;text-shadow:none;top:50%;width:auto}.message-notice:before{color:#007bdb;content:'\e61a'}.message-warning:before{color:#eb5202;content:'\e623'}.message-error{background:#fcc}.message-error:before{color:#e22626;content:'\e632';font-size:1.5rem;left:2.2rem;margin-top:-1rem}.message-success:before{color:#79a22e;content:'\e62d'}.message-spinner:before{display:none}.message-spinner .spinner{font-size:2.5rem;left:1.5rem;position:absolute;top:1.5rem}.message-in-rating-edit{margin-left:1.8rem;margin-right:1.8rem}.modal-popup .action-close,.modal-slide .action-close{color:#736963;position:absolute;right:0;top:0;z-index:1}.modal-popup .action-close:active,.modal-slide .action-close:active{-ms-transform:none;transform:none}.modal-popup .action-close:active:before,.modal-slide .action-close:active:before{font-size:1.8rem}.modal-popup .action-close:hover:before,.modal-slide .action-close:hover:before{color:#58504b}.modal-popup .action-close:before,.modal-slide .action-close:before{font-size:2rem}.modal-popup .action-close:focus,.modal-slide .action-close:focus{background-color:transparent}.modal-popup.prompt .prompt-message{padding:2rem 0}.modal-popup.prompt .prompt-message input{width:100%}.modal-popup.confirm .modal-inner-wrap .message,.modal-popup.prompt .modal-inner-wrap .message{background:#fff}.modal-popup.modal-system-messages .modal-inner-wrap{background:#fffbbb}.modal-popup._image-box .modal-inner-wrap{margin:5rem auto;max-width:78rem;position:static}.modal-popup._image-box .thumbnail-preview{padding-bottom:3rem;text-align:center}.modal-popup._image-box .thumbnail-preview .thumbnail-preview-image-block{border:1px solid #ccc;margin:0 auto 2rem;max-width:58rem;padding:2rem}.modal-popup._image-box .thumbnail-preview .thumbnail-preview-image{max-height:54rem}.modal-popup .modal-title{font-size:2.4rem;margin-right:6.4rem}.modal-popup .modal-footer{padding-top:2.6rem;text-align:right}.modal-popup .action-close{padding:3rem}.modal-popup .action-close:active,.modal-popup .action-close:focus{background:0 0;padding-right:3.1rem;padding-top:3.1rem}.modal-slide .modal-content-new-attribute{-webkit-overflow-scrolling:touch;overflow:auto;padding-bottom:0}.modal-slide .modal-content-new-attribute iframe{margin-bottom:-2.5rem}.modal-slide .modal-title{font-size:2.1rem;margin-right:5.7rem}.modal-slide .action-close{padding:2.1rem 2.6rem}.modal-slide .action-close:active{padding-right:2.7rem;padding-top:2.2rem}.modal-slide .page-main-actions{margin-bottom:.6rem;margin-top:2.1rem}.modal-slide .magento-message{padding:0 3rem 3rem;position:relative}.modal-slide .magento-message .insert-title-inner,.modal-slide .main-col .insert-title-inner{border-bottom:1px solid #adadad;margin:0 0 2rem;padding-bottom:.5rem}.modal-slide .magento-message .insert-actions,.modal-slide .main-col .insert-actions{float:right}.modal-slide .magento-message .title,.modal-slide .main-col .title{font-size:1.6rem;padding-top:.5rem}.modal-slide .main-col,.modal-slide .side-col{float:left;padding-bottom:0}.modal-slide .main-col:after,.modal-slide .side-col:after{display:none}.modal-slide .side-col{width:20%}.modal-slide .main-col{padding-right:0;width:80%}.modal-slide .content-footer .form-buttons{float:right}.modal-title{font-weight:400;margin-bottom:0;min-height:1em}.modal-title span{font-size:1.4rem;font-style:italic;margin-left:1rem}.spinner{display:inline-block;font-size:4rem;height:1em;margin-right:1.5rem;position:relative;width:1em}.spinner>span:nth-child(1){animation-delay:.27s;-ms-transform:rotate(-315deg);transform:rotate(-315deg)}.spinner>span:nth-child(2){animation-delay:.36s;-ms-transform:rotate(-270deg);transform:rotate(-270deg)}.spinner>span:nth-child(3){animation-delay:.45s;-ms-transform:rotate(-225deg);transform:rotate(-225deg)}.spinner>span:nth-child(4){animation-delay:.54s;-ms-transform:rotate(-180deg);transform:rotate(-180deg)}.spinner>span:nth-child(5){animation-delay:.63s;-ms-transform:rotate(-135deg);transform:rotate(-135deg)}.spinner>span:nth-child(6){animation-delay:.72s;-ms-transform:rotate(-90deg);transform:rotate(-90deg)}.spinner>span:nth-child(7){animation-delay:.81s;-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.spinner>span:nth-child(8){animation-delay:.9;-ms-transform:rotate(0deg);transform:rotate(0deg)}@keyframes fade{0%{background-color:#514943}100%{background-color:#fff}}.spinner>span{-ms-transform:scale(0.4);transform:scale(0.4);animation-name:fade;animation-duration:.72s;animation-iteration-count:infinite;animation-direction:linear;background-color:#fff;border-radius:6px;clip:rect(0 .28571429em .1em 0);height:.1em;margin-top:.5em;position:absolute;width:1em}.ie9 .spinner{background:url(../images/ajax-loader.gif) center no-repeat}.ie9 .spinner>span{display:none}.popup-loading{background:rgba(255,255,255,.8);border-color:#ef672f;color:#ef672f;font-size:14px;font-weight:700;left:50%;margin-left:-100px;padding:100px 0 10px;position:fixed;text-align:center;top:40%;width:200px;z-index:1003}.popup-loading:after{background-image:url(../images/loader-1.gif);content:'';height:64px;left:50%;margin:-32px 0 0 -32px;position:absolute;top:40%;width:64px;z-index:2}.loading-mask,.loading-old{background:rgba(255,255,255,.4);bottom:0;left:0;position:fixed;right:0;top:0;z-index:2003}.loading-mask img,.loading-old img{display:none}.loading-mask p,.loading-old p{margin-top:118px}.loading-mask .loader,.loading-old .loader{background:url(../images/loader-1.gif) 50% 30% no-repeat #f7f3eb;border-radius:5px;bottom:0;color:#575757;font-size:14px;font-weight:700;height:160px;left:0;margin:auto;opacity:.95;position:absolute;right:0;text-align:center;top:0;width:160px}.admin-user{float:right;line-height:1.36;margin-left:.3rem;z-index:490}.admin-user._active .admin__action-dropdown,.admin-user.active .admin__action-dropdown{border-color:#007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5)}.admin-user .admin__action-dropdown{height:3.3rem;padding:.7rem 2.8rem .4rem 4rem}.admin-user .admin__action-dropdown._active:after,.admin-user .admin__action-dropdown.active:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.admin-user .admin__action-dropdown:after{border-color:#777 transparent transparent;border-style:solid;border-width:.5rem .4rem 0;content:'';height:0;margin-top:-.2rem;position:absolute;right:1.3rem;top:50%;transition:all .2s linear;width:0}._active .admin-user .admin__action-dropdown:after,.active .admin-user .admin__action-dropdown:after{-ms-transform:rotate(180deg);transform:rotate(180deg)}.admin-user .admin__action-dropdown:hover:after{border-color:#000 transparent transparent}.admin-user .admin__action-dropdown:before{color:#777;content:'\e600';font-size:2rem;left:1.1rem;margin-top:-1.1rem;position:absolute;top:50%}.admin-user .admin__action-dropdown:hover:before{color:#333}.admin-user .admin__action-dropdown-menu{min-width:20rem;padding-left:1rem;padding-right:1rem}.admin-user .admin__action-dropdown-menu>li>a{padding-left:.5em;padding-right:1.8rem;transition:background-color .1s linear;white-space:nowrap}.admin-user .admin__action-dropdown-menu>li>a:hover{background-color:#e0f6fe;color:#333}.admin-user .admin__action-dropdown-menu>li>a:active{background-color:#c7effd;bottom:-1px;position:relative}.admin-user .admin__action-dropdown-menu .admin-user-name{text-overflow:ellipsis;white-space:nowrap;display:inline-block;max-width:20rem;overflow:hidden;vertical-align:top}.admin-user-account-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;max-width:11.2rem}.search-global{float:right;margin-right:-.3rem;position:relative;z-index:480}.search-global-field{min-width:5rem}.search-global-field._active .search-global-input{background-color:#fff;border-color:#007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5);padding-right:4rem;width:25rem}.search-global-field._active .search-global-action{display:block;height:3.3rem;position:absolute;right:0;text-indent:-100%;top:0;width:5rem;z-index:3}.search-global-field .autocomplete-results{height:3.3rem;position:absolute;right:0;top:0;width:25rem}.search-global-field .search-global-menu{border:1px solid #007bdb;border-top-color:transparent;box-shadow:1px 1px 5px rgba(0,0,0,.5);left:0;margin-top:-2px;padding:0;position:absolute;right:0;top:100%;z-index:2}.search-global-field .search-global-menu:after{background-color:#fff;content:'';height:5px;left:0;position:absolute;right:0;top:-5px}.search-global-field .search-global-menu>li{background-color:#fff;border-top:1px solid #ddd;display:block;font-size:1.2rem;padding:.75rem 1.4rem .55rem}.search-global-field .search-global-menu>li._active{background-color:#e0f6fe}.search-global-field .search-global-menu .title{display:block;font-size:1.4rem}.search-global-field .search-global-menu .type{color:#1a1a1a;display:block}.search-global-label{cursor:pointer;height:3.3rem;padding:.75rem 1.4rem .55rem;position:absolute;right:0;top:0;z-index:2}.search-global-label:active{-ms-transform:scale(0.9);transform:scale(0.9)}.search-global-label:hover:before{color:#000}.search-global-label:before{color:#777;content:'\e60c';font-size:2rem}.search-global-input{background-color:transparent;border:1px solid transparent;font-size:1.4rem;height:3.3rem;padding:.75rem 1.4rem .55rem;position:absolute;right:0;top:0;transition:all .1s linear,width .3s linear;width:5rem;z-index:1}.search-global-action{display:none}.notifications-wrapper{float:right;line-height:1;position:relative}.notifications-wrapper.active{z-index:500}.notifications-wrapper.active .notifications-action{border-color:#007bdb;box-shadow:1px 1px 5px rgba(0,0,0,.5)}.notifications-wrapper.active .notifications-action:after{background-color:#fff;border:none;content:'';display:block;height:6px;left:-6px;margin-top:0;position:absolute;right:0;top:100%;width:auto}.notifications-wrapper .admin__action-dropdown-menu{padding:1rem 0 0;width:32rem}.notifications-action{color:#777;height:3.3rem;padding:.75rem 2rem .65rem}.notifications-action:after{display:none}.notifications-action:before{content:'\e607';font-size:1.9rem;margin-right:0}.notifications-action:active:before{position:relative;top:1px}.notifications-action .notifications-counter{background-color:#e22626;border-radius:1em;color:#fff;display:inline-block;font-size:1.1rem;font-weight:700;left:50%;margin-left:.3em;margin-top:-1.1em;padding:.3em .5em;position:absolute;top:50%}.notifications-entry{line-height:1.36;padding:.6rem 2rem .8rem;position:relative;transition:background-color .1s linear}.notifications-entry:hover{background-color:#e0f6fe}.notifications-entry.notifications-entry-last{margin:0 2rem;padding:.3rem 0 1.3rem;text-align:center}.notifications-entry.notifications-entry-last:hover{background-color:transparent}.notifications-entry+.notifications-entry-last{border-top:1px solid #ddd;padding-bottom:.6rem}.notifications-entry ._cutted{cursor:pointer}.notifications-entry ._cutted .notifications-entry-description-start:after{content:'...'}.notifications-entry-title{color:#ef672f;display:block;font-size:1.1rem;font-weight:700;margin-bottom:.7rem;margin-right:1em}.notifications-entry-description{color:#333;font-size:1.1rem;margin-bottom:.8rem}.notifications-entry-description-end{display:none}.notifications-entry-description-end._show{display:inline}.notifications-entry-time{color:#777;font-size:1.1rem}.notifications-close{line-height:1;padding:1rem;position:absolute;right:0;top:.6rem}.notifications-close:before{color:#ccc;content:'\e620';transition:color .1s linear}.notifications-close:hover:before{color:#b3b3b3}.notifications-close:active{-ms-transform:scale(0.95);transform:scale(0.95)}.page-header-actions{padding-top:1.1rem}.page-header-hgroup{padding-right:1.5rem}.page-title{color:#333;font-size:2.8rem}.page-header{padding:1.5rem 3rem}.menu-wrapper{display:inline-block;position:relative;width:8.8rem;z-index:700}.menu-wrapper:before{background-color:#373330;bottom:0;content:'';left:0;position:fixed;top:0;width:8.8rem;z-index:699}.menu-wrapper._fixed{left:0;position:fixed;top:0}.menu-wrapper._fixed~.page-wrapper{margin-left:8.8rem}.menu-wrapper .logo{display:block;height:8.8rem;padding:2.4rem 0 2.2rem;position:relative;text-align:center;z-index:700}._keyfocus .menu-wrapper .logo:focus{background-color:#4a4542;box-shadow:none}._keyfocus .menu-wrapper .logo:focus+.admin__menu .level-0:first-child>a{background-color:#373330}._keyfocus .menu-wrapper .logo:focus+.admin__menu .level-0:first-child>a:after{display:none}.menu-wrapper .logo:hover .logo-img{-webkit-filter:brightness(1.1);filter:brightness(1.1)}.menu-wrapper .logo:active .logo-img{-ms-transform:scale(0.95);transform:scale(0.95)}.menu-wrapper .logo .logo-img{height:4.2rem;transition:-webkit-filter .2s linear,filter .2s linear,transform .1s linear;width:3.5rem}.abs-menu-separator,.admin__menu .item-partners>a:after,.admin__menu .level-0:first-child>a:after{background-color:#736963;content:'';display:block;height:1px;left:0;margin-left:16%;position:absolute;top:0;width:68%}.admin__menu li{display:block}.admin__menu .level-0:first-child>a{position:relative}.admin__menu .level-0._active>a,.admin__menu .level-0:hover>a{color:#f7f3eb}.admin__menu .level-0._active>a{background-color:#524d49}.admin__menu .level-0:hover>a{background-color:#4a4542}.admin__menu .level-0>a{color:#aaa6a0;display:block;font-size:1rem;letter-spacing:.025em;min-height:6.2rem;padding:1.2rem .5rem .5rem;position:relative;text-align:center;text-decoration:none;text-transform:uppercase;transition:background-color .1s linear;word-wrap:break-word;z-index:700}.admin__menu .level-0>a:focus{box-shadow:none}.admin__menu .level-0>a:before{content:'\e63a';display:block;font-size:2.2rem;height:2.2rem}.admin__menu .level-0>.submenu{background-color:#4a4542;box-shadow:0 0 3px #000;left:100%;min-height:calc(8.8rem + 2rem + 100%);padding:2rem 0 0;position:absolute;top:0;-ms-transform:translateX(-100%);transform:translateX(-100%);transition-duration:.3s;transition-property:transform,visibility;transition-timing-function:ease-in-out;visibility:hidden;z-index:697}.ie10 .admin__menu .level-0>.submenu,.ie11 .admin__menu .level-0>.submenu{height:100%}.admin__menu .level-0._show>.submenu{-ms-transform:translateX(0);transform:translateX(0);visibility:visible;z-index:698}.admin__menu .level-1{margin-left:1.5rem;margin-right:1.5rem}.admin__menu [class*=level-]:not(.level-0) a{display:block;padding:1.25rem 1.5rem}.admin__menu [class*=level-]:not(.level-0) a:hover{background-color:#403934}.admin__menu [class*=level-]:not(.level-0) a:active{background-color:#322c29;padding-bottom:1.15rem;padding-top:1.35rem}.admin__menu .submenu li{min-width:23.8rem}.admin__menu .submenu a{color:#fcfcfc;transition:background-color .1s linear}.admin__menu .submenu a:focus,.admin__menu .submenu a:hover{box-shadow:none;text-decoration:none}._keyfocus .admin__menu .submenu a:focus{background-color:#403934}._keyfocus .admin__menu .submenu a:active{background-color:#322c29}.admin__menu .submenu .parent{margin-bottom:4.5rem}.admin__menu .submenu .parent .submenu-group-title{color:#a79d95;display:block;font-size:1.6rem;font-weight:600;margin-bottom:.7rem;padding:1.25rem 1.5rem;pointer-events:none}.admin__menu .submenu .column{display:table-cell}.admin__menu .submenu-title{color:#fff;display:block;font-size:2.2rem;font-weight:600;margin-bottom:4.2rem;margin-left:3rem;margin-right:5.8rem}.admin__menu .submenu-sub-title{color:#fff;display:block;font-size:1.2rem;margin:-3.8rem 5.8rem 3.8rem 3rem}.admin__menu .action-close{padding:2.4rem 2.8rem;position:absolute;right:0;top:0}.admin__menu .action-close:before{color:#a79d95;font-size:1.7rem}.admin__menu .action-close:hover:before{color:#fff}.admin__menu .item-dashboard>a:before{content:'\e604';font-size:1.8rem;padding-top:.4rem}.admin__menu .item-sales>a:before{content:'\e60b'}.admin__menu .item-catalog>a:before{content:'\e608'}.admin__menu .item-customer>a:before{content:'\e603';font-size:2.6rem;position:relative;top:-.4rem}.admin__menu .item-marketing>a:before{content:'\e609';font-size:2rem;padding-top:.2rem}.admin__menu .item-content>a:before{content:'\e602';font-size:2.4rem;position:relative;top:-.2rem}.admin__menu .item-report>a:before{content:'\e60a'}.admin__menu .item-stores>a:before{content:'\e60d';font-size:1.9rem;padding-top:.3rem}.admin__menu .item-system>a:before{content:'\e610'}.admin__menu .item-partners._active>a:after,.admin__menu .item-system._current+.item-partners>a:after{display:none}.admin__menu .item-partners>a{padding-bottom:1rem}.admin__menu .item-partners>a:before{content:'\e612'}.admin__menu .level-0>.submenu>ul>.level-1:only-of-type>.submenu-group-title,.admin__menu .submenu .column:only-of-type .submenu-group-title{display:none}.admin__menu-overlay{bottom:0;left:0;position:fixed;right:0;top:0;z-index:697}.store-switcher{color:#333;float:left;font-size:1.3rem;margin-top:.7rem}.store-switcher .admin__action-dropdown{background-color:#f8f8f8;margin-left:.5em}.store-switcher .dropdown{display:inline-block;position:relative}.store-switcher .dropdown:after,.store-switcher .dropdown:before{content:'';display:table}.store-switcher .dropdown:after{clear:both}.store-switcher .dropdown .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.store-switcher .dropdown .action.toggle:after{-webkit-font-smoothing:antialiased;font-size:22px;line-height:2;color:#333;content:'\e607';font-family:icons-blank-theme;margin:0;vertical-align:top;display:inline-block;font-weight:400;overflow:hidden;speak:none;text-align:center}.store-switcher .dropdown .action.toggle:active:after,.store-switcher .dropdown .action.toggle:hover:after{color:#333}.store-switcher .dropdown .action.toggle.active{display:inline-block;text-decoration:none}.store-switcher .dropdown .action.toggle.active:after{-webkit-font-smoothing:antialiased;font-size:22px;line-height:2;color:#333;content:'\e618';font-family:icons-blank-theme;margin:0;vertical-align:top;display:inline-block;font-weight:400;overflow:hidden;speak:none;text-align:center}.store-switcher .dropdown .action.toggle.active:active:after,.store-switcher .dropdown .action.toggle.active:hover:after{color:#333}.store-switcher .dropdown .dropdown-menu{margin:4px 0 0;padding:0;list-style:none;background:#fff;border:1px solid #aaa6a0;min-width:19.5rem;z-index:100;box-sizing:border-box;display:none;position:absolute;top:100%;box-shadow:1px 1px 5px rgba(0,0,0,.5)}.store-switcher .dropdown .dropdown-menu li{margin:0;padding:0}.store-switcher .dropdown .dropdown-menu li:hover{background:0 0;cursor:pointer}.store-switcher .dropdown.active{overflow:visible}.store-switcher .dropdown.active .dropdown-menu{display:block}.store-switcher .dropdown-menu{left:0;margin-top:.5em;max-height:250px;overflow-y:auto;padding-top:.25em}.store-switcher .dropdown-menu li{border:0;cursor:default}.store-switcher .dropdown-menu li:hover{cursor:default}.store-switcher .dropdown-menu li a,.store-switcher .dropdown-menu li span{color:#333;display:block;padding:.5rem 1.3rem}.store-switcher .dropdown-menu li a{text-decoration:none}.store-switcher .dropdown-menu li a:hover{background:#e9e9e9}.store-switcher .dropdown-menu li span{color:#adadad;cursor:default}.store-switcher .dropdown-menu li.current span{background:#eee;color:#333}.store-switcher .dropdown-menu .store-switcher-store a,.store-switcher .dropdown-menu .store-switcher-store span{padding-left:2.6rem}.store-switcher .dropdown-menu .store-switcher-store-view a,.store-switcher .dropdown-menu .store-switcher-store-view span{padding-left:3.9rem}.store-switcher .dropdown-menu .dropdown-toolbar{border-top:1px solid #ebebeb;margin-top:1rem}.store-switcher .dropdown-menu .dropdown-toolbar a:before{content:'\e610';margin-right:.25em;position:relative;top:1px}.store-switcher-label{font-weight:700}.store-switcher-alt{display:inline-block;position:relative}.store-switcher-alt.active .dropdown-menu{display:block}.store-switcher-alt .dropdown-menu{margin-top:2px;white-space:nowrap}.store-switcher-alt .dropdown-menu ul{list-style:none;margin:0;padding:0}.store-switcher-alt strong{color:#a79d95;display:block;font-size:14px;font-weight:500;line-height:1.333;padding:5px 10px}.store-switcher-alt .store-selected{color:#676056;cursor:pointer;font-size:12px;font-weight:400;line-height:1.333}.store-switcher-alt .store-selected:after{-webkit-font-smoothing:antialiased;color:#afadac;content:'\e02c';font-style:normal;font-weight:400;margin:0 0 0 3px;speak:none;vertical-align:text-top}.store-switcher-alt .store-switcher-store,.store-switcher-alt .store-switcher-website{padding:0}.store-switcher-alt .store-switcher-store:hover,.store-switcher-alt .store-switcher-website:hover{background:0 0}.store-switcher-alt .manage-stores,.store-switcher-alt .store-switcher-all,.store-switcher-alt .store-switcher-store-view{padding:0}.store-switcher-alt .manage-stores>a,.store-switcher-alt .store-switcher-all>a{color:#676056;display:block;font-size:12px;padding:8px 15px;text-decoration:none}.store-switcher-website{margin:5px 0 0}.store-switcher-website>strong{padding-left:13px}.store-switcher-store{margin:1px 0 0}.store-switcher-store>strong{padding-left:20px}.store-switcher-store>ul{margin-top:1px}.store-switcher-store-view:first-child{border-top:1px solid #e5e5e5}.store-switcher-store-view>a{color:#333;display:block;font-size:13px;padding:5px 15px 5px 24px;text-decoration:none}.store-view:not(.store-switcher){float:left}.store-view .store-switcher-label{display:inline-block;margin-top:1rem}.tooltip{margin-left:.5em}.tooltip .help a,.tooltip .help span{cursor:pointer;display:inline-block;height:22px;position:relative;vertical-align:middle;width:22px;z-index:2}.tooltip .help a:before,.tooltip .help span:before{color:#333;content:'\e633';font-size:1.7rem}.tooltip .help a:hover{text-decoration:none}.tooltip .tooltip-content{background:#000;border-radius:3px;color:#fff;display:none;margin-left:-19px;margin-top:10px;max-width:200px;padding:4px 8px;position:absolute;text-shadow:none;z-index:20}.tooltip .tooltip-content:before{border-bottom:5px solid #000;border-left:5px solid transparent;border-right:5px solid transparent;content:'';height:0;left:20px;opacity:.8;position:absolute;top:-5px;width:0}.tooltip .tooltip-content.loading{position:absolute}.tooltip .tooltip-content.loading:before{border-bottom-color:rgba(0,0,0,.3)}.tooltip:hover>.tooltip-content{display:block}.page-actions._fixed,.page-main-actions:not(._hidden){background:#f8f8f8;border-bottom:1px solid #e3e3e3;border-top:1px solid #e3e3e3;padding:1.5rem}.page-main-actions{margin:0 0 3rem}.page-main-actions._hidden .store-switcher{display:none}.page-main-actions._hidden .page-actions-placeholder{min-height:50px}.page-actions{float:right}.page-main-actions .page-actions._fixed{left:8.8rem;position:fixed;right:0;top:0;z-index:501}.page-main-actions .page-actions._fixed .page-actions-inner:before{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;content:attr(data-title);float:left;font-size:2.8rem;margin-top:.3rem;max-width:50%}.page-actions .page-actions-buttons>button,.page-actions>button{float:right;margin-left:1.3rem}.page-actions .page-actions-buttons>button.action-back,.page-actions .page-actions-buttons>button.back,.page-actions>button.action-back,.page-actions>button.back{float:left;-ms-flex-order:-1;order:-1}.page-actions .page-actions-buttons>button.action-back:before,.page-actions .page-actions-buttons>button.back:before,.page-actions>button.action-back:before,.page-actions>button.back:before{content:'\e626';margin-right:.5em;position:relative;top:1px}.page-actions .page-actions-buttons>button.action-primary,.page-actions .page-actions-buttons>button.primary,.page-actions>button.action-primary,.page-actions>button.primary{-ms-flex-order:2;order:2}.page-actions .page-actions-buttons>button.save:not(.primary),.page-actions>button.save:not(.primary){-ms-flex-order:1;order:1}.page-actions .page-actions-buttons>button.delete,.page-actions>button.delete{-ms-flex-order:-1;order:-1}.page-actions .actions-split{float:right;margin-left:1.3rem;-ms-flex-order:2;order:2}.page-actions .actions-split .dropdown-menu .item{display:block}.page-actions-buttons{float:right;-ms-flex-pack:end;justify-content:flex-end;display:-ms-flexbox;display:flex}.customer-index-edit .page-actions-buttons{background-color:transparent}.admin__page-nav{background:#f1f1f1;border:1px solid #e3e3e3}.admin__page-nav._collapsed:first-child{border-bottom:none}.admin__page-nav._collapsed._show{border-bottom:1px solid #e3e3e3}.admin__page-nav._collapsed._show ._collapsible{background:#f1f1f1}.admin__page-nav._collapsed._show ._collapsible:after{content:'\e62b'}.admin__page-nav._collapsed._show ._collapsible+.admin__page-nav-items{display:block}.admin__page-nav._collapsed._hide .admin__page-nav-title-messages,.admin__page-nav._collapsed._hide .admin__page-nav-title-messages ._active{display:inline-block}.admin__page-nav+._collapsed{border-bottom:none;border-top:none}.admin__page-nav-title{border-bottom:1px solid #e3e3e3;color:#303030;display:block;font-size:1.4rem;line-height:1.2;margin:0 0 -1px;padding:1.8rem 1.5rem;position:relative;text-transform:uppercase}.admin__page-nav-title._collapsible{background:#fff;cursor:pointer;margin:0;padding-right:3.5rem;transition:border-color .1s ease-out,background-color .1s ease-out}.admin__page-nav-title._collapsible+.admin__page-nav-items{display:none;margin-top:-1px}.admin__page-nav-title._collapsible:after{content:'\e628';font-size:1.3rem;font-weight:700;position:absolute;right:1.8rem;top:2rem}.admin__page-nav-title._collapsible:hover{background:#f1f1f1}.admin__page-nav-title._collapsible:last-child{margin:0 0 -1px}.admin__page-nav-title strong{font-weight:700}.admin__page-nav-title .admin__page-nav-title-messages{display:none}.admin__page-nav-items{list-style-type:none;margin:0;padding:1rem 0 1.3rem}.admin__page-nav-item{border-left:3px solid transparent;margin-left:.7rem;padding:0;position:relative;transition:border-color .1s ease-out,background-color .1s ease-out}.admin__page-nav-item:hover{border-color:#e4e4e4}.admin__page-nav-item:hover .admin__page-nav-link{background:#e4e4e4;color:#303030;text-decoration:none}.admin__page-nav-item._active,.admin__page-nav-item.ui-state-active{border-color:#eb5202}.admin__page-nav-item._active .admin__page-nav-link,.admin__page-nav-item.ui-state-active .admin__page-nav-link{background:#fff;border-color:#e3e3e3;border-right:1px solid #fff;color:#303030;margin-right:-1px;font-weight:600}.admin__page-nav-item._loading:before,.admin__page-nav-item.ui-tabs-loading:before{display:none}.admin__page-nav-item._loading .admin__page-nav-item-message-loader,.admin__page-nav-item.ui-tabs-loading .admin__page-nav-item-message-loader{display:inline-block}.admin__page-nav-link{border:1px solid transparent;border-width:1px 0;color:#303030;display:block;font-weight:500;line-height:1.2;margin:0 0 -1px;padding:2rem 4rem 2rem 1rem;transition:border-color .1s ease-out,background-color .1s ease-out;word-wrap:break-word}.admin__page-nav-item-messages{display:inline-block}.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip{background:#f1f1f1;border:1px solid #f1f1f1;border-radius:1px;bottom:3.7rem;box-shadow:0 3px 9px 0 rgba(0,0,0,.3);display:none;font-size:1.4rem;font-weight:400;left:-1rem;line-height:1.36;padding:1.5rem;position:absolute;text-transform:none;width:27rem;word-break:normal;z-index:2}.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip:after,.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip:before{border:15px solid transparent;height:0;width:0;border-top-color:#f1f1f1;content:'';display:block;left:2rem;position:absolute;top:100%;z-index:3}.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip:after{border-top-color:#f1f1f1;margin-top:-1px;z-index:4}.admin__page-nav-item-messages .admin__page-nav-item-message-tooltip:before{border-top-color:#bfbfbf;margin-top:1px}.admin__page-nav-item-message-loader{display:none;margin-top:-1rem;position:absolute;right:0;top:50%}.admin__page-nav-item-message-loader .spinner{font-size:2rem;margin-right:1.5rem}._loading>.admin__page-nav-item-messages .admin__page-nav-item-message-loader{display:inline-block}.admin__page-nav-item-message{position:relative}.admin__page-nav-item-message:hover{z-index:500}.admin__page-nav-item-message:hover .admin__page-nav-item-message-tooltip{display:block}.admin__page-nav-item-message._changed,.admin__page-nav-item-message._error{display:none}.admin__page-nav-item-message .admin__page-nav-item-message-icon{display:inline-block;font-size:1.4rem;padding-left:.8em;vertical-align:baseline}.admin__page-nav-item-message .admin__page-nav-item-message-icon:after{color:#666;content:'\e631'}._changed:not(._error)>.admin__page-nav-item-messages ._changed{display:inline-block}._error .admin__page-nav-item-message-icon:after{color:#eb5202;content:'\e623'}._error>.admin__page-nav-item-messages ._error{display:inline-block}._error>.admin__page-nav-item-messages ._error .spinner{font-size:2rem;margin-right:1.5rem}._error .admin__page-nav-item-message-tooltip{background:#f1f1f1;border:1px solid #f1f1f1;border-radius:1px;bottom:3.7rem;box-shadow:0 3px 9px 0 rgba(0,0,0,.3);display:none;font-weight:400;left:-1rem;line-height:1.36;padding:2rem;position:absolute;text-transform:none;width:27rem;word-break:normal;z-index:2}._error .admin__page-nav-item-message-tooltip:after,._error .admin__page-nav-item-message-tooltip:before{border:15px solid transparent;height:0;width:0;border-top-color:#f1f1f1;content:'';display:block;left:2rem;position:absolute;top:100%;z-index:3}._error .admin__page-nav-item-message-tooltip:after{border-top-color:#f1f1f1;margin-top:-1px;z-index:4}._error .admin__page-nav-item-message-tooltip:before{border-top-color:#bfbfbf}.admin__data-grid-wrap-static .data-grid{box-sizing:border-box}.admin__data-grid-wrap-static .data-grid thead{color:#333}.admin__data-grid-wrap-static .data-grid tr:nth-child(even) td{background-color:#f5f5f5}.admin__data-grid-wrap-static .data-grid tr:nth-child(even) td._dragging{background-color:rgba(245,245,245,.95)}.admin__data-grid-wrap-static .data-grid ul{margin-left:1rem;padding-left:1rem}.admin__data-grid-wrap-static .admin__data-grid-loading-mask{background:rgba(255,255,255,.5);bottom:0;left:0;position:absolute;right:0;top:0;z-index:399}.admin__data-grid-wrap-static .admin__data-grid-loading-mask .grid-loader{background:url(../images/loader-2.gif) 50% 50% no-repeat;bottom:0;height:149px;left:0;margin:auto;position:absolute;right:0;top:0;width:218px}.data-grid-filters-actions-wrap{float:right}.data-grid-search-control-wrap{float:left;max-width:45.5rem;position:relative;width:35%}.data-grid-search-control-wrap :-ms-input-placeholder{font-style:italic}.data-grid-search-control-wrap ::-webkit-input-placeholder{font-style:italic}.data-grid-search-control-wrap ::-moz-placeholder{font-style:italic}.data-grid-search-control-wrap .action-submit{background-color:transparent;border:none;border-radius:0;box-shadow:none;margin:0;padding:.6rem 2rem .2rem;position:absolute;right:0;top:1px}.data-grid-search-control-wrap .action-submit:hover{background-color:transparent;border:none;box-shadow:none}.data-grid-search-control-wrap .action-submit:active{-ms-transform:scale(0.9);transform:scale(0.9)}.data-grid-search-control-wrap .action-submit:hover:before{color:#1a1a1a}._keyfocus .data-grid-search-control-wrap .action-submit:focus{box-shadow:0 0 0 1px #008bdb}.data-grid-search-control-wrap .action-submit:before{content:'\e60c';font-size:2rem;transition:color .1s linear}.data-grid-search-control-wrap .action-submit>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.data-grid-search-control-wrap .abs-action-menu .action-submenu,.data-grid-search-control-wrap .abs-action-menu .action-submenu .action-submenu,.data-grid-search-control-wrap .action-menu,.data-grid-search-control-wrap .action-menu .action-submenu,.data-grid-search-control-wrap .actions-split .action-menu .action-submenu,.data-grid-search-control-wrap .actions-split .action-menu .action-submenu .action-submenu,.data-grid-search-control-wrap .actions-split .dropdown-menu .action-submenu,.data-grid-search-control-wrap .actions-split .dropdown-menu .action-submenu .action-submenu{max-height:19.25rem;overflow-y:auto;z-index:398}.data-grid-search-control-wrap .action-menu-item._selected{background-color:#e0f6fe}.data-grid-search-control-wrap .data-grid-search-label{display:none}.data-grid-search-control{padding-right:6rem;width:100%}.data-grid-filters-action-wrap{float:left;padding-left:2rem}.data-grid-filters-action-wrap .action-default{font-size:1.3rem;margin-bottom:1rem;padding-left:1.7rem;padding-right:2.1rem;padding-top:.7rem}.data-grid-filters-action-wrap .action-default._active{background-color:#fff;border-bottom-color:#fff;border-right-color:#ccc;font-weight:600;margin:-.1rem 0 0;padding-bottom:1.6rem;padding-top:.8rem;position:relative;z-index:281}.data-grid-filters-action-wrap .action-default._active:after{background-color:#eb5202;bottom:100%;content:'';height:3px;left:-1px;position:absolute;right:-1px}.data-grid-filters-action-wrap .action-default:before{color:#333;content:'\e605';font-size:1.8rem;margin-right:.4rem;position:relative;top:-1px;vertical-align:top}.data-grid-filters-action-wrap .filters-active{display:none}.admin__action-grid-select .admin__control-select{margin:-.5rem .5rem 0 0;padding-bottom:.6rem;padding-top:.6rem}.admin__data-grid-filters-wrap{opacity:0;visibility:hidden;clear:both;font-size:1.3rem;transition:opacity .3s ease}.admin__data-grid-filters-wrap._show{opacity:1;visibility:visible;border-bottom:1px solid #ccc;border-top:1px solid #ccc;margin-bottom:.7rem;padding:3.6rem 0 3rem;position:relative;top:-1px;z-index:280}.admin__data-grid-filters-wrap._show .admin__data-grid-filters,.admin__data-grid-filters-wrap._show .admin__data-grid-filters-footer{display:block}.admin__data-grid-filters-wrap .admin__form-field-label,.admin__data-grid-filters-wrap .admin__form-field-legend{display:block;font-weight:700;margin:0 0 .3rem;text-align:left}.admin__data-grid-filters-wrap .admin__form-field{display:inline-block;margin-bottom:2em;margin-left:0;padding-left:2rem;padding-right:2rem;vertical-align:top;width:calc(100% / 4 - 4px)}.admin__data-grid-filters-wrap .admin__form-field .admin__form-field{display:block;float:none;margin-bottom:1.5rem;padding-left:0;padding-right:0;width:auto}.admin__data-grid-filters-wrap .admin__form-field .admin__form-field:last-child{margin-bottom:0}.admin__data-grid-filters-wrap .admin__form-field .admin__form-field .admin__form-field-label{border:1px solid transparent;float:left;font-weight:400;line-height:1.36;margin-bottom:0;padding-bottom:.6rem;padding-right:1em;padding-top:.6rem;width:25%}.admin__data-grid-filters-wrap .admin__form-field .admin__form-field .admin__form-field-control{margin-left:25%}.admin__data-grid-filters-wrap .admin__action-multiselect,.admin__data-grid-filters-wrap .admin__control-select,.admin__data-grid-filters-wrap .admin__control-text,.admin__data-grid-filters-wrap .admin__form-field-label{font-size:1.3rem}.admin__data-grid-filters-wrap .admin__control-select{height:3.2rem;padding-top:.5rem}.admin__data-grid-filters-wrap .admin__action-multiselect:before{height:3.2rem;width:3.2rem}.admin__data-grid-filters-wrap .admin__control-select,.admin__data-grid-filters-wrap .admin__control-text._has-datepicker{width:100%}.admin__data-grid-filters{display:none;margin-left:-2rem;margin-right:-2rem}.admin__filters-legend{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.admin__data-grid-filters-footer{display:none;font-size:1.4rem}.admin__data-grid-filters-footer .admin__footer-main-actions{margin-left:25%;text-align:right}.admin__data-grid-filters-footer .admin__footer-secondary-actions{float:left;width:50%}.admin__data-grid-filters-current{border-bottom:.1rem solid #ccc;border-top:.1rem solid #ccc;display:none;font-size:1.3rem;margin-bottom:.9rem;padding-bottom:.8rem;padding-top:1.1rem;width:100%}.admin__data-grid-filters-current._show{display:table;position:relative;top:-1px;z-index:3}.admin__data-grid-filters-current._show+.admin__data-grid-filters-wrap._show{margin-top:-1rem}.admin__current-filters-actions-wrap,.admin__current-filters-list-wrap,.admin__current-filters-title-wrap{display:table-cell;vertical-align:top}.admin__current-filters-title{margin-right:1em;white-space:nowrap}.admin__current-filters-list-wrap{width:100%}.admin__current-filters-list{margin-bottom:0}.admin__current-filters-list>li{display:inline-block;font-weight:600;margin:0 1rem .5rem;padding-right:2.6rem;position:relative}.admin__current-filters-list .action-remove{background-color:transparent;border:none;border-radius:0;box-shadow:none;margin:0;padding:0;line-height:1;position:absolute;right:0;top:1px}.admin__current-filters-list .action-remove:hover{background-color:transparent;border:none;box-shadow:none}.admin__current-filters-list .action-remove:hover:before{color:#949494}.admin__current-filters-list .action-remove:active{-ms-transform:scale(0.9);transform:scale(0.9)}.admin__current-filters-list .action-remove:before{color:#adadad;content:'\e620';font-size:1.6rem;transition:color .1s linear}.admin__current-filters-list .action-remove>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.admin__current-filters-actions-wrap .action-clear{border:none;padding-bottom:0;padding-top:0;white-space:nowrap}.admin__data-grid-pager-wrap{float:right;text-align:right}.admin__data-grid-pager{display:inline-block;margin-left:3rem}.admin__data-grid-pager .admin__control-text::-webkit-inner-spin-button,.admin__data-grid-pager .admin__control-text::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.admin__data-grid-pager .admin__control-text{-moz-appearance:textfield;text-align:center;width:4.4rem}.action-next,.action-previous{width:4.4rem}.action-next:before,.action-previous:before{font-weight:700}.action-next>span,.action-previous>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.action-previous{margin-right:2.5rem;text-indent:-.25em}.action-previous:before{content:'\e629'}.action-next{margin-left:1.5rem;text-indent:.1em}.action-next:before{content:'\e62a'}.admin__data-grid-action-bookmarks{opacity:.98}.admin__data-grid-action-bookmarks .admin__action-dropdown-text:after{left:0;right:-6px}.admin__data-grid-action-bookmarks._active{z-index:290}.admin__data-grid-action-bookmarks .admin__action-dropdown .admin__action-dropdown-text{display:inline-block;max-width:15rem;min-width:4.9rem;vertical-align:top;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin__data-grid-action-bookmarks .admin__action-dropdown:before{content:'\e60f'}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu{font-size:1.3rem;left:0;padding:1rem 0;right:auto}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu>li{padding:0 5rem 0 0;position:relative;white-space:nowrap}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu>li:not(.action-dropdown-menu-action){transition:background-color .1s linear}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu>li:not(.action-dropdown-menu-action):hover{background-color:#e3e3e3}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item{max-width:23rem;min-width:18rem;white-space:normal;word-break:break-all}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item-edit{display:none;padding-bottom:1rem;padding-left:1rem;padding-top:1rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item-edit .action-dropdown-menu-item-actions{padding-bottom:1rem;padding-top:1rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-action{padding-left:1rem;padding-top:1rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-action+.action-dropdown-menu-item-last{padding-top:.5rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-action>a{color:#008bdb;text-decoration:none;display:inline-block;padding-left:1.1rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-action>a:hover{color:#0fa7ff;text-decoration:underline}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item-last{padding-bottom:0}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu ._edit .action-dropdown-menu-item{display:none}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu ._edit .action-dropdown-menu-item-edit{display:block}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu ._active .action-dropdown-menu-link{font-weight:600}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .admin__control-text{font-size:1.3rem;min-width:15rem;width:calc(100% - 4rem)}.ie9 .admin__data-grid-action-bookmarks .admin__action-dropdown-menu .admin__control-text{width:15rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-item-actions{border-left:1px solid #fff;bottom:0;position:absolute;right:0;top:0;width:5rem}.admin__data-grid-action-bookmarks .admin__action-dropdown-menu .action-dropdown-menu-link{color:#333;display:block;text-decoration:none;padding:1rem 1rem 1rem 2.1rem}.admin__data-grid-action-bookmarks .action-delete,.admin__data-grid-action-bookmarks .action-edit,.admin__data-grid-action-bookmarks .action-submit{background-color:transparent;border:none;border-radius:0;box-shadow:none;margin:0;vertical-align:top}.admin__data-grid-action-bookmarks .action-delete:hover,.admin__data-grid-action-bookmarks .action-edit:hover,.admin__data-grid-action-bookmarks .action-submit:hover{background-color:transparent;border:none;box-shadow:none}.admin__data-grid-action-bookmarks .action-delete:before,.admin__data-grid-action-bookmarks .action-edit:before,.admin__data-grid-action-bookmarks .action-submit:before{font-size:1.7rem}.admin__data-grid-action-bookmarks .action-delete>span,.admin__data-grid-action-bookmarks .action-edit>span,.admin__data-grid-action-bookmarks .action-submit>span{clip:rect(0,0,0,0);overflow:hidden;position:absolute}.admin__data-grid-action-bookmarks .action-delete,.admin__data-grid-action-bookmarks .action-edit{padding:.6rem 1.4rem}.admin__data-grid-action-bookmarks .action-delete:active,.admin__data-grid-action-bookmarks .action-edit:active{-ms-transform:scale(0.9);transform:scale(0.9)}.admin__data-grid-action-bookmarks .action-submit{padding:.6rem 1rem .6rem .8rem}.admin__data-grid-action-bookmarks .action-submit:active{position:relative;right:-1px}.admin__data-grid-action-bookmarks .action-submit:before{content:'\e625'}.admin__data-grid-action-bookmarks .action-delete:before{content:'\e630'}.admin__data-grid-action-bookmarks .action-edit{padding-top:.8rem}.admin__data-grid-action-bookmarks .action-edit:before{content:'\e631'}.admin__data-grid-action-columns._active{opacity:.98;z-index:290}.admin__data-grid-action-columns .admin__action-dropdown:before{content:'\e610';font-size:1.8rem;margin-right:.7rem;vertical-align:top}.admin__data-grid-action-columns-menu{color:#303030;font-size:1.3rem;overflow:hidden;padding:2.2rem 3.5rem 1rem;z-index:1}.admin__data-grid-action-columns-menu._overflow .admin__action-dropdown-menu-header{border-bottom:1px solid #d1d1d1}.admin__data-grid-action-columns-menu._overflow .admin__action-dropdown-menu-content{width:49.2rem}.admin__data-grid-action-columns-menu._overflow .admin__action-dropdown-menu-footer{border-top:1px solid #d1d1d1;padding-top:2.5rem}.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-content{max-height:22.85rem;overflow-y:auto;padding-top:1.5rem;position:relative;width:47.4rem}.admin__data-grid-action-columns-menu .admin__field-option{float:left;height:1.9rem;margin-bottom:1.5rem;padding:0 1rem 0 0;width:15.8rem}.admin__data-grid-action-columns-menu .admin__field-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-header{padding-bottom:1.5rem}.admin__data-grid-action-columns-menu .admin__action-dropdown-menu-footer{padding:1rem 0 2rem}.admin__data-grid-action-columns-menu .admin__action-dropdown-footer-main-actions{margin-left:25%;text-align:right}.admin__data-grid-action-columns-menu .admin__action-dropdown-footer-secondary-actions{float:left;margin-left:-1em}.admin__data-grid-action-export._active{opacity:.98;z-index:290}.admin__data-grid-action-export .admin__action-dropdown:before{content:'\e635';font-size:1.7rem;left:.3rem;margin-right:.7rem;vertical-align:top}.admin__data-grid-action-export-menu{padding-left:2rem;padding-right:2rem;padding-top:1rem}.admin__data-grid-action-export-menu .admin__action-dropdown-footer-main-actions{padding-bottom:2rem;padding-top:2.5rem;white-space:nowrap}.sticky-header{background-color:#f8f8f8;border-bottom:1px solid #e3e3e3;box-shadow:0 5px 5px 0 rgba(0,0,0,.25);left:8.8rem;margin-top:-1px;padding:.5rem 3rem 0;position:fixed;right:0;top:77px;z-index:398}.sticky-header .admin__data-grid-wrap{margin-bottom:0;overflow-x:visible;padding-bottom:0}.sticky-header .admin__data-grid-header-row{position:relative;text-align:right}.sticky-header .admin__data-grid-header-row:last-child{margin:0}.sticky-header .admin__data-grid-actions-wrap,.sticky-header .admin__data-grid-filters-wrap,.sticky-header .admin__data-grid-pager-wrap,.sticky-header .data-grid-filters-actions-wrap,.sticky-header .data-grid-search-control-wrap{display:inline-block;float:none;vertical-align:top}.sticky-header .action-select-wrap{float:left;margin-right:1.5rem;width:16.66666667%}.sticky-header .admin__control-support-text{float:left}.sticky-header .data-grid-search-control-wrap{margin:-.5rem 0 0 1.1rem;width:auto}.sticky-header .data-grid-search-control-wrap .data-grid-search-label{box-sizing:border-box;cursor:pointer;display:block;min-width:3.8rem;padding:1.2rem .6rem 1.7rem;position:relative;text-align:center}.sticky-header .data-grid-search-control-wrap .data-grid-search-label:before{color:#333;content:'\e60c';font-size:2rem;transition:color .1s linear}.sticky-header .data-grid-search-control-wrap .data-grid-search-label:hover:before{color:#000}.sticky-header .data-grid-search-control-wrap .data-grid-search-label span{display:none}.sticky-header .data-grid-filters-actions-wrap{margin:-.5rem 0 0 1.1rem;padding-left:0;position:relative}.sticky-header .data-grid-filters-actions-wrap .action-default{background-color:transparent;border:1px solid transparent;box-sizing:border-box;min-width:3.8rem;padding:1.2rem .6rem 1.7rem;text-align:center;transition:all .15s ease}.sticky-header .data-grid-filters-actions-wrap .action-default span{display:none}.sticky-header .data-grid-filters-actions-wrap .action-default:before{margin:0}.sticky-header .data-grid-filters-actions-wrap .action-default._active{background-color:#fff;border-color:#adadad #adadad #fff;box-shadow:1px 1px 5px rgba(0,0,0,.5);z-index:210}.sticky-header .data-grid-filters-actions-wrap .action-default._active:after{background-color:#fff;content:'';height:6px;left:-2px;position:absolute;right:-6px;top:100%}.sticky-header .data-grid-filters-action-wrap{padding:0}.sticky-header .admin__data-grid-filters-wrap{background-color:#fff;border:1px solid #adadad;box-shadow:0 5px 5px 0 rgba(0,0,0,.25);left:0;padding-left:3.5rem;padding-right:3.5rem;position:absolute;top:100%;width:100%;z-index:209}.sticky-header .admin__data-grid-filters-current+.admin__data-grid-filters-wrap._show{margin-top:-6px}.sticky-header .filters-active{background-color:#e04f00;border-radius:10px;color:#fff;display:block;font-size:1.4rem;font-weight:700;padding:.1rem .7rem;position:absolute;right:-7px;top:0;z-index:211}.sticky-header .filters-active:empty{padding-bottom:0;padding-top:0}.sticky-header .admin__data-grid-actions-wrap{margin:-.5rem 0 0 1.1rem;padding-right:.3rem}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown{background-color:transparent;box-sizing:border-box;min-width:3.8rem;padding-left:.6rem;padding-right:.6rem;text-align:center}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown .admin__action-dropdown-text{display:inline-block;max-width:0;min-width:0;overflow:hidden}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown:before{margin:0}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown-wrap{margin-right:1.1rem}.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown-wrap:after,.sticky-header .admin__data-grid-actions-wrap .admin__action-dropdown:after{display:none}.sticky-header .admin__data-grid-actions-wrap ._active .admin__action-dropdown{background-color:#fff}.sticky-header .admin__data-grid-action-bookmarks .admin__action-dropdown:before{position:relative;top:-3px}.sticky-header .admin__data-grid-filters-current{border-bottom:0;border-top:0;margin-bottom:0;padding-bottom:0;padding-top:0}.sticky-header .admin__data-grid-pager .admin__control-text,.sticky-header .admin__data-grid-pager-wrap .admin__control-support-text,.sticky-header .data-grid-search-control-wrap .action-submit,.sticky-header .data-grid-search-control-wrap .data-grid-search-control{display:none}.sticky-header .action-next{margin:0}.sticky-header .data-grid{margin-bottom:-1px}.data-grid-cap-left,.data-grid-cap-right{background-color:#f8f8f8;bottom:-2px;position:absolute;top:6rem;width:3rem;z-index:201}.data-grid-cap-left{left:0}.admin__data-grid-header{font-size:1.4rem}.admin__data-grid-header-row+.admin__data-grid-header-row{margin-top:1.1rem}.admin__data-grid-header-row:last-child{margin-bottom:0}.admin__data-grid-header-row .action-select-wrap{display:block}.admin__data-grid-header-row .action-select{width:100%}.admin__data-grid-actions-wrap{float:right;margin-left:1.1rem;margin-top:-.5rem;text-align:right}.admin__data-grid-actions-wrap .admin__action-dropdown-wrap{position:relative;text-align:left;vertical-align:middle}.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._active+.admin__action-dropdown-wrap:after,.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._active:after,.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._hide+.admin__action-dropdown-wrap:after,.admin__data-grid-actions-wrap .admin__action-dropdown-wrap:first-child:after{display:none}.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._active .admin__action-dropdown,.admin__data-grid-actions-wrap .admin__action-dropdown-wrap._active .admin__action-dropdown-menu{border-color:#adadad}.admin__data-grid-actions-wrap .admin__action-dropdown-wrap:after{border-left:1px solid #ccc;content:'';height:3.2rem;left:0;position:absolute;top:.5rem;z-index:3}.admin__data-grid-actions-wrap .admin__action-dropdown{padding-bottom:1.7rem;padding-top:1.2rem}.admin__data-grid-actions-wrap .admin__action-dropdown:after{margin-top:-.4rem}.admin__data-grid-outer-wrap{min-height:8rem;position:relative}.admin__data-grid-wrap{margin-bottom:2rem;max-width:100%;overflow-x:auto;padding-bottom:1rem;padding-top:2rem}.admin__data-grid-loading-mask{background:rgba(255,255,255,.5);bottom:0;left:0;position:absolute;right:0;top:0;z-index:399}.admin__data-grid-loading-mask .spinner{font-size:4rem;left:50%;margin-left:-2rem;margin-top:-2rem;position:absolute;top:50%}.ie9 .admin__data-grid-loading-mask .spinner{background:url(../images/loader-2.gif) 50% 50% no-repeat;bottom:0;height:149px;left:0;margin:auto;position:absolute;right:0;top:0;width:218px}.data-grid-cell-content{display:inline-block;overflow:hidden;width:100%}body._in-resize{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body._in-resize *,body._in-resize .data-grid-th,body._in-resize .data-grid-th._draggable,body._in-resize .data-grid-th._sortable{cursor:col-resize!important}._layout-fixed{table-layout:fixed}.data-grid{border:none;font-size:1.3rem;margin-bottom:0;width:100%}.data-grid:not(._dragging-copy) ._odd-row td._dragging{background-color:#d0d0d0}.data-grid:not(._dragging-copy) ._dragging{background-color:#d9d9d9;color:rgba(48,48,48,.95)}.data-grid:not(._dragging-copy) ._dragging a{color:rgba(0,139,219,.95)}.data-grid:not(._dragging-copy) ._dragging a:hover{color:rgba(15,167,255,.95)}.data-grid._dragged{outline:#007bdb solid 1px}.data-grid thead{background-color:transparent}.data-grid tfoot th{padding:1rem}.data-grid tr._odd-row td{background-color:#f5f5f5}.data-grid tr._odd-row td._update-status-active{background:#89e1ff}.data-grid tr._odd-row td._update-status-upcoming{background:#b7ee63}.data-grid tr:hover td._update-status-active,.data-grid tr:hover td._update-status-upcoming{background-color:#e5f7fe}.data-grid tr.data-grid-tr-no-data td{font-size:1.6rem;padding:3rem;text-align:center}.data-grid tr.data-grid-tr-no-data:hover td{background-color:#fff;cursor:default}.data-grid tr:active td{background-color:#e0f6fe}.data-grid tr:hover td{background-color:#e5f7fe}.data-grid tr._dragged td{background:#d0d0d0}.data-grid tr._dragover-top td{box-shadow:inset 0 3px 0 0 #008bdb}.data-grid tr._dragover-bottom td{box-shadow:inset 0 -3px 0 0 #008bdb}.data-grid tr:not(.data-grid-editable-row):last-child td{border-bottom:.1rem solid #d6d6d6}.data-grid tr ._clickable,.data-grid tr._clickable{cursor:pointer}.data-grid tr._disabled{pointer-events:none}.data-grid td,.data-grid th{font-size:1.3rem;line-height:1.36;transition:background-color .1s linear;vertical-align:top}.data-grid td._resizing,.data-grid th._resizing{border-left:1px solid #007bdb;border-right:1px solid #007bdb}.data-grid td._hidden,.data-grid th._hidden{display:none}.data-grid td._fit,.data-grid th._fit{width:1%}.data-grid td{background-color:#fff;border-left:.1rem dashed #d6d6d6;border-right:.1rem dashed #d6d6d6;color:#303030;padding:1rem}.data-grid td:first-child{border-left-style:solid}.data-grid td:last-child{border-right-style:solid}.data-grid td .action-select-wrap{position:static}.data-grid td .action-select{color:#008bdb;text-decoration:none;background-color:transparent;border:none;font-size:1.3rem;padding:0 3rem 0 0;position:relative}.data-grid td .action-select:hover{color:#0fa7ff;text-decoration:underline}.data-grid td .action-select:hover:after{border-color:#0fa7ff transparent transparent}.data-grid td .action-select:after{border-color:#008bdb transparent transparent;margin:.6rem 0 0 .7rem;right:auto;top:auto}.data-grid td .action-select:before{display:none}.data-grid td .abs-action-menu .action-submenu,.data-grid td .abs-action-menu .action-submenu .action-submenu,.data-grid td .action-menu,.data-grid td .action-menu .action-submenu,.data-grid td .actions-split .action-menu .action-submenu,.data-grid td .actions-split .action-menu .action-submenu .action-submenu,.data-grid td .actions-split .dropdown-menu .action-submenu,.data-grid td .actions-split .dropdown-menu .action-submenu .action-submenu{left:auto;min-width:10rem;right:0;text-align:left;top:auto;z-index:1}.data-grid td._update-status-active{background:#bceeff}.data-grid td._update-status-upcoming{background:#ccf391}.data-grid th{background-color:#514943;border:.1rem solid #8a837f;border-left-color:transparent;color:#fff;font-weight:600;padding:0;text-align:left}.data-grid th:first-child{border-left-color:#8a837f}.data-grid th._dragover-left{box-shadow:inset 3px 0 0 0 #fff;z-index:2}.data-grid th._dragover-right{box-shadow:inset -3px 0 0 0 #fff}.data-grid .shadow-div{cursor:col-resize;height:100%;margin-right:-5px;position:absolute;right:0;top:0;width:10px}.data-grid .data-grid-th{background-clip:padding-box;color:#fff;padding:1rem;position:relative;vertical-align:middle}.data-grid .data-grid-th._resize-visible .shadow-div{cursor:auto;display:none}.data-grid .data-grid-th._draggable{cursor:grab}.data-grid .data-grid-th._sortable{cursor:pointer;transition:background-color .1s linear;z-index:1}.data-grid .data-grid-th._sortable:focus,.data-grid .data-grid-th._sortable:hover{background-color:#5f564f}.data-grid .data-grid-th._sortable:active{padding-bottom:.9rem;padding-top:1.1rem}.data-grid .data-grid-th.required>span:after{color:#f38a5e;content:'*';margin-left:.3rem}.data-grid .data-grid-checkbox-cell{overflow:hidden;padding:0;vertical-align:top;width:5.2rem}.data-grid .data-grid-checkbox-cell:hover{cursor:default}.data-grid .data-grid-thumbnail-cell{text-align:center;width:7rem}.data-grid .data-grid-thumbnail-cell img{border:1px solid #d6d6d6;width:5rem}.data-grid .data-grid-multicheck-cell{padding:1rem 1rem .9rem;text-align:center;vertical-align:middle}.data-grid .data-grid-onoff-cell{text-align:center;width:12rem}.data-grid .data-grid-actions-cell{padding-left:2rem;padding-right:2rem;text-align:center;width:1%}.data-grid._hidden{display:none}.data-grid._dragging-copy{box-shadow:1px 1px 5px rgba(0,0,0,.5);left:0;opacity:.95;position:fixed;top:0;z-index:1000}.data-grid._dragging-copy .data-grid-th{border:1px solid #007bdb;border-bottom:none}.data-grid._dragging-copy .data-grid-th,.data-grid._dragging-copy .data-grid-th._sortable{cursor:grabbing}.data-grid._dragging-copy tr:last-child td{border-bottom:1px solid #007bdb}.data-grid._dragging-copy td{border-left:1px solid #007bdb;border-right:1px solid #007bdb}.data-grid._dragging-copy._in-edit .data-grid-editable-row.data-grid-bulk-edit-panel td,.data-grid._dragging-copy._in-edit .data-grid-editable-row.data-grid-bulk-edit-panel td:before,.data-grid._dragging-copy._in-edit .data-grid-editable-row.data-grid-bulk-edit-panel:hover td{background-color:rgba(255,251,230,.95)}.data-grid._dragging-copy._in-edit .data-grid-editable-row td,.data-grid._dragging-copy._in-edit .data-grid-editable-row:hover td{background-color:rgba(255,255,255,.95)}.data-grid._dragging-copy._in-edit .data-grid-editable-row td:after,.data-grid._dragging-copy._in-edit .data-grid-editable-row td:before{left:0;right:0}.data-grid._dragging-copy._in-edit .data-grid-editable-row td:before{background-color:rgba(255,255,255,.95)}.data-grid._dragging-copy._in-edit .data-grid-editable-row td:only-child{border-left:1px solid #007bdb;border-right:1px solid #007bdb;left:0}.data-grid._dragging-copy._in-edit .data-grid-editable-row .admin__control-select,.data-grid._dragging-copy._in-edit .data-grid-editable-row .admin__control-text{opacity:.5}.data-grid .data-grid-controls-row td{padding-top:1.6rem}.data-grid .data-grid-controls-row td.data-grid-checkbox-cell{padding-top:.6rem}.data-grid .data-grid-controls-row td [class*=admin__control-],.data-grid .data-grid-controls-row td button{margin-top:-1.7rem}.data-grid._in-edit tr:hover td{background-color:#e6e6e6}.data-grid._in-edit ._odd-row.data-grid-editable-row td,.data-grid._in-edit ._odd-row.data-grid-editable-row:hover td{background-color:#fff}.data-grid._in-edit ._odd-row td,.data-grid._in-edit ._odd-row:hover td{background-color:#dcdcdc}.data-grid._in-edit .data-grid-editable-row-actions td,.data-grid._in-edit .data-grid-editable-row-actions:hover td{background-color:#fff}.data-grid._in-edit td{background-color:#e6e6e6;pointer-events:none}.data-grid._in-edit .data-grid-checkbox-cell{pointer-events:auto}.data-grid._in-edit .data-grid-editable-row{border:.1rem solid #adadad;border-bottom-color:#c2c2c2}.data-grid._in-edit .data-grid-editable-row:hover td{background-color:#fff}.data-grid._in-edit .data-grid-editable-row td{background-color:#fff;border-bottom-color:#fff;border-left-style:hidden;border-right-style:hidden;border-top-color:#fff;pointer-events:auto;vertical-align:middle}.data-grid._in-edit .data-grid-editable-row td:first-child{border-left-color:#adadad;border-left-style:solid}.data-grid._in-edit .data-grid-editable-row td:first-child:after,.data-grid._in-edit .data-grid-editable-row td:first-child:before{left:0}.data-grid._in-edit .data-grid-editable-row td:last-child{border-right-color:#adadad;border-right-style:solid;left:-.1rem}.data-grid._in-edit .data-grid-editable-row td:last-child:after,.data-grid._in-edit .data-grid-editable-row td:last-child:before{right:0}.data-grid._in-edit .data-grid-editable-row .admin__control-select,.data-grid._in-edit .data-grid-editable-row .admin__control-text{width:100%}.data-grid._in-edit .data-grid-bulk-edit-panel td{vertical-align:bottom}.data-grid .data-grid-editable-row td{border-left-color:#fff;border-left-style:solid;position:relative;z-index:1}.data-grid .data-grid-editable-row td:after{bottom:0;box-shadow:0 5px 5px rgba(0,0,0,.25);content:'';height:.9rem;left:0;margin-top:-1rem;position:absolute;right:0}.data-grid .data-grid-editable-row td:before{background-color:#fff;bottom:0;content:'';height:1rem;left:-10px;position:absolute;right:-10px;z-index:1}.data-grid .data-grid-editable-row.data-grid-editable-row-actions td,.data-grid .data-grid-editable-row.data-grid-editable-row-actions:hover td{background-color:#fff}.data-grid .data-grid-editable-row.data-grid-editable-row-actions td:first-child{border-left-color:#fff;border-right-color:#fff}.data-grid .data-grid-editable-row.data-grid-editable-row-actions td:last-child{left:0}.data-grid .data-grid-editable-row.data-grid-bulk-edit-panel td,.data-grid .data-grid-editable-row.data-grid-bulk-edit-panel td:before,.data-grid .data-grid-editable-row.data-grid-bulk-edit-panel:hover td{background-color:#fffbe6}.data-grid .data-grid-editable-row-actions{left:50%;margin-left:-12.5rem;margin-top:-2px;position:absolute;text-align:center}.data-grid .data-grid-editable-row-actions td{width:25rem}.data-grid .data-grid-editable-row-actions [class*=action-]{min-width:9rem}.data-grid .data-grid-draggable-row-cell{width:1%}.data-grid .data-grid-draggable-row-cell .draggable-handle{padding:0}.data-grid-th._sortable._ascend,.data-grid-th._sortable._descend{padding-right:2.7rem}.data-grid-th._sortable._ascend:before,.data-grid-th._sortable._descend:before{margin-top:-1em;position:absolute;right:1rem;top:50%}.data-grid-th._sortable._ascend:before{content:'\2193'}.data-grid-th._sortable._descend:before{content:'\2191'}.data-grid-checkbox-cell-inner{display:block;padding:1.1rem 1.8rem .9rem;text-align:right}.data-grid-checkbox-cell-inner:hover{cursor:pointer}.data-grid-state-cell-inner{display:block;padding:1.1rem 1.8rem .9rem;text-align:center}.data-grid-state-cell-inner>span{display:inline-block;font-style:italic;padding:.6rem 0}.data-grid-row-parent._active>td .data-grid-checkbox-cell-inner:before{content:'\e62b'}.data-grid-row-parent>td .data-grid-checkbox-cell-inner{padding-left:3.7rem;position:relative}.data-grid-row-parent>td .data-grid-checkbox-cell-inner:before{content:'\e628';font-size:1rem;font-weight:700;left:1.35rem;position:absolute;top:1.6rem}.data-grid-th._col-xs{width:1%}.data-grid-info-panel{box-shadow:0 0 5px rgba(0,0,0,.5);margin:2rem .1rem -2rem}.data-grid-info-panel .messages{overflow:hidden}.data-grid-info-panel .messages .message{margin:1rem}.data-grid-info-panel .messages .message:last-child{margin-bottom:1rem}.data-grid-info-panel-actions{padding:1rem;text-align:right}.data-grid-editable-row .admin__field-control{position:relative}.data-grid-editable-row .admin__field-control._error:after{border-color:transparent #ee7d7d transparent transparent;border-style:solid;border-width:0 12px 12px 0;content:'';position:absolute;right:0;top:0}.data-grid-editable-row .admin__field-control._error .admin__control-text{border-color:#ee7d7d}.data-grid-editable-row .admin__field-control._focus:after{display:none}.data-grid-editable-row .admin__field-error{bottom:100%;box-shadow:1px 1px 5px rgba(0,0,0,.5);left:0;margin:0 auto 1.5rem;max-width:32rem;position:absolute;right:0}.data-grid-editable-row .admin__field-error:after,.data-grid-editable-row .admin__field-error:before{border-style:solid;content:'';left:50%;position:absolute;top:100%}.data-grid-editable-row .admin__field-error:after{border-color:#fffbbb transparent transparent;border-width:10px 10px 0;margin-left:-10px;z-index:1}.data-grid-editable-row .admin__field-error:before{border-color:#ee7d7d transparent transparent;border-width:11px 12px 0;margin-left:-12px}.data-grid-bulk-edit-panel .admin__field-label-vertical{display:block;font-size:1.2rem;margin-bottom:.5rem;text-align:left}.data-grid-row-changed{cursor:default;display:block;opacity:.5;position:relative;width:100%;z-index:1}.data-grid-row-changed:after{content:'\e631';display:inline-block}.data-grid-row-changed .data-grid-row-changed-tooltip{background:#f1f1f1;border:1px solid #f1f1f1;border-radius:1px;bottom:100%;box-shadow:0 3px 9px 0 rgba(0,0,0,.3);display:none;font-weight:400;line-height:1.36;margin-bottom:1.5rem;padding:1rem;position:absolute;right:-1rem;text-transform:none;width:27rem;word-break:normal;z-index:2}.data-grid-row-changed._changed{opacity:1;z-index:3}.data-grid-row-changed._changed:hover .data-grid-row-changed-tooltip{display:block}.data-grid-row-changed._changed:hover:before{background:#f1f1f1;border:1px solid #f1f1f1;bottom:100%;box-shadow:4px 4px 3px -1px rgba(0,0,0,.15);content:'';display:block;height:1.6rem;left:50%;margin:0 0 .7rem -.8rem;position:absolute;-ms-transform:rotate(45deg);transform:rotate(45deg);width:1.6rem;z-index:3}.ie9 .data-grid-row-changed._changed:hover:before{display:none}.admin__data-grid-outer-wrap .data-grid-checkbox-cell{overflow:hidden}.admin__data-grid-outer-wrap .data-grid-checkbox-cell-inner{position:relative}.admin__data-grid-outer-wrap .data-grid-checkbox-cell-inner:before{bottom:0;content:'';height:500%;left:0;position:absolute;right:0;top:0}.admin__data-grid-wrap-static .data-grid-checkbox-cell:hover{cursor:pointer}.admin__data-grid-wrap-static .data-grid-checkbox-cell-inner{margin:1.1rem 1.8rem .9rem;padding:0}.adminhtml-cms-hierarchy-index .admin__data-grid-wrap-static .data-grid-actions-cell:first-child{padding:0}.adminhtml-export-index .admin__data-grid-wrap-static .data-grid-checkbox-cell-inner{margin:0;padding:1.1rem 1.8rem 1.9rem}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child:before,.admin__control-file-label:before,.admin__control-multiselect,.admin__control-select,.admin__control-text,.admin__control-textarea,.selectmenu{-webkit-appearance:none;background-color:#fff;border:1px solid #adadad;border-radius:1px;box-shadow:none;color:#303030;font-size:1.4rem;font-weight:400;height:auto;line-height:1.36;padding:.6rem 1rem;transition:border-color .1s linear;vertical-align:baseline;width:auto}.admin__control-addon [class*=admin__control-][class]:hover~[class*=admin__addon-]:last-child:before,.admin__control-multiselect:hover,.admin__control-select:hover,.admin__control-text:hover,.admin__control-textarea:hover,.selectmenu:hover,.selectmenu:hover .selectmenu-toggle:before{border-color:#878787}.admin__control-addon [class*=admin__control-][class]:focus~[class*=admin__addon-]:last-child:before,.admin__control-file:active+.admin__control-file-label:before,.admin__control-file:focus+.admin__control-file-label:before,.admin__control-multiselect:focus,.admin__control-select:focus,.admin__control-text:focus,.admin__control-textarea:focus,.selectmenu._focus,.selectmenu._focus .selectmenu-toggle:before{border-color:#007bdb;box-shadow:none;outline:0}.admin__control-addon [class*=admin__control-][class][disabled]~[class*=admin__addon-]:last-child:before,.admin__control-file[disabled]+.admin__control-file-label:before,.admin__control-multiselect[disabled],.admin__control-select[disabled],.admin__control-text[disabled],.admin__control-textarea[disabled]{background-color:#e9e9e9;border-color:#adadad;color:#303030;cursor:not-allowed;opacity:.5}.admin__field-row[class]>.admin__field-control,.admin__fieldset>.admin__field.admin__field-wide[class]>.admin__field-control{clear:left;float:none;text-align:left;width:auto}.admin__field-row[class]:not(.admin__field-option)>.admin__field-label,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option)>.admin__field-label{display:block;line-height:1.4rem;margin-bottom:.86rem;margin-top:-.14rem;text-align:left;width:auto}.admin__field-row[class]:not(.admin__field-option)>.admin__field-label:before,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option)>.admin__field-label:before{display:none}.admin__field-row[class]:not(.admin__field-option)._required>.admin__field-label span,.admin__field-row[class]:not(.admin__field-option).required>.admin__field-label span,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option)._required>.admin__field-label span,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option).required>.admin__field-label span{padding-left:1.5rem}.admin__field-row[class]:not(.admin__field-option)._required>.admin__field-label span:after,.admin__field-row[class]:not(.admin__field-option).required>.admin__field-label span:after,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option)._required>.admin__field-label span:after,.admin__fieldset>.admin__field.admin__field-wide[class]:not(.admin__field-option).required>.admin__field-label span:after{left:0;margin-left:30px}.admin__legend{font-size:1.8rem;font-weight:600;margin-bottom:3rem}.admin__control-checkbox,.admin__control-radio{cursor:pointer;opacity:.01;overflow:hidden;position:absolute;vertical-align:top}.admin__control-checkbox:after,.admin__control-radio:after{display:none}.admin__control-checkbox+label,.admin__control-radio+label{cursor:pointer;display:inline-block}.admin__control-checkbox+label:before,.admin__control-radio+label:before{background-color:#fff;border:1px solid #adadad;color:transparent;float:left;height:1.6rem;text-align:center;vertical-align:top;width:1.6rem}.admin__control-checkbox+.admin__field-label,.admin__control-radio+.admin__field-label{padding-left:2.6rem}.admin__control-checkbox+.admin__field-label:before,.admin__control-radio+.admin__field-label:before{margin:1px 1rem 0 -2.6rem}.admin__control-checkbox:checked+label:before,.admin__control-radio:checked+label:before{color:#514943}.admin__control-checkbox.disabled+label,.admin__control-checkbox[disabled]+label,.admin__control-radio.disabled+label,.admin__control-radio[disabled]+label{color:#303030;cursor:default;opacity:.5}.admin__control-checkbox.disabled+label:before,.admin__control-checkbox[disabled]+label:before,.admin__control-radio.disabled+label:before,.admin__control-radio[disabled]+label:before{background-color:#e9e9e9;border-color:#adadad;cursor:default}._keyfocus .admin__control-checkbox:not(.disabled):focus+label:before,._keyfocus .admin__control-checkbox:not([disabled]):focus+label:before,._keyfocus .admin__control-radio:not(.disabled):focus+label:before,._keyfocus .admin__control-radio:not([disabled]):focus+label:before{border-color:#007bdb}.admin__control-checkbox:not(.disabled):hover+label:before,.admin__control-checkbox:not([disabled]):hover+label:before,.admin__control-radio:not(.disabled):hover+label:before,.admin__control-radio:not([disabled]):hover+label:before{border-color:#878787}.admin__control-radio+label:before{border-radius:1.6rem;content:'';transition:border-color .1s linear,color .1s ease-in}.admin__control-radio.admin__control-radio+label:before{line-height:140%}.admin__control-radio:checked+label{position:relative}.admin__control-radio:checked+label:after{background-color:#514943;border-radius:50%;content:'';height:10px;left:3px;position:absolute;top:4px;width:10px}.admin__control-radio:checked:not(.disabled):hover,.admin__control-radio:checked:not(.disabled):hover+label,.admin__control-radio:checked:not([disabled]):hover,.admin__control-radio:checked:not([disabled]):hover+label{cursor:default}.admin__control-radio:checked:not(.disabled):hover+label:before,.admin__control-radio:checked:not([disabled]):hover+label:before{border-color:#adadad}.admin__control-checkbox+label:before{border-radius:1px;content:'';font-size:0;transition:font-size .1s ease-out,color .1s ease-out,border-color .1s linear}.admin__control-checkbox:checked+label:before{content:'\e62d';font-size:1.1rem;line-height:125%}.admin__control-checkbox:not(:checked)._indeterminate+label:before,.admin__control-checkbox:not(:checked):indeterminate+label:before{color:#514943;content:'-';font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.4rem;font-weight:700}input[type=checkbox].admin__control-checkbox,input[type=radio].admin__control-checkbox{margin:0;position:absolute}.admin__control-text{min-width:4rem}.admin__control-select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background-image:url(../images/arrows-bg.svg),linear-gradient(#e3e3e3,#e3e3e3),linear-gradient(#adadad,#adadad);background-position:calc(100% - 12px) -34px,100%,calc(100% - 3.2rem) 0;background-size:auto,3.2rem 100%,1px 100%;background-repeat:no-repeat;max-width:100%;min-width:8.5rem;padding-bottom:.5rem;padding-right:4.4rem;padding-top:.5rem;transition:border-color .1s linear}.admin__control-select:hover{border-color:#878787;cursor:pointer}.admin__control-select:focus{background-image:url(../images/arrows-bg.svg),linear-gradient(#e3e3e3,#e3e3e3),linear-gradient(#007bdb,#007bdb);background-position:calc(100% - 12px) 13px,100%,calc(100% - 3.2rem) 0;border-color:#007bdb}.admin__control-select::-ms-expand{display:none}.ie9 .admin__control-select{background-image:none;padding-right:1rem}option:empty{display:none}.admin__control-multiselect{height:auto;max-width:100%;min-width:15rem;overflow:auto;padding:0;resize:both}.admin__control-multiselect optgroup,.admin__control-multiselect option{padding:.5rem 1rem}.admin__control-file-wrapper{display:inline-block;padding:.5rem 1rem;position:relative;z-index:1}.admin__control-file-label:before{content:'';left:0;position:absolute;top:0;width:100%;z-index:0}.admin__control-file{background:0 0;border:0;padding-top:.7rem;position:relative;width:auto;z-index:1}.admin__control-support-text{border:1px solid transparent;display:inline-block;font-size:1.4rem;line-height:1.36;padding-bottom:.6rem;padding-top:.6rem}.admin__control-support-text+[class*=admin__control-],[class*=admin__control-]+.admin__control-support-text{margin-left:.7rem}.admin__control-service{float:left;margin:.8rem 0 0 3rem}.admin__control-textarea{height:8.48rem;line-height:1.18;padding-top:.8rem;resize:vertical}.admin__control-addon{-ms-flex-direction:row;flex-direction:row;display:inline-flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;position:relative;width:100%;z-index:1}.admin__control-addon>[class*=admin__addon-],.admin__control-addon>[class*=admin__control-]{-ms-flex-preferred-size:auto;flex-basis:auto;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;position:relative;z-index:1}.admin__control-addon .admin__control-select{width:auto}.admin__control-addon .admin__control-text{margin:.1rem;padding:.5rem .9rem;width:100%}.admin__control-addon [class*=admin__control-][class]{appearence:none;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-order:1;order:1;-ms-flex-negative:1;flex-shrink:1;background-color:transparent;border-color:transparent;box-shadow:none;vertical-align:top}.admin__control-addon [class*=admin__control-][class]+[class*=admin__control-]{border-left-color:#adadad}.admin__control-addon [class*=admin__control-][class] :focus{box-shadow:0}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child{padding-left:1rem;position:static!important;z-index:0}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child>*{position:relative;vertical-align:top;z-index:1}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child:empty{padding:0}.admin__control-addon [class*=admin__control-][class]~[class*=admin__addon-]:last-child:before{bottom:0;box-sizing:border-box;content:'';left:0;position:absolute;top:0;width:100%;z-index:-1}.admin__addon-prefix,.admin__addon-suffix{border:0;box-sizing:border-box;color:#858585;display:inline-block;font-size:1.4rem;font-weight:400;height:3.2rem;line-height:3.2rem;padding:0}.admin__addon-suffix{-ms-flex-order:3;order:3}.admin__addon-suffix:last-child{padding-right:1rem}.admin__addon-prefix{-ms-flex-order:0;order:0}.ie9 .admin__control-addon:after{clear:both;content:'';display:block;height:0;overflow:hidden}.ie9 .admin__addon{min-width:0;overflow:hidden;text-align:right;white-space:nowrap;width:auto}.ie9 .admin__addon [class*=admin__control-]{display:inline}.ie9 .admin__addon-prefix{float:left}.ie9 .admin__addon-suffix{float:right}.admin__control-collapsible{width:100%}.admin__control-collapsible ._dragged .admin__collapsible-block-wrapper .admin__collapsible-title{background:#d0d0d0}.admin__control-collapsible ._dragover-bottom .admin__collapsible-block-wrapper:before,.admin__control-collapsible ._dragover-top .admin__collapsible-block-wrapper:before{background:#008bdb;content:'';display:block;height:3px;left:0;position:absolute;right:0}.admin__control-collapsible ._dragover-top .admin__collapsible-block-wrapper:before{top:-3px}.admin__control-collapsible ._dragover-bottom .admin__collapsible-block-wrapper:before{bottom:-3px}.admin__control-collapsible .admin__collapsible-block-wrapper.fieldset-wrapper{border:0;margin:0;position:relative}.admin__control-collapsible .admin__collapsible-block-wrapper.fieldset-wrapper .fieldset-wrapper-title{background:#f8f8f8;border:2px solid #ccc}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .admin__collapsible-title{font-size:1.4rem;font-weight:400;line-height:1;padding:1.6rem 4rem 1.6rem 3.8rem}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .admin__collapsible-title:before{left:1rem;right:auto;top:1.4rem}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete{background-color:transparent;border-color:transparent;box-shadow:none;padding:0;position:absolute;right:1rem;top:1.4rem}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete:hover{background-color:transparent;border-color:transparent;box-shadow:none}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete:before{content:'\e630';font-size:2rem}.admin__control-collapsible .admin__collapsible-block-wrapper .fieldset-wrapper-title .action-delete>span{display:none}.admin__control-collapsible .admin__collapsible-content{background-color:#fff;margin-bottom:1rem}.admin__control-collapsible .admin__collapsible-content>.fieldset-wrapper{border:1px solid #ccc;margin-top:-1px;padding:1rem}.admin__control-collapsible .admin__collapsible-content .admin__fieldset{padding:0}.admin__control-collapsible .admin__collapsible-content .admin__field:last-child{margin-bottom:0}.admin__control-table-wrapper{max-width:100%;overflow-x:auto;overflow-y:hidden}.admin__control-table{width:100%}.admin__control-table thead{background-color:transparent}.admin__control-table tbody td{vertical-align:top}.admin__control-table tfoot th{padding-bottom:1.3rem}.admin__control-table tfoot th.validation{padding-bottom:0;padding-top:0}.admin__control-table tfoot td{border-top:1px solid #fff}.admin__control-table tfoot .admin__control-table-pagination{float:right;padding-bottom:0}.admin__control-table tfoot .action-previous{margin-right:.5rem}.admin__control-table tfoot .action-next{margin-left:.9rem}.admin__control-table tr:last-child td{border-bottom:none}.admin__control-table tr._dragover-top td{box-shadow:inset 0 3px 0 0 #008bdb}.admin__control-table tr._dragover-bottom td{box-shadow:inset 0 -3px 0 0 #008bdb}.admin__control-table tr._dragged td,.admin__control-table tr._dragged th{background:#d0d0d0}.admin__control-table td,.admin__control-table th{background-color:#efefef;border:0;border-bottom:1px solid #fff;padding:1.3rem 1rem 1.3rem 0;text-align:left;vertical-align:top}.admin__control-table td:first-child,.admin__control-table th:first-child{padding-left:1rem}.admin__control-table td>.admin__control-select,.admin__control-table td>.admin__control-text,.admin__control-table th>.admin__control-select,.admin__control-table th>.admin__control-text{width:100%}.admin__control-table td._hidden,.admin__control-table th._hidden{display:none}.admin__control-table td._fit,.admin__control-table th._fit{width:1px}.admin__control-table th{color:#303030;font-size:1.4rem;font-weight:600;vertical-align:bottom}.admin__control-table th._required span:after{color:#eb5202;content:'*'}.admin__control-table .control-table-actions-th{white-space:nowrap}.admin__control-table .control-table-actions-cell{padding-top:1.8rem;text-align:center;width:1%}.admin__control-table .control-table-options-th{text-align:center;width:10rem}.admin__control-table .control-table-options-cell{text-align:center}.admin__control-table .control-table-text{line-height:3.2rem}.admin__control-table .col-draggable{padding-top:2.2rem;width:1%}.admin__control-table .action-delete{background-color:transparent;border-color:transparent;box-shadow:none;padding-left:0;padding-right:0}.admin__control-table .action-delete:hover{background-color:transparent;border-color:transparent;box-shadow:none}.admin__control-table .action-delete:before{content:'\e630';font-size:2rem}.admin__control-table .action-delete>span{display:none}.admin__control-table .draggable-handle{padding:0}.admin__control-table._dragged{outline:#007bdb solid 1px}.admin__control-table-action{background-color:#efefef;border-top:1px solid #fff;padding:1.3rem 1rem}.admin__dynamic-rows._dragged{opacity:.95;position:absolute;z-index:999}.admin__dynamic-rows.admin__control-table .admin__control-fields>.admin__field{border:0;padding:0}.admin__dynamic-rows td>.admin__field{border:0;margin:0;padding:0}.admin__control-table-pagination{padding-bottom:1rem}.admin__control-table-pagination .admin__data-grid-pager{float:right}.admin__field-tooltip{display:inline-block;margin-top:.5rem;max-width:45px;overflow:visible;vertical-align:top;width:0}.admin__field-tooltip:hover{position:relative;z-index:500}.admin__field-option .admin__field-tooltip{margin-top:.5rem}.admin__field-tooltip .admin__field-tooltip-action{margin-left:2rem;position:relative;z-index:2;display:inline-block;text-decoration:none}.admin__field-tooltip .admin__field-tooltip-action:before{-webkit-font-smoothing:antialiased;font-size:2.2rem;line-height:1;color:#514943;content:'\e633';font-family:Icons;vertical-align:middle;display:inline-block;font-weight:400;overflow:hidden;speak:none;text-align:center}.admin__field-tooltip .admin__control-text:focus+.admin__field-tooltip-content,.admin__field-tooltip:hover .admin__field-tooltip-content{display:block}.admin__field-tooltip .admin__field-tooltip-content{bottom:3.8rem;display:none;right:-2.3rem}.admin__field-tooltip .admin__field-tooltip-content:after,.admin__field-tooltip .admin__field-tooltip-content:before{border:1.6rem solid transparent;height:0;width:0;border-top-color:#afadac;content:'';display:block;position:absolute;right:2rem;top:100%;z-index:3}.admin__field-tooltip .admin__field-tooltip-content:after{border-top-color:#fffbbb;margin-top:-1px;z-index:4}.abs-admin__field-tooltip-content,.admin__field-tooltip .admin__field-tooltip-content{box-shadow:0 2px 8px 0 rgba(0,0,0,.3);background:#fffbbb;border:1px solid #afadac;border-radius:1px;padding:1.5rem 2.5rem;position:absolute;width:32rem;z-index:1}.admin__field-fallback-reset{font-size:1.25rem;white-space:nowrap;width:30px}.admin__field-fallback-reset>span{margin-left:.5rem;position:relative}.admin__field-fallback-reset:active{-ms-transform:scale(0.98);transform:scale(0.98)}.admin__field-fallback-reset:before{transition:color .1s linear;content:'\e642';font-size:1.3rem;margin-left:.5rem}.admin__field-fallback-reset:hover{cursor:pointer;text-decoration:none}.admin__field-fallback-reset:focus{background:0 0}.abs-field-size-x-small,.abs-field-sizes.admin__field-x-small>.admin__field-control,.admin__field.admin__field-x-small>.admin__field-control,.admin__fieldset>.admin__field.admin__field-x-small>.admin__field-control,[class*=admin__control-grouped]>.admin__field.admin__field-x-small>.admin__field-control{width:8rem}.abs-field-size-small,.abs-field-sizes.admin__field-small>.admin__field-control,.admin__control-grouped-date>.admin__field-date.admin__field>.admin__field-control,.admin__field.admin__field-small>.admin__field-control,.admin__fieldset>.admin__field.admin__field-small>.admin__field-control,[class*=admin__control-grouped]>.admin__field.admin__field-small>.admin__field-control{width:15rem}.abs-field-size-medium,.abs-field-sizes.admin__field-medium>.admin__field-control,.admin__field.admin__field-medium>.admin__field-control,.admin__fieldset>.admin__field.admin__field-medium>.admin__field-control,[class*=admin__control-grouped]>.admin__field.admin__field-medium>.admin__field-control{width:34rem}.abs-field-size-large,.abs-field-sizes.admin__field-large>.admin__field-control,.admin__field.admin__field-large>.admin__field-control,.admin__fieldset>.admin__field.admin__field-large>.admin__field-control,[class*=admin__control-grouped]>.admin__field.admin__field-large>.admin__field-control{width:64rem}.abs-field-no-label,.admin__field-group-additional,.admin__field-no-label,.admin__fieldset>.admin__field.admin__field-no-label>.admin__field-control{margin-left:calc((100%) * .25 + 30px)}.admin__fieldset{border:0;margin:0;min-width:0;padding:0}.admin__fieldset .fieldset-wrapper.admin__fieldset-section>.fieldset-wrapper-title{padding-left:1rem}.admin__fieldset .fieldset-wrapper.admin__fieldset-section>.fieldset-wrapper-title strong{font-size:1.7rem;font-weight:600}.admin__fieldset .fieldset-wrapper.admin__fieldset-section .admin__fieldset-wrapper-content>.admin__fieldset{padding-top:1rem}.admin__fieldset .fieldset-wrapper.admin__fieldset-section:last-child .admin__fieldset-wrapper-content>.admin__fieldset{padding-bottom:0}.admin__fieldset>.admin__field{border:0;margin:0 0 0 -30px;padding:0}.admin__fieldset>.admin__field:after{clear:both;content:'';display:table}.admin__fieldset>.admin__field>.admin__field-control{width:calc((100%) * .5 - 30px);float:left;margin-left:30px}.admin__fieldset>.admin__field>.admin__field-label{width:calc((100%) * .25 - 30px);float:left;margin-left:30px}.admin__fieldset>.admin__field.admin__field-no-label>.admin__field-label{display:none}.admin__fieldset>.admin__field+.admin__field._empty._no-header{margin-top:-3rem}.admin__fieldset-product-websites{position:relative;z-index:300}.admin__fieldset-note{margin-bottom:2rem}.admin__form-field{border:0;margin:0;padding:0}.admin__field-control .admin__control-text,.admin__field-control .admin__control-textarea,.admin__form-field-control .admin__control-text,.admin__form-field-control .admin__control-textarea{width:100%}.admin__field-label{color:#303030;cursor:pointer;margin:0;text-align:right}.admin__field-label+br{display:none}.admin__field:not(.admin__field-option)>.admin__field-label{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.4rem;font-weight:600;line-height:3.2rem;padding:0;white-space:nowrap}.admin__field:not(.admin__field-option)>.admin__field-label:before{opacity:0;visibility:hidden;content:'.';margin-left:-7px;overflow:hidden}.admin__field:not(.admin__field-option)>.admin__field-label span{display:inline-block;line-height:1.2;vertical-align:middle;white-space:normal}.admin__field:not(.admin__field-option)>.admin__field-label span[data-config-scope]{position:relative}._required>.admin__field-label>span:after,.required>.admin__field-label>span:after{color:#eb5202;content:'*';display:inline-block;font-size:1.6rem;font-weight:500;line-height:1;margin-left:10px;margin-top:.2rem;position:absolute;z-index:1}._disabled>.admin__field-label{color:#999;cursor:default}.admin__field{margin-bottom:0}.admin__field+.admin__field{margin-top:1.5rem}.admin__field:not(.admin__field-option)~.admin__field-option{margin-top:.5rem}.admin__field.admin__field-option~.admin__field-option{margin-top:.9rem}.admin__field~.admin__field-option:last-child{margin-bottom:.8rem}.admin__fieldset>.admin__field{margin-bottom:3rem;position:relative}.admin__field legend.admin__field-label{opacity:0}.admin__field[data-config-scope]:before{color:gray;content:attr(data-config-scope);display:inline-block;font-size:1.2rem;left:calc((100%) * .75 - 30px);line-height:3.2rem;margin-left:60px;position:absolute;width:calc((100%) * .25 - 30px)}.admin__field-control .admin__field[data-config-scope]:nth-child(n+2):before{content:''}.admin__field._error .admin__field-control [class*=admin__addon-]:before,.admin__field._error .admin__field-control [class*=admin__control-] [class*=admin__addon-]:before,.admin__field._error .admin__field-control>[class*=admin__control-]{border-color:#e22626}.admin__field._disabled,.admin__field._disabled:hover{box-shadow:inherit;cursor:inherit;opacity:1;outline:inherit}.admin__field._hidden{display:none}.admin__field-control+.admin__field-control{margin-top:1.5rem}.admin__field-control._with-tooltip>.admin__control-addon,.admin__field-control._with-tooltip>.admin__control-select,.admin__field-control._with-tooltip>.admin__control-text,.admin__field-control._with-tooltip>.admin__control-textarea,.admin__field-control._with-tooltip>.admin__field-option{max-width:calc(100% - 45px - 4px)}.admin__field-control._with-tooltip .admin__field-tooltip{width:auto}.admin__field-control._with-tooltip .admin__field-option{display:inline-block}.admin__field-control._with-reset>.admin__control-addon,.admin__field-control._with-reset>.admin__control-text,.admin__field-control._with-reset>.admin__control-textarea{width:calc(100% - 30px - .5rem - 4px)}.admin__field-control._with-reset .admin__field-fallback-reset{margin-left:.5rem;margin-top:1rem;vertical-align:top}.admin__field-control._with-reset._with-tooltip>.admin__control-addon,.admin__field-control._with-reset._with-tooltip>.admin__control-text,.admin__field-control._with-reset._with-tooltip>.admin__control-textarea{width:calc(100% - 30px - .5rem - 45px - 8px)}.admin__fieldset>.admin__field-collapsible{margin-bottom:0}.admin__fieldset>.admin__field-collapsible .admin__field-control{border-top:1px solid #ccc;display:block;font-size:1.7rem;font-weight:700;padding:1.7rem 0;width:calc(97%)}.admin__fieldset>.admin__field-collapsible .admin__field-option{padding-top:0}.admin__field-collapsible+div{margin-top:2.5rem}.admin__field-collapsible .admin__control-radio+label:before{height:1.8rem;width:1.8rem}.admin__field-collapsible .admin__control-radio:checked+label:after{left:4px;top:5px}.admin__field-error{background:#fffbbb;border:1px solid #ee7d7d;box-sizing:border-box;color:#555;display:block;font-size:1.2rem;font-weight:400;line-height:1.2;margin:.2rem 0 0;padding:.8rem 1rem .9rem}.admin__field-note{color:#303030;font-size:1.2rem;margin:10px 0 0;padding:0}.admin__additional-info{padding-top:1rem}.admin__field-option{padding-top:.7rem}.admin__field-option .admin__field-label{text-align:left}.admin__field-control>.admin__field-option:nth-child(1):nth-last-child(2),.admin__field-control>.admin__field-option:nth-child(2):nth-last-child(1){display:inline-block}.admin__field-control>.admin__field-option:nth-child(1):nth-last-child(2)+.admin__field-option,.admin__field-control>.admin__field-option:nth-child(2):nth-last-child(1)+.admin__field-option{display:inline-block;margin-left:41px;margin-top:0}.admin__field-control>.admin__field-option:nth-child(1):nth-last-child(2)+.admin__field-option:before,.admin__field-control>.admin__field-option:nth-child(2):nth-last-child(1)+.admin__field-option:before{background:#cacaca;content:'';display:inline-block;height:20px;margin-left:-20px;position:absolute;width:1px}.admin__field-value{display:inline-block;padding-top:.7rem}.admin__field-service{padding-top:1rem}.admin__control-fields>.admin__field:first-child,[class*=admin__control-grouped]>.admin__field:first-child{position:static}.admin__control-fields>.admin__field:first-child>.admin__field-label,[class*=admin__control-grouped]>.admin__field:first-child>.admin__field-label{width:calc((100%) * .25 - 30px);float:left;margin-left:30px;background:#fff;cursor:pointer;left:0;position:absolute;top:0}.admin__control-fields>.admin__field:first-child>.admin__field-label span:before,[class*=admin__control-grouped]>.admin__field:first-child>.admin__field-label span:before{display:block}.admin__control-fields>.admin__field._disabled>.admin__field-label,[class*=admin__control-grouped]>.admin__field._disabled>.admin__field-label{cursor:default}.admin__control-fields>.admin__field>.admin__field-label span:before,[class*=admin__control-grouped]>.admin__field>.admin__field-label span:before{display:none}.admin__control-fields .admin__field-label~.admin__field-control{width:100%}.admin__control-fields .admin__field-option{padding-top:0}[class*=admin__control-grouped]{box-sizing:border-box;display:table;width:100%}[class*=admin__control-grouped]>.admin__field{display:table-cell;vertical-align:top}[class*=admin__control-grouped]>.admin__field>.admin__field-control{float:none;width:100%}[class*=admin__control-grouped]>.admin__field.admin__field-default,[class*=admin__control-grouped]>.admin__field.admin__field-large,[class*=admin__control-grouped]>.admin__field.admin__field-medium,[class*=admin__control-grouped]>.admin__field.admin__field-small,[class*=admin__control-grouped]>.admin__field.admin__field-x-small{width:1px}[class*=admin__control-grouped]>.admin__field.admin__field-default+.admin__field:last-child,[class*=admin__control-grouped]>.admin__field.admin__field-large+.admin__field:last-child,[class*=admin__control-grouped]>.admin__field.admin__field-medium+.admin__field:last-child,[class*=admin__control-grouped]>.admin__field.admin__field-small+.admin__field:last-child,[class*=admin__control-grouped]>.admin__field.admin__field-x-small+.admin__field:last-child{width:auto}[class*=admin__control-grouped]>.admin__field:nth-child(n+2){padding-left:20px}.admin__control-group-equal{table-layout:fixed}.admin__control-group-equal>.admin__field{width:50%}.admin__field-control-group{margin-top:.8rem}.admin__field-control-group>.admin__field{padding:0}.admin__control-grouped-date>.admin__field-date{white-space:nowrap;width:1px}.admin__control-grouped-date>.admin__field-date.admin__field>.admin__field-control{float:left;position:relative}.admin__control-grouped-date>.admin__field-date+.admin__field:last-child{width:auto}.admin__control-grouped-date>.admin__field-date+.admin__field-date>.admin__field-label{float:left;padding-right:20px}.admin__control-grouped-date .ui-datepicker-trigger{left:100%;top:0}.admin__field-group-columns.admin__field-control.admin__control-grouped{width:calc((100%) * 1 - 30px);float:left;margin-left:30px}.admin__field-group-columns>.admin__field:first-child>.admin__field-label{float:none;margin:0;opacity:1;position:static;text-align:left}.admin__field-group-columns .admin__control-select{width:100%}.admin__field-group-additional{clear:both}.admin__field-group-additional .action-advanced{margin-top:1rem}.admin__field-group-additional .action-secondary{width:100%}.admin__field-group-show-label{white-space:nowrap}.admin__field-group-show-label>.admin__field-control,.admin__field-group-show-label>.admin__field-label{display:inline-block;vertical-align:top}.admin__field-group-show-label>.admin__field-label{margin-right:20px}.admin__field-complex{margin:1rem 0 3rem;padding-left:1rem}.admin__field:not(._hidden)+.admin__field-complex{margin-top:3rem}.admin__field-complex .admin__field-complex-title{clear:both;color:#303030;font-size:1.7rem;font-weight:600;letter-spacing:.025em;margin-bottom:1rem}.admin__field-complex .admin__field-complex-elements{float:right;max-width:40%}.admin__field-complex .admin__field-complex-elements button{margin-left:1rem}.admin__field-complex .admin__field-complex-content{max-width:60%;overflow:hidden}.admin__field-complex .admin__field-complex-text{margin-left:-1rem}.admin__field-complex+.admin__field._empty._no-header{margin-top:-3rem}.admin__legend{float:left;position:static;width:100%}.admin__legend+br{clear:left;display:block;height:0;overflow:hidden}.message{margin-bottom:3rem}.message-icon-top:before{margin-top:0;top:1.8rem}.nav{background-color:#f8f8f8;border-bottom:1px solid #e3e3e3;border-top:1px solid #e3e3e3;display:none;margin-bottom:3rem;padding:2.2rem 1.5rem 0 0}.nav .btn-group,.nav-bar-outer-actions{float:right;margin-bottom:1.7rem}.nav .btn-group .btn-wrap,.nav-bar-outer-actions .btn-wrap{float:right;margin-left:.5rem;margin-right:.5rem}.nav .btn-group .btn-wrap .btn,.nav-bar-outer-actions .btn-wrap .btn{padding-left:.5rem;padding-right:.5rem}.nav-bar-outer-actions{margin-top:-10.6rem;padding-right:1.5rem}.btn-wrap-try-again{width:9.5rem}.btn-wrap-next,.btn-wrap-prev{width:8.5rem}.nav-bar{counter-reset:i;float:left;margin:0 1rem 1.7rem 0;padding:0;position:relative;white-space:nowrap}.nav-bar:before{background-color:#d4d4d4;background-repeat:repeat-x;background-image:linear-gradient(to bottom,#d1d1d1 0,#d4d4d4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d1d1d1', endColorstr='#d4d4d4', GradientType=0);border-bottom:1px solid #d9d9d9;border-top:1px solid #bfbfbf;content:'';height:1rem;left:5.15rem;position:absolute;right:5.15rem;top:.7rem}.nav-bar>li{display:inline-block;font-size:0;position:relative;vertical-align:top;width:10.3rem}.nav-bar>li:first-child:after{display:none}.nav-bar>li:after{background-color:#514943;content:'';height:.5rem;left:calc(-50% + .25rem);position:absolute;right:calc(50% + .7rem);top:.9rem}.nav-bar>li.disabled:before,.nav-bar>li.ui-state-disabled:before{bottom:0;content:'';left:0;position:absolute;right:0;top:0;z-index:1}.nav-bar>li.active~li:after,.nav-bar>li.ui-state-active~li:after{display:none}.nav-bar>li.active~li a:after,.nav-bar>li.ui-state-active~li a:after{background-color:transparent;border-color:transparent;color:#a6a6a6}.nav-bar>li.active a,.nav-bar>li.ui-state-active a{color:#000}.nav-bar>li.active a:hover,.nav-bar>li.ui-state-active a:hover{cursor:default}.nav-bar>li.active a:after,.nav-bar>li.ui-state-active a:after{background-color:#fff;content:''}.nav-bar a{color:#514943;display:block;font-size:1.2rem;font-weight:600;line-height:1.2;overflow:hidden;padding:3rem .5em 0;position:relative;text-align:center;text-overflow:ellipsis}.nav-bar a:hover{text-decoration:none}.nav-bar a:after{background-color:#514943;border:.4rem solid #514943;border-radius:100%;color:#fff;content:counter(i);counter-increment:i;height:1.5rem;left:50%;line-height:.6;margin-left:-.8rem;position:absolute;right:auto;text-align:center;top:.4rem;width:1.5rem}.nav-bar a:before{background-color:#d6d6d6;border:1px solid transparent;border-bottom-color:#d9d9d9;border-radius:100%;border-top-color:#bfbfbf;content:'';height:2.3rem;left:50%;line-height:1;margin-left:-1.2rem;position:absolute;top:0;width:2.3rem}.tooltip{display:block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.19rem;font-weight:400;line-height:1.4;opacity:0;position:absolute;visibility:visible;z-index:10}.tooltip.in{opacity:.9}.tooltip.top{margin-top:-4px;padding:8px 0}.tooltip.right{margin-left:4px;padding:0 8px}.tooltip.bottom{margin-top:4px;padding:8px 0}.tooltip.left{margin-left:-4px;padding:0 8px}.tooltip p:last-child{margin-bottom:0}.tooltip-inner{background-color:#fff;border:1px solid #adadad;border-radius:0;box-shadow:1px 1px 1px #ccc;color:#41362f;max-width:31rem;padding:.5em 1em;text-decoration:none}.tooltip-arrow,.tooltip-arrow:after{border:solid transparent;height:0;position:absolute;width:0}.tooltip-arrow:after{content:'';position:absolute}.tooltip.top .tooltip-arrow,.tooltip.top .tooltip-arrow:after{border-top-color:#949494;border-width:8px 8px 0;bottom:0;left:50%;margin-left:-8px}.tooltip.top-left .tooltip-arrow,.tooltip.top-left .tooltip-arrow:after{border-top-color:#949494;border-width:8px 8px 0;bottom:0;margin-bottom:-8px;right:8px}.tooltip.top-right .tooltip-arrow,.tooltip.top-right .tooltip-arrow:after{border-top-color:#949494;border-width:8px 8px 0;bottom:0;left:8px;margin-bottom:-8px}.tooltip.right .tooltip-arrow,.tooltip.right .tooltip-arrow:after{border-right-color:#949494;border-width:8px 8px 8px 0;left:1px;margin-top:-8px;top:50%}.tooltip.right .tooltip-arrow:after{border-right-color:#fff;border-width:6px 7px 6px 0;margin-left:0;margin-top:-6px}.tooltip.left .tooltip-arrow,.tooltip.left .tooltip-arrow:after{border-left-color:#949494;border-width:8px 0 8px 8px;margin-top:-8px;right:0;top:50%}.tooltip.bottom .tooltip-arrow,.tooltip.bottom .tooltip-arrow:after{border-bottom-color:#949494;border-width:0 8px 8px;left:50%;margin-left:-8px;top:0}.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow:after{border-bottom-color:#949494;border-width:0 8px 8px;margin-top:-8px;right:8px;top:0}.tooltip.bottom-right .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow:after{border-bottom-color:#949494;border-width:0 8px 8px;left:8px;margin-top:-8px;top:0}.password-strength{display:block;margin:0 -.3rem 1em;white-space:nowrap}.password-strength.password-strength-too-short .password-strength-item:first-child,.password-strength.password-strength-weak .password-strength-item:first-child,.password-strength.password-strength-weak .password-strength-item:first-child+.password-strength-item{background-color:#e22626}.password-strength.password-strength-fair .password-strength-item:first-child,.password-strength.password-strength-fair .password-strength-item:first-child+.password-strength-item,.password-strength.password-strength-fair .password-strength-item:first-child+.password-strength-item+.password-strength-item{background-color:#ef672f}.password-strength.password-strength-good .password-strength-item:first-child,.password-strength.password-strength-good .password-strength-item:first-child+.password-strength-item,.password-strength.password-strength-good .password-strength-item:first-child+.password-strength-item+.password-strength-item,.password-strength.password-strength-good .password-strength-item:first-child+.password-strength-item+.password-strength-item+.password-strength-item,.password-strength.password-strength-strong .password-strength-item{background-color:#79a22e}.password-strength .password-strength-item{background-color:#ccc;display:inline-block;font-size:0;height:1.4rem;margin-right:.3rem;width:calc(20% - .6rem)}@keyframes progress-bar-stripes{from{background-position:4rem 0}to{background-position:0 0}}.progress{background-color:#fafafa;border:1px solid #ccc;clear:left;height:3rem;margin-bottom:3rem;overflow:hidden}.progress-bar{background-color:#79a22e;color:#fff;float:left;font-size:1.19rem;height:100%;line-height:3rem;text-align:center;transition:width .6s ease;width:0}.progress-bar.active{animation:progress-bar-stripes 2s linear infinite}.progress-bar-text-description{margin-bottom:1.6rem}.progress-bar-text-progress{text-align:right}.page-columns .page-inner-sidebar{margin:0 0 3rem}.page-header{margin-bottom:2.7rem;padding-bottom:2rem;position:relative}.page-header:before{border-bottom:1px solid #e3e3e3;bottom:0;content:'';display:block;height:1px;left:3rem;position:absolute;right:3rem}.container .page-header:before{content:normal}.page-header .message{margin-bottom:1.8rem}.page-header .message+.message{margin-top:-1.5rem}.page-header .admin__action-dropdown,.page-header .search-global-input{transition:none}.container .page-header{margin-bottom:0}.page-title-wrapper{margin-top:1.1rem}.container .page-title-wrapper{background:url(../../pub/images/logo.svg) no-repeat;min-height:41px;padding:4px 0 0 45px}.admin__menu .level-0:first-child>a{margin-top:1.6rem}.admin__menu .level-0:first-child>a:after{top:-1.6rem}.admin__menu .level-0:first-child._active>a:after{display:block}.admin__menu .level-0>a{padding-bottom:1.3rem;padding-top:1.3rem}.admin__menu .level-0>a:before{margin-bottom:.7rem}.admin__menu .item-home>a:before{content:'\e611';font-size:2.3rem;padding-top:-.1rem}.admin__menu .item-component>a:before{content:'\e612'}.admin__menu .item-extension>a:before{content:'\e647'}.admin__menu .item-upgrade>a:before{content:'\e614'}.admin__menu .item-system-config>a:before{content:'\e610'}.admin__menu .item-tools>a:before{content:'\e613'}.modal-sub-title{font-size:1.7rem;font-weight:600}.modal-connect-signin .modal-inner-wrap{max-width:80rem}@keyframes ngdialog-fadeout{0%{opacity:1}100%{opacity:0}}@keyframes ngdialog-fadein{0%{opacity:0}100%{opacity:1}}.ngdialog{-webkit-overflow-scrolling:touch;bottom:0;box-sizing:border-box;left:0;overflow:auto;position:fixed;right:0;top:0;z-index:999}.ngdialog *,.ngdialog:after,.ngdialog:before{box-sizing:inherit}.ngdialog.ngdialog-disabled-animation *{animation:none!important}.ngdialog.ngdialog-closing .ngdialog-content,.ngdialog.ngdialog-closing .ngdialog-overlay{-webkit-animation:ngdialog-fadeout .5s;-webkit-backface-visibility:hidden;animation:ngdialog-fadeout .5s}.ngdialog-overlay{-webkit-animation:ngdialog-fadein .5s;-webkit-backface-visibility:hidden;animation:ngdialog-fadein .5s;background:rgba(0,0,0,.4);bottom:0;left:0;position:fixed;right:0;top:0}.ngdialog-content{-webkit-animation:ngdialog-fadein .5s;-webkit-backface-visibility:hidden;animation:ngdialog-fadein .5s}body.ngdialog-open{overflow:hidden}.component-indicator{border-radius:50%;cursor:help;display:inline-block;height:16px;text-align:center;vertical-align:middle;width:16px}.component-indicator::after,.component-indicator::before{background:#fff;display:block;opacity:0;position:absolute;transition:opacity .2s linear .1s;visibility:hidden}.component-indicator::before{border:1px solid #adadad;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.4);content:attr(data-label);font-size:1.2rem;margin:30px 0 0 -10px;min-width:50px;padding:4px 5px}.component-indicator::after{border-color:#999;border-style:solid;border-width:1px 0 0 1px;box-shadow:-1px -1px 1px rgba(0,0,0,.1);content:'';height:10px;margin:9px 0 0 5px;-ms-transform:rotate(45deg);transform:rotate(45deg);width:10px}.component-indicator:hover::after,.component-indicator:hover::before{opacity:1;transition:opacity .2s linear;visibility:visible}.component-indicator span{display:block;height:16px;overflow:hidden;width:16px}.component-indicator span:before{content:'';display:block;font-family:Icons;font-size:16px;height:100%;line-height:16px;width:100%}.component-indicator._on{background:#79a22e}.component-indicator._off{background:#e22626}.component-indicator._off span:before{background:#fff;height:4px;margin:8px auto 20px;width:12px}.component-indicator._info{background:0 0}.component-indicator._info span{width:21px}.component-indicator._info span:before{color:#008bdb;content:'\e648';font-family:Icons;font-size:16px}.component-indicator._tooltip{background:0 0;margin:0 0 8px 5px}.component-indicator._tooltip a{width:21px}.component-indicator._tooltip a:hover{text-decoration:none}.component-indicator._tooltip a:before{color:#514943;content:'\e633';font-family:Icons;font-size:16px}.col-manager-item-name .data-grid-data{padding-left:5px}.col-manager-item-name .ng-hide+.data-grid-data{padding-left:24px}.col-manager-item-name ._hide-dependencies,.col-manager-item-name ._show-dependencies{cursor:pointer;padding-left:24px;position:relative}.col-manager-item-name ._hide-dependencies:before,.col-manager-item-name ._show-dependencies:before{display:block;font-family:Icons;font-size:12px;left:0;position:absolute;top:1px}.col-manager-item-name ._show-dependencies:before{content:'\e62b'}.col-manager-item-name ._hide-dependencies:before{content:'\e628'}.col-manager-item-name ._no-dependencies{padding-left:24px}.product-modules-block{font-size:1.2rem;padding:15px 0 0}.col-manager-item-name .product-modules-block{padding-left:1rem}.product-modules-descriprion,.product-modules-title{font-weight:700;margin:0 0 7px}.product-modules-list{font-size:1.1rem;list-style:none;margin:0}.col-manager-item-name .product-modules-list{margin-left:15px}.col-manager-item-name .product-modules-list li{padding:0 0 0 15px;position:relative}.product-modules-list li{margin:0 0 .5rem}.product-modules-list .component-indicator{height:10px;left:0;position:absolute;top:3px;width:10px}.module-summary{white-space:nowrap}.module-summary-title{font-size:2.1rem;margin-right:1rem}.app-updater .nav{display:block;margin-bottom:3.1rem;margin-top:-2.8rem}.app-updater .nav-bar-outer-actions{margin-top:1rem;padding-right:0}.app-updater .nav-bar-outer-actions .btn-wrap-cancel{margin-right:2.6rem}.main{padding-bottom:2rem;padding-top:3rem}.menu-wrapper .logo-static{pointer-events:none}.header{display:none}.header .logo{float:left;height:4.1rem;width:3.5rem}.header-title{font-size:2.8rem;letter-spacing:.02em;line-height:1.4;margin:2.5rem 0 3.5rem 5rem}.page-title{margin-bottom:1rem}.page-sub-title{font-size:2rem}.accent-box{margin-bottom:2rem}.accent-box .btn-prime{margin-top:1.5rem}.spinner.side{float:left;font-size:2.4rem;margin-left:2rem;margin-top:-5px}.page-landing{margin:7.6% auto 0;max-width:44rem;text-align:center}.page-landing .logo{height:5.6rem;margin-bottom:2rem;width:19.2rem}.page-landing .text-version{margin-bottom:3rem}.page-landing .text-welcome{margin-bottom:6.5rem}.page-landing .text-terms{margin-bottom:2.5rem;text-align:center}.page-landing .btn-submit,.page-license .license-text{margin-bottom:2rem}.page-license .page-license-footer{text-align:right}.readiness-check-item{margin-bottom:4rem;min-height:2.5rem}.readiness-check-item .spinner{float:left;font-size:2.5rem;margin:-.4rem 0 0 1.7rem}.readiness-check-title{font-size:1.4rem;font-weight:700;margin-bottom:.1rem;margin-left:5.7rem}.readiness-check-content{margin-left:5.7rem;margin-right:22rem;position:relative}.readiness-check-content .readiness-check-title{margin-left:0}.readiness-check-content .list{margin-top:-.3rem}.readiness-check-side{left:100%;padding-left:2.4rem;position:absolute;top:0;width:22rem}.readiness-check-side .side-title{margin-bottom:0}.readiness-check-icon{float:left;margin-left:1.7rem;margin-top:.3rem}.extensions-information{margin-bottom:5rem}.extensions-information h3{font-size:1.4rem;margin-bottom:1.3rem}.extensions-information .message{margin-bottom:2.5rem}.extensions-information .message:before{margin-top:0;top:1.8rem}.extensions-information .extensions-container{padding:0 2rem}.extensions-information .list{margin-bottom:1rem}.extensions-information .list select{cursor:pointer}.extensions-information .list select:disabled{background:#ccc;cursor:default}.extensions-information .list .extension-delete{font-size:1.7rem;padding-top:0}.delete-modal-wrap{padding:0 4% 4rem}.delete-modal-wrap h3{font-size:3.4rem;display:inline-block;font-weight:300;margin:0 0 2rem;padding:.9rem 0 0;vertical-align:top}.delete-modal-wrap .actions{padding:3rem 0 0}.page-web-configuration .form-el-insider-wrap{width:auto}.page-web-configuration .form-el-insider{width:15.4rem}.page-web-configuration .form-el-insider-input .form-el-input{width:16.5rem}.customize-your-store .advanced-modules-count,.customize-your-store .advanced-modules-select{padding-left:1.5rem}.customize-your-store .customize-your-store-advanced{min-width:0}.customize-your-store .message-error:before{margin-top:0;top:1.8rem}.customize-your-store .message-error a{color:#333;text-decoration:underline}.customize-your-store .message-error .form-label:before{background:#fff}.customize-your-store .customize-database-clean p{margin-top:2.5rem}.content-install{margin-bottom:2rem}.console{border:1px solid #ccc;font-family:'Courier New',Courier,monospace;font-weight:300;height:20rem;margin:1rem 0 2rem;overflow-y:auto;padding:1.5rem 2rem 2rem;resize:vertical}.console .text-danger{color:#e22626}.console .text-success{color:#090}.console .hidden{display:none}.content-success .btn-prime{margin-top:1.5rem}.jumbo-title{font-size:3.6rem}.jumbo-title .jumbo-icon{font-size:3.8rem;margin-right:.25em;position:relative;top:.15em}.install-database-clean{margin-top:4rem}.install-database-clean .btn{margin-right:1rem}.page-sub-title{margin-bottom:2.1rem;margin-top:3rem}.multiselect-custom{max-width:71.1rem}.content-install{margin-top:3.7rem}.home-page-inner-wrap{margin:0 auto;max-width:91rem}.setup-home-title{margin-bottom:3.9rem;padding-top:1.8rem;text-align:center}.setup-home-item{background-color:#fafafa;border:1px solid #ccc;color:#333;display:block;margin-bottom:2rem;margin-left:1.3rem;margin-right:1.3rem;min-height:30rem;padding:2rem;text-align:center}.setup-home-item:hover{border-color:#8c8c8c;color:#333;text-decoration:none;transition:border-color .1s linear}.setup-home-item:active{-ms-transform:scale(0.99);transform:scale(0.99)}.setup-home-item:before{display:block;font-size:7rem;margin-bottom:3.3rem;margin-top:4rem}.setup-home-item-component:before,.setup-home-item-extension:before{content:'\e612'}.setup-home-item-module:before{content:'\e647'}.setup-home-item-upgrade:before{content:'\e614'}.setup-home-item-configuration:before{content:'\e610'}.setup-home-item-title{display:block;font-size:1.8rem;letter-spacing:.025em;margin-bottom:1rem}.setup-home-item-description{display:block}.extension-manager-wrap{border:1px solid #bbb;margin:0 0 4rem}.extension-manager-account{font-size:2.1rem;display:inline-block;font-weight:400}.extension-manager-title{font-size:3.2rem;background-color:#f8f8f8;border-bottom:1px solid #e3e3e3;color:#41362f;font-weight:600;line-height:1.2;padding:2rem}.extension-manager-content{padding:2.5rem 2rem 2rem}.extension-manager-items{list-style:none;margin:0;text-align:center}.extension-manager-items .btn{border:1px solid #adadad;display:block;margin:1rem auto 0}.extension-manager-items .item-title{font-size:2.1rem;display:inline-block;text-align:left}.extension-manager-items .item-number{font-size:4.1rem;display:inline-block;line-height:.8;margin:0 5px 1.5rem 0;vertical-align:top}.extension-manager-items .item-date{font-size:2.6rem;margin-top:1px}.extension-manager-items .item-date-title{font-size:1.5rem}.extension-manager-items .item-install{margin:0 0 2rem}.sync-login-wrap{padding:0 10% 4rem}.sync-login-wrap .legend{font-size:2.6rem;color:#eb5202;float:left;font-weight:300;line-height:1.2;margin:-1rem 0 2.5rem;position:static;width:100%}.sync-login-wrap .legend._hidden{display:none}.sync-login-wrap .login-header{font-size:3.4rem;font-weight:300;margin:0 0 2rem}.sync-login-wrap .login-header span{display:inline-block;padding:.9rem 0 0;vertical-align:top}.sync-login-wrap h4{font-size:1.4rem;margin:0 0 2rem}.sync-login-wrap .sync-login-steps{margin:0 0 2rem 1.5rem}.sync-login-wrap .sync-login-steps li{padding:0 0 0 1rem}.sync-login-wrap .form-row .form-label{display:inline-block}.sync-login-wrap .form-row .form-label.required{padding-left:1.5rem}.sync-login-wrap .form-row .form-label.required:after{left:0;position:absolute;right:auto}.sync-login-wrap .form-row{max-width:28rem}.sync-login-wrap .form-actions{display:table;margin-top:-1.3rem}.sync-login-wrap .form-actions .links{display:table-header-group}.sync-login-wrap .form-actions .actions{padding:3rem 0 0}@media all and (max-width:1047px){.admin__menu .submenu li{min-width:19.8rem}.nav{padding-bottom:5.38rem;padding-left:1.5rem;text-align:center}.nav-bar{display:inline-block;float:none;margin-right:0;vertical-align:top}.nav .btn-group,.nav-bar-outer-actions{display:inline-block;float:none;margin-top:-8.48rem;text-align:center;vertical-align:top;width:100%}.nav-bar-outer-actions{padding-right:0}.nav-bar-outer-actions .outer-actions-inner-wrap{display:inline-block}.app-updater .nav{padding-bottom:1.7rem}.app-updater .nav-bar-outer-actions{margin-top:2rem}}@media all and (min-width:768px){.page-layout-admin-2columns-left .page-columns{margin-left:-30px}.page-layout-admin-2columns-left .page-columns:after{clear:both;content:'';display:table}.page-layout-admin-2columns-left .page-columns .main-col{width:calc((100%) * .75 - 30px);float:right}.page-layout-admin-2columns-left .page-columns .side-col{width:calc((100%) * .25 - 30px);float:left;margin-left:30px}.col-m-1,.col-m-10,.col-m-11,.col-m-12,.col-m-2,.col-m-3,.col-m-4,.col-m-5,.col-m-6,.col-m-7,.col-m-8,.col-m-9{float:left}.col-m-12{width:100%}.col-m-11{width:91.66666667%}.col-m-10{width:83.33333333%}.col-m-9{width:75%}.col-m-8{width:66.66666667%}.col-m-7{width:58.33333333%}.col-m-6{width:50%}.col-m-5{width:41.66666667%}.col-m-4{width:33.33333333%}.col-m-3{width:25%}.col-m-2{width:16.66666667%}.col-m-1{width:8.33333333%}.col-m-pull-12{right:100%}.col-m-pull-11{right:91.66666667%}.col-m-pull-10{right:83.33333333%}.col-m-pull-9{right:75%}.col-m-pull-8{right:66.66666667%}.col-m-pull-7{right:58.33333333%}.col-m-pull-6{right:50%}.col-m-pull-5{right:41.66666667%}.col-m-pull-4{right:33.33333333%}.col-m-pull-3{right:25%}.col-m-pull-2{right:16.66666667%}.col-m-pull-1{right:8.33333333%}.col-m-pull-0{right:auto}.col-m-push-12{left:100%}.col-m-push-11{left:91.66666667%}.col-m-push-10{left:83.33333333%}.col-m-push-9{left:75%}.col-m-push-8{left:66.66666667%}.col-m-push-7{left:58.33333333%}.col-m-push-6{left:50%}.col-m-push-5{left:41.66666667%}.col-m-push-4{left:33.33333333%}.col-m-push-3{left:25%}.col-m-push-2{left:16.66666667%}.col-m-push-1{left:8.33333333%}.col-m-push-0{left:auto}.col-m-offset-12{margin-left:100%}.col-m-offset-11{margin-left:91.66666667%}.col-m-offset-10{margin-left:83.33333333%}.col-m-offset-9{margin-left:75%}.col-m-offset-8{margin-left:66.66666667%}.col-m-offset-7{margin-left:58.33333333%}.col-m-offset-6{margin-left:50%}.col-m-offset-5{margin-left:41.66666667%}.col-m-offset-4{margin-left:33.33333333%}.col-m-offset-3{margin-left:25%}.col-m-offset-2{margin-left:16.66666667%}.col-m-offset-1{margin-left:8.33333333%}.col-m-offset-0{margin-left:0}.page-columns{margin-left:-30px}.page-columns:after{clear:both;content:'';display:table}.page-columns .page-inner-content{width:calc((100%) * .75 - 30px);float:right}.page-columns .page-inner-sidebar{width:calc((100%) * .25 - 30px);float:left;margin-left:30px}}@media all and (min-width:1048px){.col-l-1,.col-l-10,.col-l-11,.col-l-12,.col-l-2,.col-l-3,.col-l-4,.col-l-5,.col-l-6,.col-l-7,.col-l-8,.col-l-9{float:left}.col-l-12{width:100%}.col-l-11{width:91.66666667%}.col-l-10{width:83.33333333%}.col-l-9{width:75%}.col-l-8{width:66.66666667%}.col-l-7{width:58.33333333%}.col-l-6{width:50%}.col-l-5{width:41.66666667%}.col-l-4{width:33.33333333%}.col-l-3{width:25%}.col-l-2{width:16.66666667%}.col-l-1{width:8.33333333%}.col-l-pull-12{right:100%}.col-l-pull-11{right:91.66666667%}.col-l-pull-10{right:83.33333333%}.col-l-pull-9{right:75%}.col-l-pull-8{right:66.66666667%}.col-l-pull-7{right:58.33333333%}.col-l-pull-6{right:50%}.col-l-pull-5{right:41.66666667%}.col-l-pull-4{right:33.33333333%}.col-l-pull-3{right:25%}.col-l-pull-2{right:16.66666667%}.col-l-pull-1{right:8.33333333%}.col-l-pull-0{right:auto}.col-l-push-12{left:100%}.col-l-push-11{left:91.66666667%}.col-l-push-10{left:83.33333333%}.col-l-push-9{left:75%}.col-l-push-8{left:66.66666667%}.col-l-push-7{left:58.33333333%}.col-l-push-6{left:50%}.col-l-push-5{left:41.66666667%}.col-l-push-4{left:33.33333333%}.col-l-push-3{left:25%}.col-l-push-2{left:16.66666667%}.col-l-push-1{left:8.33333333%}.col-l-push-0{left:auto}.col-l-offset-12{margin-left:100%}.col-l-offset-11{margin-left:91.66666667%}.col-l-offset-10{margin-left:83.33333333%}.col-l-offset-9{margin-left:75%}.col-l-offset-8{margin-left:66.66666667%}.col-l-offset-7{margin-left:58.33333333%}.col-l-offset-6{margin-left:50%}.col-l-offset-5{margin-left:41.66666667%}.col-l-offset-4{margin-left:33.33333333%}.col-l-offset-3{margin-left:25%}.col-l-offset-2{margin-left:16.66666667%}.col-l-offset-1{margin-left:8.33333333%}.col-l-offset-0{margin-left:0}}@media all and (min-width:1440px){.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9{float:left}.col-xl-12{width:100%}.col-xl-11{width:91.66666667%}.col-xl-10{width:83.33333333%}.col-xl-9{width:75%}.col-xl-8{width:66.66666667%}.col-xl-7{width:58.33333333%}.col-xl-6{width:50%}.col-xl-5{width:41.66666667%}.col-xl-4{width:33.33333333%}.col-xl-3{width:25%}.col-xl-2{width:16.66666667%}.col-xl-1{width:8.33333333%}.col-xl-pull-12{right:100%}.col-xl-pull-11{right:91.66666667%}.col-xl-pull-10{right:83.33333333%}.col-xl-pull-9{right:75%}.col-xl-pull-8{right:66.66666667%}.col-xl-pull-7{right:58.33333333%}.col-xl-pull-6{right:50%}.col-xl-pull-5{right:41.66666667%}.col-xl-pull-4{right:33.33333333%}.col-xl-pull-3{right:25%}.col-xl-pull-2{right:16.66666667%}.col-xl-pull-1{right:8.33333333%}.col-xl-pull-0{right:auto}.col-xl-push-12{left:100%}.col-xl-push-11{left:91.66666667%}.col-xl-push-10{left:83.33333333%}.col-xl-push-9{left:75%}.col-xl-push-8{left:66.66666667%}.col-xl-push-7{left:58.33333333%}.col-xl-push-6{left:50%}.col-xl-push-5{left:41.66666667%}.col-xl-push-4{left:33.33333333%}.col-xl-push-3{left:25%}.col-xl-push-2{left:16.66666667%}.col-xl-push-1{left:8.33333333%}.col-xl-push-0{left:auto}.col-xl-offset-12{margin-left:100%}.col-xl-offset-11{margin-left:91.66666667%}.col-xl-offset-10{margin-left:83.33333333%}.col-xl-offset-9{margin-left:75%}.col-xl-offset-8{margin-left:66.66666667%}.col-xl-offset-7{margin-left:58.33333333%}.col-xl-offset-6{margin-left:50%}.col-xl-offset-5{margin-left:41.66666667%}.col-xl-offset-4{margin-left:33.33333333%}.col-xl-offset-3{margin-left:25%}.col-xl-offset-2{margin-left:16.66666667%}.col-xl-offset-1{margin-left:8.33333333%}.col-xl-offset-0{margin-left:0}}@media all and (max-width:767px){.abs-clearer-mobile:after,.nav-bar:after{clear:both;content:'';display:table}.list-definition>dt{float:none}.list-definition>dd{margin-left:0}.form-row .form-label{text-align:left}.form-row .form-label.required:after{position:static}.nav{padding-bottom:0;padding-left:0;padding-right:0}.nav-bar-outer-actions{margin-top:0}.nav-bar{display:block;margin-bottom:0;margin-left:auto;margin-right:auto;width:30.9rem}.nav-bar:before{display:none}.nav-bar>li{float:left;min-height:9rem}.nav-bar>li:after{display:none}.nav-bar>li:nth-child(4n){clear:both}.nav-bar a{line-height:1.4}.tooltip{display:none!important}.readiness-check-content{margin-right:2rem}.readiness-check-side{padding:2rem 0;position:static}.form-el-insider,.form-el-insider-wrap,.page-web-configuration .form-el-insider-input,.page-web-configuration .form-el-insider-input .form-el-input{display:block;width:100%}}@media all and (max-width:479px){.nav-bar{width:23.175rem}.nav-bar>li{width:7.725rem}.nav .btn-group .btn-wrap-try-again,.nav-bar-outer-actions .btn-wrap-try-again{clear:both;display:block;float:none;margin-left:auto;margin-right:auto;margin-top:1rem;padding-top:1rem}}
\ No newline at end of file
diff --git a/setup/src/Magento/Setup/Controller/CompleteBackup.php b/setup/src/Magento/Setup/Controller/CompleteBackup.php
index d8996cca7fe642f8011df06ce8f6e0764259f937..f194f02ed1fc96209bbc11a5b7da22cd7e0fe65d 100644
--- a/setup/src/Magento/Setup/Controller/CompleteBackup.php
+++ b/setup/src/Magento/Setup/Controller/CompleteBackup.php
@@ -18,8 +18,8 @@ class CompleteBackup extends AbstractActionController
     public function indexAction()
     {
         $view = new ViewModel;
-        $view->setTerminal(true);
-        $view->setTemplate('/magento/setup/complete-backup.phtml');
+        $view->setTemplate('/error/404.phtml');
+        $this->getResponse()->setStatusCode(\Zend\Http\Response::STATUS_CODE_404);
         return $view;
     }
 
diff --git a/setup/src/Magento/Setup/Controller/InstallExtensionGrid.php b/setup/src/Magento/Setup/Controller/InstallExtensionGrid.php
index a3f5a9992a35f029f765788075eae2585b73b278..0821b6ab2ffd74b412daa1f1e0f67cbe5bdacb12 100644
--- a/setup/src/Magento/Setup/Controller/InstallExtensionGrid.php
+++ b/setup/src/Magento/Setup/Controller/InstallExtensionGrid.php
@@ -10,7 +10,6 @@ use Zend\Mvc\Controller\AbstractActionController;
 use Zend\View\Model\JsonModel;
 use Zend\View\Model\ViewModel;
 use Magento\Setup\Model\PackagesData;
-use \Magento\Setup\Model\Grid\TypeMapper;
 
 /**
  * Controller for extensions grid tasks
@@ -22,21 +21,13 @@ class InstallExtensionGrid extends AbstractActionController
      */
     private $packagesData;
 
-    /**
-     * @var TypeMapper
-     */
-    private $typeMapper;
-
     /**
      * @param PackagesData $packagesData
-     * @param TypeMapper $typeMapper
      */
     public function __construct(
-        PackagesData $packagesData,
-        TypeMapper $typeMapper
+        PackagesData $packagesData
     ) {
         $this->packagesData = $packagesData;
-        $this->typeMapper = $typeMapper;
     }
 
     /**
@@ -60,10 +51,7 @@ class InstallExtensionGrid extends AbstractActionController
     {
         $extensions = $this->packagesData->getPackagesForInstall();
         $packages = isset($extensions['packages']) ? $extensions['packages'] : [];
-        array_walk($packages, function (&$package) {
-            $package['vendor'] = ucfirst($package['vendor']);
-            $package['type'] =  $this->typeMapper->map($package['name'], $package['type']);
-        });
+        $packages = $this->formatPackageList($packages);
 
         return new JsonModel(
             [
@@ -73,4 +61,19 @@ class InstallExtensionGrid extends AbstractActionController
             ]
         );
     }
+
+    /**
+     * Format package list
+     *
+     * @param array $packages
+     * @return array
+     */
+    private function formatPackageList(array $packages)
+    {
+        array_walk($packages, function (&$package) {
+            $package['vendor'] = ucfirst($package['vendor']);
+        });
+
+        return $packages;
+    }
 }
diff --git a/setup/src/Magento/Setup/Model/Grid/Extension.php b/setup/src/Magento/Setup/Model/Grid/Extension.php
index 8ac59a5244d921e23ab82bcf9f211e5030cb3e7f..d46a112cc8be4e06b8b3fa8e7185a012fea0df02 100644
--- a/setup/src/Magento/Setup/Model/Grid/Extension.php
+++ b/setup/src/Magento/Setup/Model/Grid/Extension.php
@@ -18,11 +18,6 @@ class Extension
      */
     private $composerInformation;
 
-    /**
-     * @var TypeMapper
-     */
-    private $typeMapper;
-
     /**
      * @var PackagesData
      */
@@ -31,16 +26,13 @@ class Extension
     /**
      * @param ComposerInformation $composerInformation
      * @param PackagesData $packagesData
-     * @param TypeMapper $typeMapper
      */
     public function __construct(
         ComposerInformation $composerInformation,
-        PackagesData $packagesData,
-        TypeMapper $typeMapper
+        PackagesData $packagesData
     ) {
         $this->composerInformation = $composerInformation;
         $this->packagesData = $packagesData;
-        $this->typeMapper = $typeMapper;
     }
 
     /**
@@ -89,7 +81,6 @@ class Extension
     {
         foreach ($extensions as &$extension) {
             $extension['vendor'] = ucfirst(current(explode('/', $extension['name'])));
-            $extension['type'] = $this->typeMapper->map($extension['name'], $extension['type']);
         }
         return array_values($extensions);
     }
diff --git a/setup/src/Magento/Setup/Model/Grid/Module.php b/setup/src/Magento/Setup/Model/Grid/Module.php
index 269367779e7f133e46c87896038b2d80bb5e413e..bda7e001d6ad0ea896b8bd7738bd58313fe2cb9f 100644
--- a/setup/src/Magento/Setup/Model/Grid/Module.php
+++ b/setup/src/Magento/Setup/Model/Grid/Module.php
@@ -3,10 +3,12 @@
  * Copyright © 2016 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */
-
 namespace Magento\Setup\Model\Grid;
 
 use Magento\Framework\Composer\ComposerInformation;
+use Magento\Framework\Module\ModuleList;
+use Magento\Framework\Module\PackageInfoFactory;
+use Magento\Setup\Model\PackagesData;
 
 /**
  * Module grid
@@ -46,41 +48,33 @@ class Module
     /**
      * Module info
      *
-     * @var \Magento\Framework\Module\ModuleList
+     * @var ModuleList
      */
     private $moduleList;
 
     /**
-     * @var TypeMapper
-     */
-    private $typeMapper;
-
-    /**
-     * @var \Magento\Setup\Model\PackagesData
+     * @var PackagesData
      */
     private $packagesData;
 
     /**
      * @param ComposerInformation $composerInformation
      * @param \Magento\Framework\Module\FullModuleList $fullModuleList
-     * @param \Magento\Framework\Module\ModuleList $moduleList
+     * @param ModuleList $moduleList
      * @param \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider
-     * @param TypeMapper $typeMapper
-     * @param \Magento\Setup\Model\PackagesData $packagesData
+     * @param PackagesData $packagesData
      */
     public function __construct(
         ComposerInformation $composerInformation,
         \Magento\Framework\Module\FullModuleList $fullModuleList,
-        \Magento\Framework\Module\ModuleList $moduleList,
+        ModuleList $moduleList,
         \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider,
-        TypeMapper $typeMapper,
-        \Magento\Setup\Model\PackagesData $packagesData
+        PackagesData $packagesData
     ) {
         $this->composerInformation = $composerInformation;
         $this->fullModuleList = $fullModuleList;
         $this->moduleList = $moduleList;
         $this->objectManagerProvider = $objectManagerProvider;
-        $this->typeMapper = $typeMapper;
         $this->packagesData = $packagesData;
     }
 
@@ -92,46 +86,82 @@ class Module
     public function getList()
     {
         $this->packageInfo = $this->objectManagerProvider->get()
-            ->get(\Magento\Framework\Module\PackageInfoFactory::class)
+            ->get(PackageInfoFactory::class)
             ->create();
 
         $items = array_replace_recursive(
+            $this->getModuleListFromComposer(),
+            $this->getFullModuleList()
+        );
+
+        $items = $this->addRequiredBy($this->addGeneralInfo($items));
+
+        return $items;
+    }
+
+    /**
+     * Get module list from composer
+     *
+     * @return array
+     */
+    private function getModuleListFromComposer()
+    {
+        return array_filter(
             $this->composerInformation->getInstalledMagentoPackages(),
-            $this->getInstalledModules()
+            function ($item) {
+                return $item['type'] === ComposerInformation::MODULE_PACKAGE_TYPE;
+            }
         );
+    }
 
-        $items = array_filter($items, function ($item) {
-            return $item['type'] === ComposerInformation::MODULE_PACKAGE_TYPE;
-        });
+    /**
+     * Get full module list
+     *
+     * @return array
+     */
+    private function getFullModuleList()
+    {
+        return $this->getModulesInfo(
+            $this->fullModuleList->getNames()
+        );
+    }
 
-        array_walk($items, function (&$module, $name) {
-            $module['moduleName'] = $module['moduleName'] ?: $this->packageInfo->getModuleName($name);
-            $module['enable'] = $this->moduleList->has($module['moduleName']);
-            $module['vendor'] = ucfirst(current(preg_split('%[/_]%', $name)));
-            $module['type'] = $this->typeMapper->map($name, $module['type']);
-            $module['requiredBy'] = $this->getModuleRequiredBy($name);
-        });
+    /**
+     * Add all modules, extensions, metapackages a module required by
+     *
+     * @param array $items
+     * @return array
+     */
+    private function addRequiredBy(array $items)
+    {
+        foreach ($items as $key => $item) {
+            $items[$key]['requiredBy'] = $item['name'] != self::UNKNOWN_PACKAGE_NAME ?
+                $this->addGeneralInfo(
+                    $this->getModulesInfo(
+                        $this->packageInfo->getRequiredBy($item['name'])
+                    )
+                ) : [];
+        }
 
-        return array_values($items);
+        return $items;
     }
 
     /**
-     * Get all modules, extensions, metapackages a module required by
-     * 
-     * @param string $name Module name
+     * Get modules info
+     *
+     * @param array $moduleList
      * @return array
      */
-    private function getModuleRequiredBy($name)
+    private function getModulesInfo(array $moduleList)
     {
         $result = [];
-        $modules = $this->packageInfo->getRequiredBy($name);
-        foreach ($modules as $moduleName) {
+        foreach ($moduleList as $moduleName) {
             $packageName = $this->packageInfo->getPackageName($moduleName);
-            $result[] = [
+            $key = $packageName ?: $moduleName;
+            $result[$key] = [
                 'name' => $packageName ?: self::UNKNOWN_PACKAGE_NAME,
                 'moduleName' => $moduleName,
-                'type' => $this->typeMapper->map($packageName, ComposerInformation::MODULE_PACKAGE_TYPE),
-                'enable' => $this->moduleList->has($moduleName),
+                'type' => ComposerInformation::MODULE_PACKAGE_TYPE,
                 'version' => $this->packageInfo->getVersion($moduleName) ?: self::UNKNOWN_VERSION,
             ];
         }
@@ -140,23 +170,21 @@ class Module
     }
 
     /**
-     * Get full list of installed modules
+     * Add general info to result array
      *
+     * @param array $items
      * @return array
      */
-    private function getInstalledModules()
+    private function addGeneralInfo(array $items)
     {
-        $modules = [];
-        $allModules = $this->fullModuleList->getNames();
-        foreach ($allModules as $module) {
-            $packageName = $this->packageInfo->getPackageName($module);
-            $name = $packageName ?: $module;
-            $modules[$name]['name'] = $packageName ?: self::UNKNOWN_PACKAGE_NAME;
-            $modules[$name]['moduleName'] = $module;
-            $modules[$name]['type'] = ComposerInformation::MODULE_PACKAGE_TYPE;
-            $modules[$name]['version'] = $this->packageInfo->getVersion($module) ?: self::UNKNOWN_VERSION;
+        foreach ($items as &$item) {
+            $item['moduleName'] = $item['moduleName'] ?: $this->packageInfo->getModuleName($item['name']);
+            $item['enable'] = $this->moduleList->has($item['moduleName']);
+            $vendorSource = $item['name'] == self::UNKNOWN_PACKAGE_NAME ? $item['moduleName'] : $item['name'];
+            $item['vendor'] = ucfirst(current(preg_split('%[/_]%', $vendorSource)));
+            $item = $this->packagesData->addPackageExtraInfo($item);
         }
 
-        return $modules;
+        return array_values($items);
     }
 }
diff --git a/setup/src/Magento/Setup/Model/Grid/TypeMapper.php b/setup/src/Magento/Setup/Model/Grid/TypeMapper.php
index 962baa79f2435f76387b1d56fa0c4214db9f09b1..5c31c9a183d12409cde5faa19acfc352121a9cfe 100644
--- a/setup/src/Magento/Setup/Model/Grid/TypeMapper.php
+++ b/setup/src/Magento/Setup/Model/Grid/TypeMapper.php
@@ -17,65 +17,34 @@ class TypeMapper
      */
     const UNDEFINED_PACKAGE_TYPE = 'Undefined';
     const EXTENSION_PACKAGE_TYPE = 'Extension';
+    const THEME_PACKAGE_TYPE = 'Theme';
+    const MODULE_PACKAGE_TYPE = 'Module';
+    const LANGUAGE_PACKAGE_TYPE = 'Language';
+    const METAPACKAGE_PACKAGE_TYPE = 'Metapackage';
+    const COMPONENT_PACKAGE_TYPE = 'Component';
+    const LIBRARY_PACKAGE_TYPE = 'Library';
     /**#@-*/
-    
-    /**
-     * @var ComposerInformation
-     */
-    private $composerInformation;
-
-    /**
-     * @var array
-     */
-    private $rootRequires;
 
     /** @var array */
     private $packageTypesMap = [
-        ComposerInformation::THEME_PACKAGE_TYPE => 'Theme',
-        ComposerInformation::LANGUAGE_PACKAGE_TYPE => 'Language',
-        ComposerInformation::MODULE_PACKAGE_TYPE => 'Module',
-        ComposerInformation::METAPACKAGE_PACKAGE_TYPE => 'Metapackage',
-        ComposerInformation::COMPONENT_PACKAGE_TYPE => 'Component',
-        ComposerInformation::LIBRARY_PACKAGE_TYPE => 'Library'
+        ComposerInformation::THEME_PACKAGE_TYPE => self::THEME_PACKAGE_TYPE,
+        ComposerInformation::LANGUAGE_PACKAGE_TYPE => self::LANGUAGE_PACKAGE_TYPE,
+        ComposerInformation::MODULE_PACKAGE_TYPE => self::MODULE_PACKAGE_TYPE,
+        ComposerInformation::METAPACKAGE_PACKAGE_TYPE => self::METAPACKAGE_PACKAGE_TYPE,
+        ComposerInformation::COMPONENT_PACKAGE_TYPE => self::COMPONENT_PACKAGE_TYPE,
+        ComposerInformation::LIBRARY_PACKAGE_TYPE => self::LIBRARY_PACKAGE_TYPE
     ];
 
-    /**
-     * TypeMapper constructor.
-     * @param ComposerInformation $composerInformation
-     */
-    public function __construct(
-        ComposerInformation $composerInformation
-    ) {
-        $this->composerInformation = $composerInformation;
-    }
-
     /**
      * Retrieve package type for a grid.
      *
-     * @param string $packageName
      * @param string $packageType
      * @return string
+     * @internal param string $packageName
      */
-    public function map($packageName, $packageType)
+    public function map($packageType)
     {
-        if (in_array($packageName, $this->getRootRequires())
-            && $packageType == ComposerInformation::MODULE_PACKAGE_TYPE
-        ) {
-            return self::EXTENSION_PACKAGE_TYPE;
-        }
-
         return isset($this->packageTypesMap[$packageType]) ?
             $this->packageTypesMap[$packageType] : self::UNDEFINED_PACKAGE_TYPE;
     }
-
-    /**
-     * @return array
-     */
-    private function getRootRequires()
-    {
-        if ($this->rootRequires === null) {
-            $this->rootRequires = array_keys($this->composerInformation->getRootPackage()->getRequires());
-        }
-        return $this->rootRequires;
-    }
 }
diff --git a/setup/src/Magento/Setup/Model/PackagesData.php b/setup/src/Magento/Setup/Model/PackagesData.php
index 0138212ef39b0137bf3649a42e219d49c1a7b535..701393fd9666102147c5921ad1831a69488ba8fb 100644
--- a/setup/src/Magento/Setup/Model/PackagesData.php
+++ b/setup/src/Magento/Setup/Model/PackagesData.php
@@ -5,10 +5,9 @@
  */
 namespace Magento\Setup\Model;
 
-use Magento\Framework\Composer\ComposerInformation;
-
 /**
  * Class PackagesData returns system packages and available for update versions
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class PackagesData
 {
@@ -22,7 +21,7 @@ class PackagesData
     /**#@-*/
 
     /**
-     * @var ComposerInformation
+     * @var \Magento\Framework\Composer\ComposerInformation
      */
     private $composerInformation;
 
@@ -64,24 +63,27 @@ class PackagesData
     /**
      * PackagesData constructor.
      *
-     * @param ComposerInformation $composerInformation,
-     * @param \Magento\Setup\Model\DateTime\TimeZoneProvider $timeZoneProvider,
-     * @param \Magento\Setup\Model\PackagesAuth $packagesAuth,
-     * @param \Magento\Framework\Filesystem $filesystem,
+     * @param \Magento\Framework\Composer\ComposerInformation $composerInformation ,
+     * @param \Magento\Setup\Model\DateTime\TimeZoneProvider $timeZoneProvider ,
+     * @param \Magento\Setup\Model\PackagesAuth $packagesAuth ,
+     * @param \Magento\Framework\Filesystem $filesystem ,
      * @param \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider
+     * @param TypeMapper $typeMapper
      */
     public function __construct(
-        ComposerInformation $composerInformation,
+        \Magento\Framework\Composer\ComposerInformation $composerInformation,
         \Magento\Setup\Model\DateTime\TimeZoneProvider $timeZoneProvider,
         \Magento\Setup\Model\PackagesAuth $packagesAuth,
         \Magento\Framework\Filesystem $filesystem,
-        \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider
+        \Magento\Setup\Model\ObjectManagerProvider $objectManagerProvider,
+        \Magento\Setup\Model\Grid\TypeMapper $typeMapper
     ) {
         $this->objectManagerProvider = $objectManagerProvider;
         $this->composerInformation = $composerInformation;
         $this->timeZoneProvider = $timeZoneProvider;
         $this->packagesAuth = $packagesAuth;
         $this->filesystem = $filesystem;
+        $this->typeMapper = $typeMapper;
     }
 
     /**
@@ -174,10 +176,16 @@ class PackagesData
      */
     public function getInstalledPackages()
     {
-        return array_intersect_key(
+        $installedPackages = array_intersect_key(
             $this->composerInformation->getInstalledMagentoPackages(),
             $this->composerInformation->getRootPackage()->getRequires()
         );
+
+        foreach ($installedPackages as &$package) {
+            $package = $this->addPackageExtraInfo($package);
+        }
+
+        return $this->filterPackagesList($installedPackages);
     }
 
     /**
@@ -273,22 +281,57 @@ class PackagesData
                     ksort($package);
                     $packageValues = array_values($package);
                     if ($this->isNewUserPackage($packageValues[0], $packageNames)) {
-                        $versions = array_reverse(array_keys($package));
+                        uksort($package, 'version_compare');
                         $installPackage = $packageValues[0];
-                        $installPackage['versions'] = $versions;
+                        $installPackage['versions'] = array_reverse(array_keys($package));
                         $installPackage['name'] = $packageName;
                         $installPackage['vendor'] = explode('/', $packageName)[0];
-                        $installPackages[$packageName] = $installPackage;
+                        $installPackages[$packageName] = $this->addPackageExtraInfo($installPackage);
                     }
                 }
             }
-            $packagesForInstall['packages'] = $installPackages;
+            $packagesForInstall['packages'] = $this->filterPackagesList($installPackages);
             return $packagesForInstall;
         } catch (\Exception $e) {
             throw new \RuntimeException('Error in syncing packages for Install');
         }
     }
 
+    /**
+     * Get package extra info
+     *
+     * @param string $packageName
+     * @param string $packageVersion
+     * @return array
+     */
+    private function getPackageExtraInfo($packageName, $packageVersion)
+    {
+        $packagesJson = $this->getPackagesJson();
+
+        return isset($packagesJson[$packageName][$packageVersion]['extra']) ?
+            $packagesJson[$packageName][$packageVersion]['extra'] : [] ;
+    }
+
+    /**
+     * Add package extra info
+     *
+     * @param array $package
+     * @return array
+     */
+    public function addPackageExtraInfo(array $package)
+    {
+        $extraInfo = $this->getPackageExtraInfo($package['name'], $package['version']);
+
+        $package['package_title'] =  isset($extraInfo['x-magento-ext-title']) ?
+            $extraInfo['x-magento-ext-title'] : $package['name'];
+        $package['package_type'] = isset($extraInfo['x-magento-ext-type']) ? $extraInfo['x-magento-ext-type'] :
+            $this->typeMapper->map($package['type']);
+        $package['package_link'] = isset($extraInfo['x-magento-ext-package-link']) ?
+            $extraInfo['x-magento-ext-package-link'] : '';
+
+        return $package;
+    }
+
     /**
      * Check if this new user package
      *
@@ -353,6 +396,31 @@ class PackagesData
     }
 
     /**
+     * Filter packages by allowed types
+     *
+     * @param array $packages
+     * @return array
+     */
+    private function filterPackagesList(array $packages)
+    {
+        return array_filter(
+            $packages,
+            function ($item) {
+                return in_array(
+                    $item['package_type'],
+                    [
+                        \Magento\Setup\Model\Grid\TypeMapper::MODULE_PACKAGE_TYPE,
+                        \Magento\Setup\Model\Grid\TypeMapper::EXTENSION_PACKAGE_TYPE,
+                        \Magento\Setup\Model\Grid\TypeMapper::THEME_PACKAGE_TYPE,
+                        \Magento\Setup\Model\Grid\TypeMapper::METAPACKAGE_PACKAGE_TYPE
+                    ]
+                );
+            }
+        );
+    }
+
+    /**
+     * Get MetaPackage for package
      *
      * @param array $packages
      * @return array
@@ -361,7 +429,7 @@ class PackagesData
     {
         $result = [];
         foreach ($packages as $package) {
-            if ($package['type'] == ComposerInformation::METAPACKAGE_PACKAGE_TYPE) {
+            if ($package['type'] == \Magento\Framework\Composer\ComposerInformation::METAPACKAGE_PACKAGE_TYPE) {
                 if (isset($package['require'])) {
                     foreach ($package['require'] as $key => $requirePackage) {
                         $result[$key] = $package['name'];
@@ -385,7 +453,7 @@ class PackagesData
             $packages = $this->getPackagesJson();
             array_walk($packages, function ($packageVersions) {
                 $package = array_shift($packageVersions);
-                if ($package['type'] == ComposerInformation::METAPACKAGE_PACKAGE_TYPE
+                if ($package['type'] == \Magento\Framework\Composer\ComposerInformation::METAPACKAGE_PACKAGE_TYPE
                     && isset($package['require'])
                 ) {
                     foreach (array_keys($package['require']) as $key) {
diff --git a/setup/src/Magento/Setup/Module/Setup.php b/setup/src/Magento/Setup/Module/Setup.php
index 4451267a0e9aa065df3f0748a51f162886d2d043..39fa5cbda13adb4c88ed30bc377b26efae26b4de 100644
--- a/setup/src/Magento/Setup/Module/Setup.php
+++ b/setup/src/Magento/Setup/Module/Setup.php
@@ -6,6 +6,7 @@
 namespace Magento\Setup\Module;
 
 use Magento\Framework\Setup\SchemaSetupInterface;
+use Magento\Framework\App\ResourceConnection;
 
 class Setup extends \Magento\Framework\Module\Setup implements SchemaSetupInterface
 {
@@ -15,11 +16,16 @@ class Setup extends \Magento\Framework\Module\Setup implements SchemaSetupInterf
      * @param string $tableName
      * @param array|string $fields
      * @param string $indexType
+     * @param string $connectionName
      * @return string
      */
-    public function getIdxName($tableName, $fields, $indexType = '')
-    {
-        return $this->getConnection()->getIndexName($tableName, $fields, $indexType);
+    public function getIdxName(
+        $tableName,
+        $fields,
+        $indexType = '',
+        $connectionName = ResourceConnection::DEFAULT_CONNECTION
+    ) {
+        return $this->getConnection($connectionName)->getIndexName($tableName, $fields, $indexType);
     }
 
     /**
@@ -29,10 +35,21 @@ class Setup extends \Magento\Framework\Module\Setup implements SchemaSetupInterf
      * @param string $priColumnName the target table column name
      * @param string $refTableName  the reference table name
      * @param string $refColumnName the reference table column name
+     * @param string $connectionName
      * @return string
      */
-    public function getFkName($priTableName, $priColumnName, $refTableName, $refColumnName)
-    {
-        return $this->getConnection()->getForeignKeyName($priTableName, $priColumnName, $refTableName, $refColumnName);
+    public function getFkName(
+        $priTableName,
+        $priColumnName,
+        $refTableName,
+        $refColumnName,
+        $connectionName = ResourceConnection::DEFAULT_CONNECTION
+    ) {
+        return $this->getConnection($connectionName)->getForeignKeyName(
+            $priTableName,
+            $priColumnName,
+            $refTableName,
+            $refColumnName
+        );
     }
 }
diff --git a/setup/src/Magento/Setup/Test/Unit/Controller/CompleteBackupTest.php b/setup/src/Magento/Setup/Test/Unit/Controller/CompleteBackupTest.php
index 7101629502cb26f3350e33da6d2082ff31ae6d55..efe87a98889e047c3b14c2a9977adff0f0c96017 100644
--- a/setup/src/Magento/Setup/Test/Unit/Controller/CompleteBackupTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Controller/CompleteBackupTest.php
@@ -26,8 +26,11 @@ class CompleteBackupTest extends \PHPUnit_Framework_TestCase
     {
         $viewModel = $this->controller->indexAction();
         $this->assertInstanceOf(\Zend\View\Model\ViewModel::class, $viewModel);
-        $this->assertTrue($viewModel->terminate());
-        $this->assertSame('/magento/setup/complete-backup.phtml', $viewModel->getTemplate());
+        $this->assertSame('/error/404.phtml', $viewModel->getTemplate());
+        $this->assertSame(
+            \Zend\Http\Response::STATUS_CODE_404,
+            $this->controller->getResponse()->getStatusCode()
+        );
     }
 
     public function testProgressAction()
diff --git a/setup/src/Magento/Setup/Test/Unit/Controller/InstallExtensionGridTest.php b/setup/src/Magento/Setup/Test/Unit/Controller/InstallExtensionGridTest.php
index 9b091b0bc1203c140cfdc7e83f0371fcb4009b5c..166942a695db12fd1e912a44aaff15278fd56f5e 100644
--- a/setup/src/Magento/Setup/Test/Unit/Controller/InstallExtensionGridTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Controller/InstallExtensionGridTest.php
@@ -7,8 +7,8 @@
 namespace Magento\Setup\Test\Unit\Controller;
 
 use Magento\Setup\Controller\InstallExtensionGrid;
-use Magento\Setup\Model\Grid\TypeMapper;
 use Magento\Setup\Model\PackagesData;
+use Magento\Framework\Composer\ComposerInformation;
 
 class InstallExtensionGridTest extends \PHPUnit_Framework_TestCase
 {
@@ -24,23 +24,14 @@ class InstallExtensionGridTest extends \PHPUnit_Framework_TestCase
      */
     private $packagesData;
 
-    /**
-     * @var TypeMapper|\PHPUnit_Framework_MockObject_MockObject
-     */
-    private $typeMapperMock;
-
     public function setUp()
     {
         $this->packagesData = $this->getMockBuilder(PackagesData::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $this->typeMapperMock = $this->getMockBuilder(TypeMapper::class)
-            ->disableOriginalConstructor()
-            ->getMock();
 
         $this->controller = new InstallExtensionGrid(
-            $this->packagesData,
-            $this->typeMapperMock
+            $this->packagesData
         );
     }
 
@@ -63,9 +54,6 @@ class InstallExtensionGridTest extends \PHPUnit_Framework_TestCase
         $this->packagesData->expects(static::once())
             ->method('getPackagesForInstall')
             ->willReturn($extensions);
-        $this->typeMapperMock->expects(static::exactly(4))
-            ->method('map')
-            ->willReturn($extensions);
 
         $jsonModel = $this->controller->extensionsAction();
         static::assertInstanceOf(\Zend\View\Model\JsonModel::class, $jsonModel);
@@ -84,25 +72,25 @@ class InstallExtensionGridTest extends \PHPUnit_Framework_TestCase
         $extensions['packages'] = [
             'magento/testing-extension' => [
                 'name' => 'magento/testing-extension',
-                'type' => 'module',
+                'type' => ComposerInformation::MODULE_PACKAGE_TYPE,
                 'vendor' => 'magento',
                 'version' => '2.2.2',
                 'author' => 'magento'],
             'magento/my-first-module' => [
                 'name' => 'magento/my-first-module',
-                'type' => 'module',
+                'type' => ComposerInformation::MODULE_PACKAGE_TYPE,
                 'vendor' => 'magento',
                 'version' => '2.0.0',
                 'author' => 'magento'],
             'magento/last-extension' => [
-                'name' => 'magento/last-extension',
-                'type' => 'module',
+                'name' => 'magento/theme',
+                'type' => ComposerInformation::THEME_PACKAGE_TYPE,
                 'vendor' => 'magento',
                 'version' => '2.1.1',
                 'author' => 'magento'],
             'magento/magento-second-module' => [
                 'name' => 'magento/magento-second-module',
-                'type' => 'module',
+                'type' => ComposerInformation::COMPONENT_PACKAGE_TYPE,
                 'vendor' => 'magento',
                 'version' => '2.0.0',
                 'author' => 'magento']
diff --git a/setup/src/Magento/Setup/Test/Unit/Controller/UpdateExtensionGridTest.php b/setup/src/Magento/Setup/Test/Unit/Controller/UpdateExtensionGridTest.php
index a76e9bca63c46dd067a074082ff8c8449aa38f4b..d67f923b27ef53a1ff870b8df559709b5fddd156 100644
--- a/setup/src/Magento/Setup/Test/Unit/Controller/UpdateExtensionGridTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Controller/UpdateExtensionGridTest.php
@@ -50,6 +50,7 @@ class UpdateExtensionGridTest extends \PHPUnit_Framework_TestCase
         $extensionData = [
             [
                 'name' => 'magento-package-1',
+                'product_name' => 'magento/package-1',
                 'type' => 'magento2-module',
                 'version' => '1.0.0',
                 'latestVersion' => '2.0.5',
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Grid/ExtensionTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Grid/ExtensionTest.php
index 6e2963fd063d13dcf6ca204f64c3b6d6aa5dda4d..b80423718e0b6a286f0ea91a86cb9013fca4931a 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Grid/ExtensionTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Grid/ExtensionTest.php
@@ -5,10 +5,8 @@
  */
 namespace Magento\Setup\Test\Unit\Model\Grid;
 
-use Composer\Package\RootPackage;
 use Magento\Framework\Composer\ComposerInformation;
 use Magento\Setup\Model\Grid\Extension;
-use Magento\Setup\Model\Grid\TypeMapper;
 use Magento\Setup\Model\PackagesData;
 use PHPUnit_Framework_MockObject_MockObject as MockObject;
 
@@ -22,11 +20,6 @@ class ExtensionTest extends \PHPUnit_Framework_TestCase
      */
     private $composerInformationMock;
 
-    /**
-     * @var TypeMapper|MockObject
-     */
-    private $typeMapperMock;
-
     /**
      * @var PackagesData|MockObject
      */
@@ -44,17 +37,13 @@ class ExtensionTest extends \PHPUnit_Framework_TestCase
         $this->composerInformationMock =  $this->getMockBuilder(ComposerInformation::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $this->typeMapperMock = $this->getMockBuilder(TypeMapper::class)
-            ->disableOriginalConstructor()
-            ->getMock();
         $this->packagesDataMock = $this->getMockBuilder(PackagesData::class)
             ->disableOriginalConstructor()
             ->getMock();
 
         $this->model = new Extension(
             $this->composerInformationMock,
-            $this->packagesDataMock,
-            $this->typeMapperMock
+            $this->packagesDataMock
         );
     }
 
@@ -63,9 +52,6 @@ class ExtensionTest extends \PHPUnit_Framework_TestCase
         $this->composerInformationMock->expects($this->any())
             ->method('isPackageInComposerJson')
             ->willReturn(true);
-        $this->typeMapperMock->expects($this->any())
-            ->method('map')
-            ->willReturn('Extension');
         $this->packagesDataMock->expects($this->once())
             ->method('getInstalledPackages')
             ->willReturn(
@@ -73,11 +59,17 @@ class ExtensionTest extends \PHPUnit_Framework_TestCase
                     'magento/package-1' => [
                         'name' => 'magento/package-1',
                         'type' => 'magento2-module',
+                        'package_title' => 'packageTitle',
+                        'package_type' => 'packageType',
+                        'package_link' => 'http://example.com',
                         'version' => '1.0.0'
                     ],
                     'magento/package-2' => [
                         'name' => 'magento/package-2',
                         'type' => 'magento2-module',
+                        'package_title' => 'packageTitle',
+                        'package_type' => 'packageType',
+                        'package_link' => 'http://example.com',
                         'version' => '1.0.1'
                     ],
                 ]
@@ -93,19 +85,25 @@ class ExtensionTest extends \PHPUnit_Framework_TestCase
         $expected = [
             [
                 'name' => 'magento/package-1',
-                'type' => 'Extension',
+                'type' => 'magento2-module',
+                'package_title' => 'packageTitle',
+                'package_type' => 'packageType',
                 'version' => '1.0.0',
                 'update' => true,
                 'uninstall' => true,
                 'vendor' => 'Magento',
+                'package_link' => 'http://example.com'
             ],
             [
                 'name' => 'magento/package-2',
-                'type' => 'Extension',
+                'type' => 'magento2-module',
+                'package_title' => 'packageTitle',
+                'package_type' => 'packageType',
                 'version' => '1.0.1',
                 'update' => false,
                 'uninstall' => true,
                 'vendor' => 'Magento',
+                'package_link' => 'http://example.com'
             ],
         ];
 
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Grid/ModuleTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Grid/ModuleTest.php
index 26df267532f0b6befec6d691a2de71aa47101779..3d85b2168c57556de4c74ce5a8486fc729592167 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Grid/ModuleTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Grid/ModuleTest.php
@@ -13,7 +13,6 @@ use Magento\Framework\Module\PackageInfo;
 use Magento\Framework\Module\PackageInfoFactory;
 use Magento\Framework\ObjectManagerInterface;
 use Magento\Setup\Model\Grid\Module;
-use Magento\Setup\Model\Grid\TypeMapper;
 use Magento\Setup\Model\ObjectManagerProvider;
 use Magento\Setup\Model\PackagesData;
 
@@ -55,11 +54,6 @@ class ModuleTest extends \PHPUnit_Framework_TestCase
      */
     private $objectManagerProvider;
 
-    /**
-     * @var TypeMapper|\PHPUnit_Framework_MockObject_MockObject
-     */
-    private $typeMapperMock;
-
     /**
      * @var PackagesData|\PHPUnit_Framework_MockObject_MockObject
      */
@@ -119,10 +113,6 @@ class ModuleTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $this->typeMapperMock = $this->getMockBuilder(TypeMapper::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
         $this->packagesDataMock = $this->getMockBuilder(PackagesData::class)
             ->disableOriginalConstructor()
             ->getMock();
@@ -132,7 +122,6 @@ class ModuleTest extends \PHPUnit_Framework_TestCase
             $this->fullModuleListMock,
             $this->moduleListMock,
             $this->objectManagerProvider,
-            $this->typeMapperMock,
             $this->packagesDataMock
         );
     }
@@ -155,14 +144,7 @@ class ModuleTest extends \PHPUnit_Framework_TestCase
         $this->packageInfoMock->expects(static::never())
             ->method('getModuleName');
 
-        $this->typeMapperMock->expects(static::exactly(2))
-            ->method('map')
-            ->willReturnMap([
-                ['magento/sample-module-one', 'magento2-module', 'Module'],
-                ['Sample_ModuleTwo', 'magento2-module', 'Module'],
-            ]);
-
-        $this->packageInfoMock->expects(static::exactly(2))
+        $this->packageInfoMock->expects(static::once())
             ->method('getRequiredBy')
             ->willReturn([]);
         $this->packageInfoMock->expects(static::exactly(2))
@@ -177,6 +159,17 @@ class ModuleTest extends \PHPUnit_Framework_TestCase
                 ['Sample_ModuleOne', '1.0.0'],
                 ['Sample_ModuleTwo', ''],
             ]);
+
+        $this->packagesDataMock->expects(static::exactly(2))
+            ->method('addPackageExtraInfo')
+            ->will(
+                $this->returnCallback(function ($package) {
+                    $package['package_title'] = 'packageTitle';
+                    $package['package_type'] = 'packageType';
+                    return $package;
+                })
+            );
+
         $this->moduleListMock->expects(static::exactly(2))
             ->method('has')
             ->willReturn(true);
@@ -187,20 +180,24 @@ class ModuleTest extends \PHPUnit_Framework_TestCase
         $expected = [
             [
                 'name' => 'magento/sample-module-one',
-                'type' => 'Module',
+                'type' => 'magento2-module',
                 'version' => '1.0.0',
                 'vendor' => 'Magento',
                 'moduleName' => 'Sample_ModuleOne',
                 'enable' => true,
+                'package_title' => 'packageTitle',
+                'package_type' => 'packageType',
                 'requiredBy' => [],
             ],
             [
                 'name' => Module::UNKNOWN_PACKAGE_NAME,
-                'type' => 'Module',
+                'type' => 'magento2-module',
                 'version' => Module::UNKNOWN_VERSION,
                 'vendor' => 'Sample',
                 'moduleName' => 'Sample_ModuleTwo',
                 'enable' => true,
+                'package_title' => 'packageTitle',
+                'package_type' => 'packageType',
                 'requiredBy' => [],
             ],
         ];
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php b/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php
index 63bcb4f1de0dfefbe8edc06657728f02d40628e7..92d7df7973d5673f2fa060b4b7fb4be739949a44 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/Grid/TypeMapperTest.php
@@ -8,18 +8,12 @@ namespace Magento\Setup\Test\Unit\Model\Grid;
 
 use Magento\Framework\Composer\ComposerInformation;
 use Magento\Setup\Model\Grid\TypeMapper;
-use Composer\Package\RootPackageInterface;
 
 /**
  * Class TypeMapperTest
  */
 class TypeMapperTest extends \PHPUnit_Framework_TestCase
 {
-    /**
-     * @var ComposerInformation|\PHPUnit_Framework_MockObject_MockObject
-     */
-    private $composerInformationMock;
-
     /**
      * Model
      *
@@ -29,50 +23,28 @@ class TypeMapperTest extends \PHPUnit_Framework_TestCase
 
     public function setUp()
     {
-        $this->composerInformationMock = $this->getMockBuilder(ComposerInformation::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $this->typeMapperMock = $this->getMockBuilder(TypeMapper::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $this->model = new TypeMapper(
-            $this->composerInformationMock
-        );
+        $this->model = new TypeMapper();
     }
 
     /**
-     * @param string $packageName
      * @param string $packageType
      * @param string $expected
      * @dataProvider mapDataProvider
      */
-    public function testMap($packageName, $packageType, $expected)
+    public function testMap($packageType, $expected)
     {
-        $rootPackageMock = $this->getMock(RootPackageInterface::class);
-        $rootPackageMock->expects(static::once())
-            ->method('getRequires')
-            ->willReturn(
-                ['magento/sample-module-one' => '']
-            );
-
-        $this->composerInformationMock->expects(static::once())
-            ->method('getRootPackage')
-            ->willReturn($rootPackageMock);
-
         static::assertEquals(
             $expected,
-            $this->model->map($packageName, $packageType)
+            $this->model->map($packageType)
         );
     }
 
     public function mapDataProvider()
     {
         return [
-            ['magento/sample-module-one', ComposerInformation::MODULE_PACKAGE_TYPE, TypeMapper::EXTENSION_PACKAGE_TYPE],
-            ['magento/sample-module-two', ComposerInformation::MODULE_PACKAGE_TYPE, 'Module'],
-            ['magento/sample-module-two', 'undefined', TypeMapper::UNDEFINED_PACKAGE_TYPE]
+            [ComposerInformation::THEME_PACKAGE_TYPE, TypeMapper::THEME_PACKAGE_TYPE],
+            [ComposerInformation::MODULE_PACKAGE_TYPE, TypeMapper::MODULE_PACKAGE_TYPE],
+            ['undefined', TypeMapper::UNDEFINED_PACKAGE_TYPE]
         ];
     }
 }
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/PackagesDataTest.php b/setup/src/Magento/Setup/Test/Unit/Model/PackagesDataTest.php
index 35491d3967fafac942a52ba293973579e3a74aec..5a7ead384665446fa7fb3dc82dff33d4b9777133 100644
--- a/setup/src/Magento/Setup/Test/Unit/Model/PackagesDataTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Model/PackagesDataTest.php
@@ -13,6 +13,7 @@ use PHPUnit_Framework_MockObject_MockObject as MockObject;
 
 /**
  * Tests Magento\Setup\Model\PackagesData
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class PackagesDataTest extends \PHPUnit_Framework_TestCase
 {
@@ -21,44 +22,9 @@ class PackagesDataTest extends \PHPUnit_Framework_TestCase
      */
     private $packagesData;
 
-    /**
-     * @var ComposerInformation|MockObject
-     */
-    private $composerInformation;
-
     public function setUp()
     {
-        $this->composerInformation = $this->getMock(ComposerInformation::class, [], [], '', false);
-        $this->composerInformation->expects($this->any())->method('getInstalledMagentoPackages')->willReturn(
-            [
-                'magento/package-1' => [
-                    'name' => 'magento/package-1',
-                    'type' => 'magento2-module',
-                    'version'=> '1.0.0'
-                ],
-                'magento/package-2' => [
-                    'name' => 'magento/package-2',
-                    'type' => 'magento2-module',
-                    'version'=> '1.0.1'
-                ]
-            ]
-        );
-
-        $this->composerInformation->expects($this->any())->method('getRootRepositories')
-            ->willReturn(['repo1', 'repo2']);
-        $this->composerInformation->expects($this->any())->method('getPackagesTypes')
-            ->willReturn(['magento2-module']);
-        $rootPackage = $this->getMock(RootPackage::class, [], ['magento/project', '2.1.0', '2']);
-        $rootPackage->expects($this->any())
-            ->method('getRequires')
-            ->willReturn([
-                'magento/package-1' => '1.0.0',
-                'magento/package-2' => '1.0.1'
-            ]);
-        $this->composerInformation
-            ->expects($this->any())
-            ->method('getRootPackage')
-            ->willReturn($rootPackage);
+        $composerInformation = $this->getComposerInformation();
         $timeZoneProvider = $this->getMock(\Magento\Setup\Model\DateTime\TimeZoneProvider::class, [], [], '', false);
         $timeZone = $this->getMock(\Magento\Framework\Stdlib\DateTime\Timezone::class, [], [], '', false);
         $timeZoneProvider->expects($this->any())->method('get')->willReturn($timeZone);
@@ -110,19 +76,69 @@ class PackagesDataTest extends \PHPUnit_Framework_TestCase
                 . '}, "magento\/package-3":{'
                 . '"1.0.0":{"name":"magento\/package-3","version":"1.0.0","vendor":"test","type":"magento2-module"},'
                 . '"1.0.1":{"name":"magento\/package-3","version":"1.0.1","vendor":"test","type":"magento2-module"},'
-                . '"1.0.2":{"name":"magento\/package-3","version":"1.0.2","vendor":"test","type":"magento2-module"}'
+                . '"1.0.2":{"name":"magento\/package-3","version":"1.0.2","vendor":"test","type":"magento2-module",'
+                . '"extra":{"x-magento-ext-title":"Package 3 title", "x-magento-ext-type":"Extension"}}'
                 . '}}}'
             );
 
+        $typeMapper = $this->getMockBuilder(\Magento\Setup\Model\Grid\TypeMapper::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $typeMapper->expects(static::any())
+            ->method('map')
+            ->willReturnMap([
+                [ComposerInformation::MODULE_PACKAGE_TYPE, \Magento\Setup\Model\Grid\TypeMapper::MODULE_PACKAGE_TYPE],
+            ]);
+
         $this->packagesData = new PackagesData(
-            $this->composerInformation,
+            $composerInformation,
             $timeZoneProvider,
             $packagesAuth,
             $filesystem,
-            $objectManagerProvider
+            $objectManagerProvider,
+            $typeMapper
         );
     }
 
+    /**
+     * @return ComposerInformation|MockObject
+     */
+    private function getComposerInformation()
+    {
+        $composerInformation = $this->getMock(ComposerInformation::class, [], [], '', false);
+        $composerInformation->expects($this->any())->method('getInstalledMagentoPackages')->willReturn(
+            [
+                'magento/package-1' => [
+                    'name' => 'magento/package-1',
+                    'type' => 'magento2-module',
+                    'version'=> '1.0.0'
+                ],
+                'magento/package-2' => [
+                    'name' => 'magento/package-2',
+                    'type' => 'magento2-module',
+                    'version'=> '1.0.1'
+                ]
+            ]
+        );
+
+        $composerInformation->expects($this->any())->method('getRootRepositories')
+            ->willReturn(['repo1', 'repo2']);
+        $composerInformation->expects($this->any())->method('getPackagesTypes')
+            ->willReturn(['magento2-module']);
+        $rootPackage = $this->getMock(RootPackage::class, [], ['magento/project', '2.1.0', '2']);
+        $rootPackage->expects($this->any())
+            ->method('getRequires')
+            ->willReturn([
+                'magento/package-1' => '1.0.0',
+                'magento/package-2' => '1.0.1'
+            ]);
+        $composerInformation->expects($this->any())
+            ->method('getRootPackage')
+            ->willReturn($rootPackage);
+
+        return $composerInformation;
+    }
+
     public function testSyncPackagesData()
     {
         $latestData = $this->packagesData->syncPackagesData();
@@ -163,4 +179,18 @@ class PackagesDataTest extends \PHPUnit_Framework_TestCase
             $this->packagesData->getMetaPackagesMap()
         );
     }
+
+    public function testAddPackageExtraInfo()
+    {
+        static::assertEquals(
+            [
+                'package_title' => 'Package 3 title',
+                'package_type' => 'Extension',
+                'name' => 'magento/package-3',
+                'version' => '1.0.2',
+                'package_link' => ''
+            ],
+            $this->packagesData->addPackageExtraInfo(['name' => 'magento/package-3', 'version' => '1.0.2'])
+        );
+    }
 }
diff --git a/setup/src/Magento/Setup/Test/Unit/Module/SetupTest.php b/setup/src/Magento/Setup/Test/Unit/Module/SetupTest.php
index 231adb9ab695b16fb42aca2a8b18c2c7d7b05bff..9a75c0a3d4bf307ae19152a8fe923f3d85594fa3 100644
--- a/setup/src/Magento/Setup/Test/Unit/Module/SetupTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Module/SetupTest.php
@@ -30,6 +30,10 @@ class SetupTest extends \PHPUnit_Framework_TestCase
             ->method('getConnection')
             ->with(self::CONNECTION_NAME)
             ->will($this->returnValue($this->connection));
+        $resourceModel->expects($this->any())
+            ->method('getConnectionByName')
+            ->with(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION)
+            ->willReturn($this->connection);
         $this->setup = new Setup($resourceModel, self::CONNECTION_NAME);
     }
 
diff --git a/setup/view/layout/layout.phtml b/setup/view/layout/layout.phtml
index f4f137c226301ef3535c3a9f5e824d78ffcde5df..591da1f16f94b555f072601db84803e873c9e92e 100644
--- a/setup/view/layout/layout.phtml
+++ b/setup/view/layout/layout.phtml
@@ -45,6 +45,7 @@
         ->appendFile($this->basePath() . '/pub/magento/setup/select-version.js')
         ->appendFile($this->basePath() . '/pub/magento/setup/home.js')
         ->appendFile($this->basePath() . '/pub/magento/setup/auth-dialog.js')
+        ->appendFile($this->basePath() . '/pub/magento/setup/remove-dialog.js')
         ->appendFile($this->basePath() . '/pub/magento/setup/system-config.js')
         ->appendFile($this->basePath() . '/pub/magento/setup/marketplace-credentials.js')
         ->appendFile($this->basePath() . '/pub/magento/setup/install-extension-grid.js')
diff --git a/setup/view/magento/setup/create-admin-account.phtml b/setup/view/magento/setup/create-admin-account.phtml
index 35c0c911b184cf9e3759eba4e9032cedd73216ff..135fb89b9773e40bfd879999def6a8af731d1a44 100644
--- a/setup/view/magento/setup/create-admin-account.phtml
+++ b/setup/view/magento/setup/create-admin-account.phtml
@@ -19,7 +19,7 @@ $passwordWizard = sprintf(
         </div>
     <p>%s</p>',
     'Password Strength:',
-    'Enter a mix of 7 or more numbers and letters. For a stronger password, include at least one small letter, big letter, and symbol (Ex: BuyIt$54).'
+    'Enter a mix of 7 or more numbers and letters. For a stronger password, include at least one small letter, big letter, and symbol.'
 );
 ?>
 
diff --git a/setup/view/magento/setup/extension-grid.phtml b/setup/view/magento/setup/extension-grid.phtml
index 1b181c5bc9bb36b2434b81b2666262b3841bc425..1096adca720433301b350d5d78d960d3c276af5c 100644
--- a/setup/view/magento/setup/extension-grid.phtml
+++ b/setup/view/magento/setup/extension-grid.phtml
@@ -24,14 +24,14 @@
                 <div class="item-number">{{countOfUpdate}}</div>
                 <div class="item-title">Updates<br />Available</div>
                 <button ui-sref="root.update" href="#update-extension-grid"
-                        ng-class="{'disabled' : !countOfUpdate}"
+                        ng-class="{'disabled' : !countOfUpdate, 'goUpdate' : countOfUpdate}"
                         type="button" class="btn">
                     Review Updates
                 </button>
             </li>
             <li class="item col-m-4">
                 <div class="item-number">{{countOfInstall}}</div>
-                <div class="item-title">Products<br />Ready to Install</div>
+                <div class="item-title">Extensions<br />Ready to Install</div>
                 <div class="item-install">
                     <button ui-sref="root.install" href="#install-extension-grid"
                             ng-class="{'disabled' : !enabledInstall, 'goInstall' : enabledInstall}"
@@ -77,8 +77,8 @@
     <div class="admin__data-grid-header">
         <div class="admin__data-grid-header-row row row-gutter">
             <div class="col-xs-3 module-summary">
-                <span class="module-summary-title">Installed Products</span>
-                <span class="module-summary-count">{{total}} products</span>
+                <span class="module-summary-title">Installed Extensions</span>
+                <span class="module-summary-count">{{total}} extensions</span>
             </div>
             <div class="col-xs-9 admin__data-grid-pager-wrap"
                  ng-include="'<?php echo $this->basePath();?>/pub/magento/setup/view/pagination.html'">
@@ -93,7 +93,7 @@
                     ng-class="{'_ascend' : predicate === 'name' && !reverse,
                                '_descend' : predicate === 'name' && reverse}"
                     class="data-grid-th _sortable">
-                    <span>Product Name</span>
+                    <span>Extension Name</span>
                 </th>
                 <th ng-click="order('type')"
                     ng-class="{'_ascend' : predicate === 'type' && !reverse,
@@ -130,10 +130,10 @@
                           data-label="{{getIndicatorInfo(extension, 'label')}}"
                     ><span>{{getIndicatorInfo(extension, 'label')}}</span>
                     </span>
-                    <span class="data-grid-data">{{extension.name}}</span>
+                    <span class="data-grid-data">{{extension.package_title}}</span>
                 </td>
                 <td>
-                    <span class="data-grid-data">{{extension.type}}</span>
+                    <span class="data-grid-data">{{extension.package_type}}</span>
                 </td>
                 <td>
                     <span class="data-grid-data" data-type="version">{{extension.version}}</span>
diff --git a/setup/view/magento/setup/install-extension-grid.phtml b/setup/view/magento/setup/install-extension-grid.phtml
index 04dc349937152090aa940f9ce79fd884f0e232c0..e2bcbf9a777c853fb203dab92309d7acae212fb5 100644
--- a/setup/view/magento/setup/install-extension-grid.phtml
+++ b/setup/view/magento/setup/install-extension-grid.phtml
@@ -19,7 +19,7 @@
             <div class="col-xs-3">
                 <button type="button" class="btn" ng-click="installAll()">Install</button>
                 <div class="admin__control-support-text">
-                    <span>{{total}}</span> products
+                    <span>{{total}}</span> extensions
                 </div>
             </div>
             <div class="col-xs-9 admin__data-grid-pager-wrap"
@@ -33,28 +33,31 @@
             <tr>
                 <th class="data-grid-multicheck-cell">
                     <div class="action-multicheck-wrap"
-                         ng-class="{'_active':isNewExtensionsMenuVisible}"
-                         click-out="hideNewExtensionsMenu()"
+                         ng-class="{'_active':multipleChoiceService.isNewExtensionsMenuVisible}"
+                         click-out="multipleChoiceService.hideNewExtensionsMenu()"
                     >
                         <input type="checkbox"
                                style="visibility: hidden;"
                                class="admin__control-checkbox"
-                               ng-class="{'_indeterminate':someExtensionsSelected}"
-                               ng-checked="allExtensionsSelected"
+                               ng-class="{'_indeterminate':multipleChoiceService.someExtensionsSelected}"
+                               ng-checked="multipleChoiceService.allExtensionsSelected"
                         >
                         <label></label>
                         <button class="action-multicheck-toggle"
-                                ng-class="{'_active':isNewExtensionsMenuVisible}"
-                                ng-click="toggleNewExtensionsMenu()"
+                                ng-class="{'_active':multipleChoiceService.isNewExtensionsMenuVisible}"
+                                ng-click="multipleChoiceService.toggleNewExtensionsMenu()"
                         >
                             <span>Options</span>
                         </button>
                         <ul class="action-menu">
-                            <li ng-show="!allExtensionsSelected" ng-click="selectAllExtensions()">
+                            <li ng-show="!multipleChoiceService.allExtensionsSelected"
+                                ng-click="multipleChoiceService.selectAllExtensions()"
+                            >
                                 <span class="action-menu-item">Select all</span>
                             </li>
-                            <li ng-show="allExtensionsSelected || someExtensionsSelected"
-                                ng-click="deselectAllExtensions()">
+                            <li ng-show="multipleChoiceService.allExtensionsSelected
+                                        || multipleChoiceService.someExtensionsSelected"
+                                ng-click="multipleChoiceService.deselectAllExtensions()">
                                 <span class="action-menu-item">Deselect all</span>
                             </li>
                         </ul>
@@ -62,7 +65,7 @@
                 </th>
                 <th ng-click="order('name')" ng-class="{'_ascend' : predicate === 'name'
                 && !reverse,'_descend' : predicate === 'name' && reverse}" class="data-grid-th _sortable">
-                    <span>Product Name</span>
+                    <span>Extension Name</span>
                 </th>
                 <th ng-click="order('type')" ng-class="{'_ascend' : predicate === 'type' &&
                 !reverse,'_descend' : predicate === 'type' && reverse}" class="data-grid-th _sortable">
@@ -89,17 +92,18 @@
                     <label class="data-grid-checkbox-cell-inner">
                         <input type="checkbox"
                                class="admin__control-checkbox"
-                               ng-checked="selectedExtensions.hasOwnProperty(extension.name)"
-                               ng-click="updateSelectedExtensions($event, extension.name, extension.version)"
+                               ng-checked="multipleChoiceService.selectedExtensions.hasOwnProperty(extension.name)"
+                               ng-click="multipleChoiceService.updateSelectedExtensions($event, extension.name,
+                                        extension.version)"
                         >
                         <label></label>
                     </label>
                 </td>
                 <td>
-                    <span class="data-grid-data">{{extension.name}}</span>
+                    <span class="data-grid-data">{{extension.package_title}}</span>
                 </td>
                 <td>
-                    <span class="data-grid-data">{{extension.type}}</span>
+                    <span class="data-grid-data">{{extension.package_type}}</span>
                 </td>
                 <td>
                     <span class="data-grid-data">{{extension.vendor}}</span>
@@ -111,6 +115,11 @@
                                     value="{{version}}">Version {{version}}</option>
                         </select>
                     </span>
+                    <span class="component-indicator _tooltip"
+                          ng-show="extension.package_link"
+                          data-label="View info on Marketplace"
+                    ><a href="{{extension.package_link}}" target="_blank"></a>
+                    </span>
                 </td>
                 <td class="data-grid-data">
                     <div class="action-wrap" ng-class="_active">
diff --git a/setup/view/magento/setup/module-grid.phtml b/setup/view/magento/setup/module-grid.phtml
index f6b3e6ae5d7e7e506b34e87b9ed0f6f471a7e96f..3f4f755ae3f6db038aca4157b17bcca594e353c0 100644
--- a/setup/view/magento/setup/module-grid.phtml
+++ b/setup/view/magento/setup/module-grid.phtml
@@ -78,14 +78,14 @@
                           ng-class="{'_show-dependencies': item.requiredBy.length > 0 && showDependencies,
                                      '_hide-dependencies': item.requiredBy.length > 0 && !showDependencies,
                                      '_no-dependencies': item.requiredBy.length == 0}">
-                        {{item.name}}
+                        {{item.package_title}}
                     </div>
                     <div class="product-modules-block" ng-show="item.requiredBy.length > 0 && showDependencies">
                         <div class="product-modules-title">
-                            Products currently using module
+                            Packages currently using module
                         </div>
                         <div class="product-modules-descriprion">
-                            Product Name
+                            Module Name
                         </div>
                         <ul class="product-modules-list">
                             <li ng-repeat="product in item.requiredBy">
@@ -94,7 +94,7 @@
                                       data-label="{{getIndicatorInfo(product, 'label')}}">
                                     <span>{{getIndicatorInfo(product, 'label')}}</span>
                                 </span>
-                                {{product.name}}
+                                {{product.package_title}}
                             </li>
                         </ul>
                     </div>
@@ -106,11 +106,11 @@
                             &nbsp;
                         </div>
                         <div class="product-modules-descriprion">
-                            Product Type
+                            Package Type
                         </div>
                         <ul class="product-modules-list">
                             <li ng-repeat="product in item.requiredBy">
-                                {{product.type}}
+                                {{product.package_type}}
                             </li>
                         </ul>
                     </div>
diff --git a/setup/view/magento/setup/readiness-check.phtml b/setup/view/magento/setup/readiness-check.phtml
index 7a228ff7e9a756dc4f4b2798fb971c52c94cf05b..2aaf4de649bf06a0984bf4eb049a1541bd937e34 100644
--- a/setup/view/magento/setup/readiness-check.phtml
+++ b/setup/view/magento/setup/readiness-check.phtml
@@ -11,7 +11,7 @@
                 type="button"
                 class="btn btn-prime"
                 ng-click="nextState()"
-                ng-disabled="checkingInProgress() || hasErrors"
+                ng-disabled="needReCheck || checkingInProgress() || hasErrors"
                 >Next</button>
         </div>
         <div class="btn-wrap btn-wrap-triangle-left btn-wrap-prev">
diff --git a/setup/view/magento/setup/readiness-check/progress.phtml b/setup/view/magento/setup/readiness-check/progress.phtml
index 3b7c7a38cc89eef989fe82b3094cf903143e2801..6719d825dfcde53a8f958ec1108a23a823146e24 100755
--- a/setup/view/magento/setup/readiness-check/progress.phtml
+++ b/setup/view/magento/setup/readiness-check/progress.phtml
@@ -30,11 +30,56 @@
             <span></span><span></span><span></span><span></span>
             <span></span><span></span><span></span><span></span>
         </span>
-        <span class="message-text">{{wordingOfReadinessCheckAction()}}.</span>
+        <span class="message-text" ng-bind-html="wordingOfReadinessCheckAction()"></span>
     </div>
 
 </div>
 
+<div class="extensions-information" ng-if="$state.current.type == 'update' && getObjectSize(getExtensionsList()) > 0">
+    <div class="message message-warning"
+         ng-show="componentDependency.processed && componentDependency.responseType != 'success'"
+    >
+        We found some extensions with available version updates. We recommend that you update to the recommended
+        versions or remove these extensions from the installation process. We found some extensions with available
+        version updates. We recommend that you update to the recommended versions or remove these extensions from
+        the installation process.
+    </div>
+    <div class="extensions-container">
+        <h3>Update these extension(s)</h3>
+        <ul class="list">
+            <li ng-repeat="extension in getExtensionsList()">
+                {{extension.name}} {{getCurrentVersion(extension.name)}} to
+                <select ng-change="versionChanged()"
+                        ng-model="extension.version"
+                        ng-disabled="checkingInProgress()"
+                >
+                    <option ng-repeat="version in getVersionsList(extension.name)"
+                            ng-selected="version == extension.version"
+                            value="{{version}}"
+                    >Version {{version}}</option>
+                </select>
+                <button class="extension-delete"
+                        title="Delete"
+                        ng-click="openDialog(extension.name)"
+                        ng-show="!checkingInProgress() && getObjectSize(getExtensionsList()) > 1">
+                    <span>Delete</span>
+                </button>
+            </li>
+        </ul>
+
+        <div ng-show="(needReCheck || hasErrors) && !checkingInProgress()">
+            <button ng-click="$state.forceReload()" class="btn btn-medium btn-secondary">
+                <span>Try Again</span>
+            </button>
+        </div>
+        <div ng-show="!needReCheck && !checkingInProgress() && !hasErrors">
+            <button ng-click="nextState()" class="btn btn-medium btn-prime">
+                <span>Update</span>
+            </button>
+        </div>
+    </div>
+</div>
+
 <div id="updater-application" class="readiness-check-item" ng-show="updater.visible">
     <div ng-hide="updater.processed">
         <span class="spinner side">
@@ -496,3 +541,42 @@
 <div class="readiness-check-item" id="warning-message" ng-show="true">
     * - In some cases, you might have two PHP configuration files: one for the PHP command line and for the web server. If so, make the change in both php.ini files. For details, see the <a href="http://php.net/manual/en/configuration.file.php">php.ini reference</a>.
 </div>
+
+<script type="text/ng-template" id="removeDialog">
+    <div class="modals-wrapper">
+        <aside class="modal-popup modal-connect-signin _show" data-role="modal">
+            <div class="modal-inner-wrap">
+                <header class="modal-header">
+                    <button ng-click="closeThisDialog()"
+                            title="Close"
+                            class="action-close"
+                            data-role="closeBtn"
+                            type="button">
+                        <span>Close</span>
+                    </button>
+                </header>
+                <div class="modal-content" data-role="content">
+                    <div class="delete-modal-wrap">
+                        <h3>Remove Extension</h3>
+
+                        <p>Are you sure you want to remove “{{extensionToRemove}}” from
+                            the list?</p>
+                        <p>
+                            Please be aware that removing this extension will remove it from the current
+                            update wizard flow. You can update this extension at a later time by selecting
+                            the extension in the update grid.
+                        </p>
+                        <div class="actions">
+                            <button ng-click="removeExtension(extensionToRemove)" class="btn btn-large btn-prime">
+                                <span>Remove</span>
+                            </button>
+                            <button ng-click="closeThisDialog()" class="btn btn-large btn-secondary">
+                                <span>Cancel</span>
+                            </button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </aside>
+    </div>
+</script>
diff --git a/setup/view/magento/setup/update-extension-grid.phtml b/setup/view/magento/setup/update-extension-grid.phtml
index 2c8625a82ed74152f6e83eedb0e8bfbf3c57c9d8..62c9b1217f2a5404f3aa72968a2d1b145bff2b04 100644
--- a/setup/view/magento/setup/update-extension-grid.phtml
+++ b/setup/view/magento/setup/update-extension-grid.phtml
@@ -13,12 +13,13 @@
         </span>
     </div>
 </div>
-<div class="admin__data-grid-outer-wrap">
+<div class="admin__data-grid-outer-wrap" id="updateExtensionGrid">
     <div class="admin__data-grid-header">
         <div class="admin__data-grid-header-row row row-gutter">
             <div class="col-xs-3">
+                <button type="button" class="btn" ng-click="updateAll()">Update</button>
                 <div class="admin__control-support-text">
-                    <span>{{total}}</span> products
+                    <span>{{total}}</span> extensions
                 </div>
             </div>
             <div class="col-xs-9 admin__data-grid-pager-wrap"
@@ -30,9 +31,42 @@
         <table class="data-grid">
             <thead data-part="head">
             <tr>
+                <th class="data-grid-multicheck-cell">
+                    <div class="action-multicheck-wrap"
+                         ng-class="{'_active':multipleChoiceService.isNewExtensionsMenuVisible}"
+                         click-out="multipleChoiceService.hideNewExtensionsMenu()"
+                    >
+                        <input type="checkbox"
+                               style="visibility: hidden;"
+                               class="admin__control-checkbox"
+                               ng-class="{'_indeterminate':multipleChoiceService.someExtensionsSelected}"
+                               ng-checked="multipleChoiceService.allExtensionsSelected"
+                        >
+                        <label></label>
+                        <button class="action-multicheck-toggle"
+                                ng-class="{'_active':multipleChoiceService.isNewExtensionsMenuVisible}"
+                                ng-click="multipleChoiceService.toggleNewExtensionsMenu()"
+                        >
+                            <span>Options</span>
+                        </button>
+                        <ul class="action-menu">
+                            <li ng-show="!multipleChoiceService.allExtensionsSelected"
+                                ng-click="multipleChoiceService.selectAllExtensions()"
+                            >
+                                <span class="action-menu-item">Select all</span>
+                            </li>
+                            <li ng-show="multipleChoiceService.allExtensionsSelected
+                                        || multipleChoiceService.someExtensionsSelected"
+                                ng-click="multipleChoiceService.deselectAllExtensions()"
+                            >
+                                <span class="action-menu-item">Deselect all</span>
+                            </li>
+                        </ul>
+                    </div>
+                </th>
                 <th ng-click="order('name')" ng-class="{'_ascend' : predicate === 'name'
                 && !reverse,'_descend' : predicate === 'name' && reverse}" class="data-grid-th _sortable">
-                    <span>Product Name</span>
+                    <span>Extension Name</span>
                 </th>
                 <th ng-click="order('type')" ng-class="{'_ascend' : predicate === 'type' &&
                 !reverse,'_descend' : predicate === 'type' && reverse}" class="data-grid-th _sortable">
@@ -58,11 +92,22 @@
             <tr ng-repeat="extension in extensions | orderBy:predicate:reverse
                 | startFrom:(currentPage - 1) * rowLimit | limitTo:rowLimit"
             >
+                <td class="data-grid-checkbox-cell">
+                    <label class="data-grid-checkbox-cell-inner">
+                        <input type="checkbox"
+                               class="admin__control-checkbox"
+                               ng-checked="multipleChoiceService.selectedExtensions.hasOwnProperty(extension.name)"
+                               ng-click="multipleChoiceService.updateSelectedExtensions($event, extension.name,
+                                        extension.latestVersion)"
+                        >
+                        <label></label>
+                    </label>
+                </td>
                 <td>
-                    <span class="data-grid-data">{{extension.name}}</span>
+                    <span class="data-grid-data">{{extension.package_title}}</span>
                 </td>
                 <td>
-                    <span class="data-grid-data">{{extension.type}}</span>
+                    <span class="data-grid-data">{{extension.package_type}}</span>
                 </td>
                 <td>
                     <span class="data-grid-data">{{extension.vendor}}</span>
@@ -78,6 +123,11 @@
                             >Version {{version}}</option>
                         </select>
                     </span>
+                    <span class="component-indicator _tooltip"
+                          ng-show="extension.package_link"
+                          data-label="View info on Marketplace"
+                    ><a href="{{extension.package_link}}" target="_blank"></a>
+                    </span>
                 </td>
                 <td class="data-grid-data">
                     <div class="action-wrap" ng-class="_active">