diff --git a/app/code/Magento/CatalogRule/Model/Rule/Condition/Product.php b/app/code/Magento/CatalogRule/Model/Rule/Condition/Product.php
index 7511d2f5c0bf065478159504cf539b9ca14a44f6..cb8b7786232a33d0fbf98c848ec2a55f0d83ffe7 100644
--- a/app/code/Magento/CatalogRule/Model/Rule/Condition/Product.php
+++ b/app/code/Magento/CatalogRule/Model/Rule/Condition/Product.php
@@ -8,26 +8,29 @@
  */
 namespace Magento\CatalogRule\Model\Rule\Condition;
 
+/**
+ * Class Product
+ */
 class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct
 {
     /**
      * Validate product attribute value for condition
      *
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return bool
      */
-    public function validate(\Magento\Framework\Object $object)
+    public function validate(\Magento\Framework\Model\AbstractModel $model)
     {
         $attrCode = $this->getAttribute();
         if ('category_ids' == $attrCode) {
-            return $this->validateAttribute($object->getAvailableInCategories());
+            return $this->validateAttribute($model->getAvailableInCategories());
         }
 
-        $oldAttrValue = $object->hasData($attrCode) ? $object->getData($attrCode) : null;
-        $this->_setAttributeValue($object);
+        $oldAttrValue = $model->hasData($attrCode) ? $model->getData($attrCode) : null;
+        $this->_setAttributeValue($model);
 
-        $result = $this->validateAttribute($object->getData($this->getAttribute()));
-        $this->_restoreOldAttrValue($object, $oldAttrValue);
+        $result = $this->validateAttribute($model->getData($this->getAttribute()));
+        $this->_restoreOldAttrValue($model, $oldAttrValue);
 
         return (bool)$result;
     }
@@ -35,36 +38,36 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct
     /**
      * Restore old attribute value
      *
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @param mixed $oldAttrValue
      * @return void
      */
-    protected function _restoreOldAttrValue($object, $oldAttrValue)
+    protected function _restoreOldAttrValue(\Magento\Framework\Model\AbstractModel $model, $oldAttrValue)
     {
         $attrCode = $this->getAttribute();
         if (is_null($oldAttrValue)) {
-            $object->unsetData($attrCode);
+            $model->unsetData($attrCode);
         } else {
-            $object->setData($attrCode, $oldAttrValue);
+            $model->setData($attrCode, $oldAttrValue);
         }
     }
 
     /**
      * Set attribute value
      *
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return $this
      */
-    protected function _setAttributeValue($object)
+    protected function _setAttributeValue(\Magento\Framework\Model\AbstractModel $model)
     {
-        $storeId = $object->getStoreId();
+        $storeId = $model->getStoreId();
         $defaultStoreId = \Magento\Store\Model\Store::DEFAULT_STORE_ID;
 
-        if (!isset($this->_entityAttributeValues[$object->getId()])) {
+        if (!isset($this->_entityAttributeValues[$model->getId()])) {
             return $this;
         }
 
-        $productValues  = $this->_entityAttributeValues[$object->getId()];
+        $productValues  = $this->_entityAttributeValues[$model->getId()];
 
         if (!isset($productValues[$storeId]) && !isset($productValues[$defaultStoreId])) {
             return $this;
@@ -72,10 +75,11 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct
 
         $value = isset($productValues[$storeId]) ? $productValues[$storeId] : $productValues[$defaultStoreId];
 
-        $value = $this->_prepareDatetimeValue($value, $object);
-        $value = $this->_prepareMultiselectValue($value, $object);
+        $value = $this->_prepareDatetimeValue($value, $model);
+        $value = $this->_prepareMultiselectValue($value, $model);
+
+        $model->setData($this->getAttribute(), $value);
 
-        $object->setData($this->getAttribute(), $value);
         return $this;
     }
 
@@ -83,15 +87,16 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct
      * Prepare datetime attribute value
      *
      * @param mixed $value
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return mixed
      */
-    protected function _prepareDatetimeValue($value, $object)
+    protected function _prepareDatetimeValue($value, \Magento\Framework\Model\AbstractModel $model)
     {
-        $attribute = $object->getResource()->getAttribute($this->getAttribute());
+        $attribute = $model->getResource()->getAttribute($this->getAttribute());
         if ($attribute && $attribute->getBackendType() == 'datetime') {
             $value = strtotime($value);
         }
+
         return $value;
     }
 
@@ -99,15 +104,16 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct
      * Prepare multiselect attribute value
      *
      * @param mixed $value
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return mixed
      */
-    protected function _prepareMultiselectValue($value, $object)
+    protected function _prepareMultiselectValue($value, \Magento\Framework\Model\AbstractModel $model)
     {
-        $attribute = $object->getResource()->getAttribute($this->getAttribute());
+        $attribute = $model->getResource()->getAttribute($this->getAttribute());
         if ($attribute && $attribute->getFrontendInput() == 'multiselect') {
             $value = strlen($value) ? explode(',', $value) : [];
         }
+
         return $value;
     }
 }
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php
index fbc41f25069e2176f94a58dc3af7dac0e7bef746..6c67a1f555ef1785e722f1c6db058656e4837707 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Group/Edit/Form.php
@@ -115,7 +115,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
                 'title' => __('Tax Class'),
                 'class' => 'required-entry',
                 'required' => true,
-                'values' => $this->_taxCustomer->toOptionArray(true),
+                'values' => $this->_taxCustomer->toOptionArray(),
             ]
         );
 
diff --git a/app/code/Magento/Customer/etc/config.xml b/app/code/Magento/Customer/etc/config.xml
index 10a4fcbd2f67215baea83c148bce75131cd61da5..521a80d8c306c793a7a1a56d028a4710548261cb 100644
--- a/app/code/Magento/Customer/etc/config.xml
+++ b/app/code/Magento/Customer/etc/config.xml
@@ -58,7 +58,7 @@ T: {{var telephone}}
 {{depend fax}}F: {{var fax}}{{/depend}}
 {{depend vat_id}}VAT: {{var vat_id}}{{/depend}}</text>
                 <oneline>{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}, {{var street}}, {{var city}}, {{var region}} {{var postcode}}, {{var country}}</oneline>
-                <html><![CDATA[{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}<br/>
+                <html><![CDATA[{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br/>{{/depend}}
 {{depend company}}{{var company}}<br />{{/depend}}
 {{if street1}}{{var street1}}<br />{{/if}}
 {{depend street2}}{{var street2}}<br />{{/depend}}
diff --git a/app/code/Magento/OfflinePayments/Model/Banktransfer.php b/app/code/Magento/OfflinePayments/Model/Banktransfer.php
index fb8d31b9c90f378aa80868c318e90d6794861ade..858f68ddc21c5f1881129010d1a389282ef5db9f 100644
--- a/app/code/Magento/OfflinePayments/Model/Banktransfer.php
+++ b/app/code/Magento/OfflinePayments/Model/Banktransfer.php
@@ -32,6 +32,13 @@ class Banktransfer extends \Magento\Payment\Model\Method\AbstractMethod
      */
     protected $_infoBlockType = 'Magento\Payment\Block\Info\Instructions';
 
+    /**
+     * Availability option
+     *
+     * @var bool
+     */
+    protected $_isOffline = true;
+
     /**
      * Get instructions text from config
      *
diff --git a/app/code/Magento/OfflinePayments/Model/Cashondelivery.php b/app/code/Magento/OfflinePayments/Model/Cashondelivery.php
index 74097a82728688af1fb18a4e8a33ab027bbb1959..07ca59f6ac74829f0b2e943ef59c903819e5bbbb 100644
--- a/app/code/Magento/OfflinePayments/Model/Cashondelivery.php
+++ b/app/code/Magento/OfflinePayments/Model/Cashondelivery.php
@@ -30,6 +30,13 @@ class Cashondelivery extends \Magento\Payment\Model\Method\AbstractMethod
      */
     protected $_infoBlockType = 'Magento\Payment\Block\Info\Instructions';
 
+    /**
+     * Availability option
+     *
+     * @var bool
+     */
+    protected $_isOffline = true;
+
     /**
      * Get instructions text from config
      *
diff --git a/app/code/Magento/OfflinePayments/Model/Checkmo.php b/app/code/Magento/OfflinePayments/Model/Checkmo.php
index 4b1bc2b0558421442357a3f48c1698045cb41875..37a8e7a3e20ccac918afb69218f6b774d1b7b102 100644
--- a/app/code/Magento/OfflinePayments/Model/Checkmo.php
+++ b/app/code/Magento/OfflinePayments/Model/Checkmo.php
@@ -21,6 +21,13 @@ class Checkmo extends \Magento\Payment\Model\Method\AbstractMethod
      */
     protected $_infoBlockType = 'Magento\OfflinePayments\Block\Info\Checkmo';
 
+    /**
+     * Availability option
+     *
+     * @var bool
+     */
+    protected $_isOffline = true;
+
     /**
      * Assign data to info model instance
      *
diff --git a/app/code/Magento/OfflinePayments/Model/Purchaseorder.php b/app/code/Magento/OfflinePayments/Model/Purchaseorder.php
index d41a3cdbf77ccc8fbd145243a6742d3addda76e3..0c82a6352f44a227a0b31f7108aa2299f0e37c6d 100644
--- a/app/code/Magento/OfflinePayments/Model/Purchaseorder.php
+++ b/app/code/Magento/OfflinePayments/Model/Purchaseorder.php
@@ -21,6 +21,13 @@ class Purchaseorder extends \Magento\Payment\Model\Method\AbstractMethod
      */
     protected $_infoBlockType = 'Magento\OfflinePayments\Block\Info\Purchaseorder';
 
+    /**
+     * Availability option
+     *
+     * @var bool
+     */
+    protected $_isOffline = true;
+
     /**
      * Assign data to info model instance
      *
diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php
index 70ef8ea29f3387d3723511ca4dc247d53891ce31..7f20e76e347c2f68f2c20d37711d84bf6efbd230 100644
--- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php
+++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php
@@ -70,6 +70,13 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho
      */
     protected $_isGateway = false;
 
+    /**
+     * Payment Method feature
+     *
+     * @var bool
+     */
+    protected $_isOffline = false;
+
     /**
      * Payment Method feature
      *
@@ -366,6 +373,16 @@ abstract class AbstractMethod extends \Magento\Framework\Object implements Metho
         return $this->_isGateway;
     }
 
+    /**
+     * Retrieve payment method online/offline flag
+     *
+     * @return bool
+     */
+    public function isOffline()
+    {
+        return $this->_isOffline;
+    }
+
     /**
      * Flag if we need to run payment initialize while order place
      *
diff --git a/app/code/Magento/Persistent/Block/Header/Additional.php b/app/code/Magento/Persistent/Block/Header/Additional.php
index 298052731e37a41d9aebf3e266ddc9cf6bb38b49..4b7f83d2e233582f4b890ea4f41e181224ccad96 100644
--- a/app/code/Magento/Persistent/Block/Header/Additional.php
+++ b/app/code/Magento/Persistent/Block/Header/Additional.php
@@ -44,6 +44,7 @@ class Additional extends \Magento\Framework\View\Element\Html\Link
         \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository,
         array $data = []
     ) {
+        $this->isScopePrivate = true;
         $this->_customerViewHelper = $customerViewHelper;
         $this->_persistentSessionHelper = $persistentSessionHelper;
         $this->customerRepository = $customerRepository;
@@ -68,12 +69,16 @@ class Additional extends \Magento\Framework\View\Element\Html\Link
      */
     protected function _toHtml()
     {
-        $persistentName = $this->_escaper->escapeHtml(
-            $this->_customerViewHelper->getCustomerName(
-                $this->customerRepository->getById($this->_persistentSessionHelper->getSession()->getCustomerId())
-            )
-        );
-        return '<span><a ' . $this->getLinkAttributes() . ' >' . $this->escapeHtml(__('(Not %1?)', $persistentName))
-        . '</a></span>';
+        if ($this->_persistentSessionHelper->getSession()->getCustomerId()) {
+            $persistentName = $this->escapeHtml(
+                $this->_customerViewHelper->getCustomerName(
+                    $this->customerRepository->getById($this->_persistentSessionHelper->getSession()->getCustomerId())
+                )
+            );
+            return '<span><a ' . $this->getLinkAttributes() . ' >' . __('(Not %1?)', $persistentName)
+            . '</a></span>';
+        }
+
+        return '';
     }
 }
diff --git a/app/code/Magento/Persistent/Model/Layout/DepersonalizePlugin.php b/app/code/Magento/Persistent/Model/Layout/DepersonalizePlugin.php
new file mode 100644
index 0000000000000000000000000000000000000000..46bf6df52128910be28b0609f07219113b827492
--- /dev/null
+++ b/app/code/Magento/Persistent/Model/Layout/DepersonalizePlugin.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ */
+namespace Magento\Persistent\Model\Layout;
+
+/**
+ * Class DepersonalizePlugin
+ */
+class DepersonalizePlugin
+{
+    /**
+     * @var \Magento\Persistent\Model\Session
+     */
+    protected $persistentSession;
+
+    /**
+     * @var \Magento\Framework\App\RequestInterface
+     */
+    protected $request;
+
+    /**
+     * @var \Magento\Framework\Module\Manager
+     */
+    protected $moduleManager;
+
+    /**
+     * @var \Magento\PageCache\Model\Config
+     */
+    protected $cacheConfig;
+
+    /**
+     * Constructor
+     *
+     * @param \Magento\Persistent\Model\Session $persistentSession
+     * @param \Magento\Framework\App\RequestInterface $request
+     * @param \Magento\Framework\Module\Manager $moduleManager
+     * @param \Magento\PageCache\Model\Config $cacheConfig
+     */
+    public function __construct(
+        \Magento\Persistent\Model\Session $persistentSession,
+        \Magento\Framework\App\RequestInterface $request,
+        \Magento\Framework\Module\Manager $moduleManager,
+        \Magento\PageCache\Model\Config $cacheConfig
+    ) {
+        $this->persistentSession = $persistentSession;
+        $this->request = $request;
+        $this->moduleManager = $moduleManager;
+        $this->cacheConfig = $cacheConfig;
+    }
+
+    /**
+     * After generate Xml
+     *
+     * @param \Magento\Framework\View\LayoutInterface $subject
+     * @param \Magento\Framework\View\LayoutInterface $result
+     * @return \Magento\Framework\View\LayoutInterface
+     */
+    public function afterGenerateXml(
+        \Magento\Framework\View\LayoutInterface $subject,
+        \Magento\Framework\View\LayoutInterface $result
+    ) {
+        if ($this->moduleManager->isEnabled('Magento_PageCache')
+            && $this->cacheConfig->isEnabled()
+            && !$this->request->isAjax()
+            && $subject->isCacheable()
+        ) {
+            $this->persistentSession->setCustomerId(null);
+        }
+
+        return $result;
+    }
+}
diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json
index f875228c958126bafe01cfa9cfdf4569009e0ea3..b09817d8ff1016da036ca2d00aaf19e8de40b322 100644
--- a/app/code/Magento/Persistent/composer.json
+++ b/app/code/Magento/Persistent/composer.json
@@ -9,6 +9,7 @@
         "magento/module-customer": "0.42.0-beta1",
         "magento/module-sales": "0.42.0-beta1",
         "magento/module-cron": "0.42.0-beta1",
+        "magento/module-page-cache": "0.42.0-beta1",
         "magento/framework": "0.42.0-beta1",
         "magento/magento-composer-installer": "*"
     },
diff --git a/app/code/Magento/Persistent/etc/frontend/di.xml b/app/code/Magento/Persistent/etc/frontend/di.xml
index 08f489c24699059cb7dc67e01d60f1dac3bd7276..d35e4c3dc204c404b59100908e77862ad3f0ef68 100644
--- a/app/code/Magento/Persistent/etc/frontend/di.xml
+++ b/app/code/Magento/Persistent/etc/frontend/di.xml
@@ -12,4 +12,10 @@
             </argument>
         </arguments>
     </type>
+    <type name="Magento\Framework\View\Layout">
+        <plugin name="persistent-session-depersonalize"
+                type="Magento\Persistent\Model\Layout\DepersonalizePlugin"
+                sortOrder="10"
+        />
+    </type>
 </config>
diff --git a/app/code/Magento/Persistent/etc/module.xml b/app/code/Magento/Persistent/etc/module.xml
index 0a201d7d4ef6e18d49d03945c7e64f55e31288c9..c71ae0efdf48609f9f666542e7b7584fbb3356c5 100644
--- a/app/code/Magento/Persistent/etc/module.xml
+++ b/app/code/Magento/Persistent/etc/module.xml
@@ -8,6 +8,7 @@
     <module name="Magento_Persistent" schema_version="2.0.0">
         <sequence>
             <module name="Magento_Checkout"/>
+            <module name="Magento_PageCache"/>
         </sequence>
     </module>
 </config>
diff --git a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php
index 9c2987de3a34dc978ab3cf524df4cb1fd2d42ea1..916a1404540f9cc36f91ca68729da4a18983fde1 100644
--- a/app/code/Magento/Rule/Model/Condition/AbstractCondition.php
+++ b/app/code/Magento/Rule/Model/Condition/AbstractCondition.php
@@ -832,12 +832,17 @@ abstract class AbstractCondition extends \Magento\Framework\Object implements Co
     }
 
     /**
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return bool
      */
-    public function validate(\Magento\Framework\Object $object)
+    public function validate(\Magento\Framework\Model\AbstractModel $model)
     {
-        return $this->validateAttribute($object->getData($this->getAttribute()));
+        if (!$model->hasData($this->getAttribute())) {
+            $model->load($model->getId());
+        }
+        $attributeValue = $model->getData($this->getAttribute());
+
+        return $this->validateAttribute($attributeValue);
     }
 
     /**
diff --git a/app/code/Magento/Rule/Model/Condition/Combine.php b/app/code/Magento/Rule/Model/Condition/Combine.php
index 75362ace2c730694fade6b31db2bec51704559dc..45d78849d03861b87eb1701dde8d8156716808ff 100644
--- a/app/code/Magento/Rule/Model/Condition/Combine.php
+++ b/app/code/Magento/Rule/Model/Condition/Combine.php
@@ -316,12 +316,12 @@ class Combine extends AbstractCondition
     }
 
     /**
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return bool
      */
-    public function validate(\Magento\Framework\Object $object)
+    public function validate(\Magento\Framework\Model\AbstractModel $model)
     {
-        return $this->_isValid($object);
+        return $this->_isValid($model);
     }
 
     /**
@@ -338,7 +338,7 @@ class Combine extends AbstractCondition
     /**
      * Is entity valid
      *
-     * @param int|\Magento\Framework\Object $entity
+     * @param int|\Magento\Framework\Model\AbstractModel $entity
      * @return bool
      */
     protected function _isValid($entity)
@@ -351,7 +351,7 @@ class Combine extends AbstractCondition
         $true = (bool)$this->getValue();
 
         foreach ($this->getConditions() as $cond) {
-            if ($entity instanceof \Magento\Framework\Object) {
+            if ($entity instanceof \Magento\Framework\Model\AbstractModel) {
                 $validated = $cond->validate($entity);
             } else {
                 $validated = $cond->validateByEntityId($entity);
diff --git a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php
index 00034cf90ae766066f4035d3102829de1ac8f8cd..f0d4de7d40fb932111e73fe13d855b55a97f96b3 100644
--- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php
+++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php
@@ -523,50 +523,50 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon
     /**
      * Validate product attribute value for condition
      *
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return bool
      */
-    public function validate(\Magento\Framework\Object $object)
+    public function validate(\Magento\Framework\Model\AbstractModel $model)
     {
         $attrCode = $this->getAttribute();
 
         if ('category_ids' == $attrCode) {
-            return $this->validateAttribute($object->getAvailableInCategories());
-        } elseif (!isset($this->_entityAttributeValues[$object->getId()])) {
-            if (!$object->getResource()) {
+            return $this->validateAttribute($model->getAvailableInCategories());
+        } elseif (!isset($this->_entityAttributeValues[$model->getId()])) {
+            if (!$model->getResource()) {
                 return false;
             }
-            $attr = $object->getResource()->getAttribute($attrCode);
+            $attr = $model->getResource()->getAttribute($attrCode);
 
             if ($attr && $attr->getBackendType() == 'datetime' && !is_int($this->getValue())) {
                 $this->setValue(strtotime($this->getValue()));
-                $value = strtotime($object->getData($attrCode));
+                $value = strtotime($model->getData($attrCode));
                 return $this->validateAttribute($value);
             }
 
             if ($attr && $attr->getFrontendInput() == 'multiselect') {
-                $value = $object->getData($attrCode);
+                $value = $model->getData($attrCode);
                 $value = strlen($value) ? explode(',', $value) : [];
                 return $this->validateAttribute($value);
             }
 
-            return parent::validate($object);
+            return parent::validate($model);
         } else {
             $result = false;
             // any valid value will set it to TRUE
             // remember old attribute state
-            $oldAttrValue = $object->hasData($attrCode) ? $object->getData($attrCode) : null;
+            $oldAttrValue = $model->hasData($attrCode) ? $model->getData($attrCode) : null;
 
-            foreach ($this->_entityAttributeValues[$object->getId()] as $value) {
-                $attr = $object->getResource()->getAttribute($attrCode);
+            foreach ($this->_entityAttributeValues[$model->getId()] as $value) {
+                $attr = $model->getResource()->getAttribute($attrCode);
                 if ($attr && $attr->getBackendType() == 'datetime') {
                     $value = strtotime($value);
                 } elseif ($attr && $attr->getFrontendInput() == 'multiselect') {
                     $value = strlen($value) ? explode(',', $value) : [];
                 }
 
-                $object->setData($attrCode, $value);
-                $result |= parent::validate($object);
+                $model->setData($attrCode, $value);
+                $result |= parent::validate($model);
 
                 if ($result) {
                     break;
@@ -574,9 +574,9 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon
             }
 
             if (is_null($oldAttrValue)) {
-                $object->unsetData($attrCode);
+                $model->unsetData($attrCode);
             } else {
-                $object->setData($attrCode, $oldAttrValue);
+                $model->setData($attrCode, $oldAttrValue);
             }
 
             return (bool)$result;
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Comment.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Comment.php
index 7ca3943d4ec36651c90e562c822d8ce89cf0e095..6391503155d4c02d43eff26a83adced789a43b33 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Comment.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Comment.php
@@ -47,18 +47,4 @@ class Comment extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate
     {
         return $this->escapeHtml($this->getQuote()->getCustomerNote());
     }
-
-    /**
-     * Get note notification
-     *
-     * @return bool
-     */
-    public function getNoteNotify()
-    {
-        $notify = $this->getQuote()->getCustomerNoteNotify();
-        if (is_null($notify) || $notify) {
-            return true;
-        }
-        return false;
-    }
 }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php
index 833932ae64b85f88d583d7ba710442b0b56bc210..dedf8478a6d14ebfd4eedf955608376d9d195d92 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php
@@ -181,4 +181,18 @@ class Totals extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate
     {
         return $this->_salesData->canSendNewOrderConfirmationEmail($this->getQuote()->getStoreId());
     }
+
+    /**
+     * Get note notification
+     *
+     * @return bool
+     */
+    public function getNoteNotify()
+    {
+        $notify = $this->getQuote()->getCustomerNoteNotify();
+        if (is_null($notify) || $notify) {
+            return true;
+        }
+        return false;
+    }
 }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Transactions.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Transactions.php
index c807707f19da411d1cb623e558fa97688f9a13c9..a39f367057dc0497aa91b5777064f96f51853a6b 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Transactions.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Transactions.php
@@ -17,20 +17,40 @@ class Transactions extends \Magento\Framework\View\Element\Text\ListText impleme
      */
     protected $_authorization;
 
+    /**
+     * Core registry
+     *
+     * @var \Magento\Framework\Registry
+     */
+    protected $_coreRegistry = null;
+
     /**
      * @param \Magento\Framework\View\Element\Context $context
      * @param \Magento\Framework\AuthorizationInterface $authorization
+     * @param \Magento\Framework\Registry $registry
      * @param array $data
      */
     public function __construct(
         \Magento\Framework\View\Element\Context $context,
         \Magento\Framework\AuthorizationInterface $authorization,
+        \Magento\Framework\Registry $registry,
         array $data = []
     ) {
         $this->_authorization = $authorization;
+        $this->_coreRegistry = $registry;
         parent::__construct($context, $data);
     }
 
+    /**
+     * Retrieve order model instance
+     *
+     * @return \Magento\Sales\Model\Order
+     */
+    public function getOrder()
+    {
+        return $this->_coreRegistry->registry('current_order');
+    }
+
     /**
      * {@inheritdoc}
      */
@@ -52,7 +72,7 @@ class Transactions extends \Magento\Framework\View\Element\Text\ListText impleme
      */
     public function canShowTab()
     {
-        return true;
+        return !$this->getOrder()->getPayment()->getMethodInstance()->isOffline();
     }
 
     /**
diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php
index 540409a35baf4349c244590c48af12137b0f449a..89e8ca8befbd5570256a568b714e10b62e4595da 100644
--- a/app/code/Magento/Sales/Model/Order.php
+++ b/app/code/Magento/Sales/Model/Order.php
@@ -3389,7 +3389,7 @@ class Order extends AbstractModel implements EntityInterface, ApiOrderInterface
         if ($this->getData(ApiOrderInterface::STATUS_HISTORIES) == null) {
             $this->setData(
                 ApiOrderInterface::STATUS_HISTORIES,
-                $this->getPaymentsCollection()->getItems()
+                $this->getStatusHistoryCollection()->getItems()
             );
         }
         return $this->getData(ApiOrderInterface::STATUS_HISTORIES);
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml
index 31c3a50031389f1d74a97b7c784763df490d04b3..2e104cccf9ef4051f29cdd9137a4943c6a93fea3 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml
@@ -13,7 +13,7 @@
 <div class="divider"></div>
 <div class="order-totals-bottom">
     <div class="field choice field-append-comments">
-        <input type="checkbox" id="notify_customer" name="order[comment][customer_note_notify]" value="1" <?php if ($this->getNoteNotify()): ?>checked="true"<?php endif; ?>/>
+        <input type="checkbox" id="notify_customer" name="order[comment][customer_note_notify]" value="1"<?php if ($this->getNoteNotify()): ?> checked="checked"<?php endif; ?>/>
         <label for="notify_customer" class="normal"><?php echo __('Append Comments') ?></label>
     </div>
     <?php if ($this->canSendNewOrderConfirmationEmail()): ?>
diff --git a/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php b/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php
index 9e3ec5c0403365310e91fc63114e51199fb09931..63bd5a0554ec11e0b87c172ad1e8ef0327d2c85d 100644
--- a/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php
+++ b/app/code/Magento/SalesRule/Model/Resource/Report/Rule/Createdat.php
@@ -94,7 +94,10 @@ class Createdat extends \Magento\Reports\Model\Resource\Report\AbstractReport
                         'base_subtotal_canceled',
                         0
                     ) . ' - ' . $adapter->getIfNullSql(
-                        'ABS(base_discount_amount) - ' . $adapter->getIfNullSql('base_discount_canceled', 0),
+                        'ABS(base_discount_amount) - ABS(' . $adapter->getIfNullSql('base_discount_canceled', 0) . ')',
+                        0
+                    ) . ' + ' . $adapter->getIfNullSql(
+                        'base_tax_amount - ' . $adapter->getIfNullSql('base_tax_canceled', 0),
                         0
                     ) . ')
                         * base_to_global_rate)',
@@ -120,9 +123,12 @@ class Createdat extends \Magento\Reports\Model\Resource\Report\AbstractReport
                         'base_subtotal_refunded',
                         0
                     ) . ' - ' . $adapter->getIfNullSql(
-                        'base_discount_invoiced - ' . $adapter->getIfNullSql('base_discount_refunded', 0),
+                        'ABS(base_discount_invoiced) - ABS(' . $adapter->getIfNullSql('base_discount_refunded', 0) . ')',
                         0
-                    ) . ') * base_to_global_rate)',
+                    ) . ' + ' . $adapter->getIfNullSql(
+                        'base_tax_invoiced - ' . $adapter->getIfNullSql('base_tax_refunded', 0),
+                        0
+                    )   . ') * base_to_global_rate)',
                     0
                 ),
             ];
diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Address.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Address.php
index 49983011229bbcad73b1b30522e7f2e81090bd93..5589be55402fcc313d92320bb3936a5337f9b846 100644
--- a/app/code/Magento/SalesRule/Model/Rule/Condition/Address.php
+++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Address.php
@@ -160,22 +160,22 @@ class Address extends \Magento\Rule\Model\Condition\AbstractCondition
     /**
      * Validate Address Rule Condition
      *
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return bool
      */
-    public function validate(\Magento\Framework\Object $object)
+    public function validate(\Magento\Framework\Model\AbstractModel $model)
     {
-        $address = $object;
+        $address = $model;
         if (!$address instanceof \Magento\Sales\Model\Quote\Address) {
-            if ($object->getQuote()->isVirtual()) {
-                $address = $object->getQuote()->getBillingAddress();
+            if ($model->getQuote()->isVirtual()) {
+                $address = $model->getQuote()->getBillingAddress();
             } else {
-                $address = $object->getQuote()->getShippingAddress();
+                $address = $model->getQuote()->getShippingAddress();
             }
         }
 
         if ('payment_method' == $this->getAttribute() && !$address->hasPaymentMethod()) {
-            $address->setPaymentMethod($object->getQuote()->getPayment()->getMethod());
+            $address->setPaymentMethod($model->getQuote()->getPayment()->getMethod());
         }
 
         return parent::validate($address);
diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php
index 9b614b59ae334bd77f35da6f781db5349da99c44..2f4fcbf7c0af2424f2c645b4357b26171c1f5bea 100644
--- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php
+++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product.php
@@ -28,24 +28,24 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct
     /**
      * Validate Product Rule Condition
      *
-     * @param \Magento\Framework\Object $object
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return bool
      */
-    public function validate(\Magento\Framework\Object $object)
+    public function validate(\Magento\Framework\Model\AbstractModel $model)
     {
         //@todo reimplement this method when is fixed MAGETWO-5713
         /** @var \Magento\Catalog\Model\Product $product */
-        $product = $object->getProduct();
+        $product = $model->getProduct();
         if (!$product instanceof \Magento\Catalog\Model\Product) {
-            $product = $this->productRepository->getById($object->getProductId());
+            $product = $this->productRepository->getById($model->getProductId());
         }
 
         $product->setQuoteItemQty(
-            $object->getQty()
+            $model->getQty()
         )->setQuoteItemPrice(
-            $object->getPrice() // possible bug: need to use $object->getBasePrice()
+            $model->getPrice() // possible bug: need to use $model->getBasePrice()
         )->setQuoteItemRowTotal(
-            $object->getBaseRowTotal()
+            $model->getBaseRowTotal()
         );
 
         return parent::validate($product);
diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php
index c36ee4671e1d41083c0aa7e05583b44f3430bd09..bea0defa401ebbadb578e1bea86061dc2c1c619d 100644
--- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php
+++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Found.php
@@ -52,15 +52,15 @@ class Found extends \Magento\SalesRule\Model\Rule\Condition\Product\Combine
     /**
      * Validate
      *
-     * @param \Magento\Framework\Object $object Quote
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return bool
      */
-    public function validate(\Magento\Framework\Object $object)
+    public function validate(\Magento\Framework\Model\AbstractModel $model)
     {
         $all = $this->getAggregator() === 'all';
         $true = (bool)$this->getValue();
         $found = false;
-        foreach ($object->getAllItems() as $item) {
+        foreach ($model->getAllItems() as $item) {
             $found = $all;
             foreach ($this->getConditions() as $cond) {
                 $validated = $cond->validate($item);
diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Subselect.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Subselect.php
index 59a5455e96b91b9174874d3b12c84464e387dd4c..08f75032598088f2f081167c7f3b412a0af0d227 100644
--- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Subselect.php
+++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Subselect.php
@@ -133,17 +133,17 @@ class Subselect extends \Magento\SalesRule\Model\Rule\Condition\Product\Combine
     /**
      * Validate
      *
-     * @param \Magento\Framework\Object $object Quote
+     * @param \Magento\Framework\Model\AbstractModel $model
      * @return bool
      */
-    public function validate(\Magento\Framework\Object $object)
+    public function validate(\Magento\Framework\Model\AbstractModel $model)
     {
         if (!$this->getConditions()) {
             return false;
         }
         $attr = $this->getAttribute();
         $total = 0;
-        foreach ($object->getQuote()->getAllVisibleItems() as $item) {
+        foreach ($model->getQuote()->getAllVisibleItems() as $item) {
             if (parent::validate($item)) {
                 $total += $item->getData($attr);
             }
diff --git a/app/code/Magento/SalesRule/Model/RulesApplier.php b/app/code/Magento/SalesRule/Model/RulesApplier.php
index f7bde08d44e737f81121f7758b645e0e77c869b6..4dace1d8f8df786175108bb19d7b207517dcf5b0 100644
--- a/app/code/Magento/SalesRule/Model/RulesApplier.php
+++ b/app/code/Magento/SalesRule/Model/RulesApplier.php
@@ -59,7 +59,18 @@ class RulesApplier
             }
 
             if (!$skipValidation && !$rule->getActions()->validate($item)) {
-                continue;
+                $childItems = $item->getChildren();
+                $isContinue = true;
+                if (!empty($childItems)) {
+                    foreach ($childItems as $childItem) {
+                        if ($rule->getActions()->validate($childItem)) {
+                            $isContinue = false;
+                        }
+                    }
+                }
+                if ($isContinue) {
+                    continue;
+                }
             }
 
             $this->applyRule($item, $rule, $address, $couponCode);
diff --git a/app/code/Magento/Tax/Model/TaxClass/Source/Customer.php b/app/code/Magento/Tax/Model/TaxClass/Source/Customer.php
index 6d97a822c554c2aa5618b2f5a6f086d732263be6..7033763324eb59787c59b05d368bdbd020343fb8 100644
--- a/app/code/Magento/Tax/Model/TaxClass/Source/Customer.php
+++ b/app/code/Magento/Tax/Model/TaxClass/Source/Customer.php
@@ -5,8 +5,9 @@
 
 namespace Magento\Tax\Model\TaxClass\Source;
 
-use Magento\Tax\Api\Data\TaxClassInterface as TaxClass;
+use Magento\Framework\Exception\StateException;
 use Magento\Tax\Api\TaxClassManagementInterface;
+use Magento\Tax\Api\Data\TaxClassInterface as TaxClass;
 
 /**
  * Customer tax class source model.
@@ -48,33 +49,27 @@ class Customer extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
     /**
      * Retrieve all customer tax classes as an options array.
      *
-     * @param bool $withEmpty
      * @return array
+     * @throws StateException
      */
-    public function getAllOptions($withEmpty = true)
+    public function getAllOptions()
     {
-        if (!$this->_options) {
-            $filter = $this->filterBuilder
-                ->setField(TaxClass::KEY_TYPE)
+        if (empty($this->_options)) {
+            $options = [];
+            $filter = $this->filterBuilder->setField(TaxClass::KEY_TYPE)
                 ->setValue(TaxClassManagementInterface::TYPE_CUSTOMER)
                 ->create();
             $searchCriteria = $this->searchCriteriaBuilder->addFilter([$filter])->create();
             $searchResults = $this->taxClassRepository->getList($searchCriteria);
             foreach ($searchResults->getItems() as $taxClass) {
-                $this->_options[] = [
+                $options[] = [
                     'value' => $taxClass->getClassId(),
                     'label' => $taxClass->getClassName(),
                 ];
             }
+            $this->_options = $options;
         }
 
-        if ($withEmpty) {
-            if (!$this->_options) {
-                return [['value' => '0', 'label' => __('None')]];
-            } else {
-                return array_merge([['value' => '0', 'label' => __('None')]], $this->_options);
-            }
-        }
         return $this->_options;
     }
 }
diff --git a/dev/tests/functional/testsuites/Mtf/TestSuite/EndToEndCETests.php b/dev/tests/functional/testsuites/Mtf/TestSuite/EndToEndCETests.php
index a02b42d41eaf63ee5f53bda5c685f91b321567fe..42243f0d1d7845c348035beebab2a79e6eddf1da 100755
--- a/dev/tests/functional/testsuites/Mtf/TestSuite/EndToEndCETests.php
+++ b/dev/tests/functional/testsuites/Mtf/TestSuite/EndToEndCETests.php
@@ -39,8 +39,8 @@ class EndToEndCETests
         $suite->addTestSuite('Magento\CatalogSearch\Test\TestCase\AdvancedSearchTest');
 
         // Url rewrites
-        $suite->addTestSuite('Magento\Urlrewrite\Test\TestCase\ProductTest');
-        $suite->addTestSuite('Magento\Urlrewrite\Test\TestCase\CategoryTest');
+        $suite->addTestSuite('Magento\UrlRewrite\Test\TestCase\ProductTest');
+        $suite->addTestSuite('Magento\UrlRewrite\Test\TestCase\CategoryTest');
 
         // Customer
         $suite->addTestSuite('Magento\Customer\Test\TestCase\BackendCustomerCreateTest');
diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Resource/Report/Rule/CreatedatTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Resource/Report/Rule/CreatedatTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..2d14ae963cee1ab9c32a2e47c809f34065836cfe
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Resource/Report/Rule/CreatedatTest.php
@@ -0,0 +1,99 @@
+<?php
+/**
+ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ */
+namespace Magento\SalesRule\Model\Resource\Report\Rule;
+
+/**
+ * Createdat test for check report totals calculate
+ *
+ * @magentoDataFixture Magento/SalesRule/_files/order_with_coupon.php
+ */
+class CreatedatTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @dataProvider orderParamsDataProvider()
+     * @param $orderParams
+     */
+    public function testTotals($orderParams)
+    {
+        /** @var \Magento\Sales\Model\Order $order */
+        $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Sales\Model\Order');
+        $order->loadByIncrementId('100000001')
+            ->setBaseGrandTotal($orderParams['base_subtotal'])
+            ->setSubtotal($orderParams['base_subtotal'])
+            ->setBaseSubtotal($orderParams['base_subtotal'])
+            ->setBaseDiscountAmount($orderParams['base_discount_amount'])
+            ->setBaseTaxAmount($orderParams['base_tax_amount'])
+            ->setBaseSubtotalInvoiced($orderParams['base_subtotal_invoiced'])
+            ->setBaseDiscountInvoiced($orderParams['base_discount_invoiced'])
+            ->setBaseTaxInvoiced($orderParams['base_tax_invoiced'])
+            ->setBaseShippingAmount(0)
+            ->setBaseToGlobalRate(1)
+            ->setCouponCode('1234567890')
+            ->setCreatedAt('2014-10-25 10:10:10')
+            ->save();
+        // refresh report statistics
+        /** @var \Magento\SalesRule\Model\Resource\Report\Rule $reportResource */
+        $reportResource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+            'Magento\SalesRule\Model\Resource\Report\Rule'
+        );
+        $reportResource->aggregate();
+        /** @var \Magento\SalesRule\Model\Resource\Report\Collection $reportCollection */
+        $reportCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+            'Magento\SalesRule\Model\Resource\Report\Collection'
+        );
+        $salesRuleReportItem = $reportCollection->getFirstItem();
+        $this->assertEquals($this->getTotalAmount($order), $salesRuleReportItem['total_amount']);
+        $this->assertEquals($this->getTotalAmountActual($order), $salesRuleReportItem['total_amount_actual']);
+    }
+
+    /**
+     * Repeat sql formula from \Magento\SalesRule\Model\Resource\Report\Rule\Createdat::_aggregateByOrder
+     *
+     * @param \Magento\Sales\Model\Order $order
+     * @return float
+     */
+    private function getTotalAmount(\Magento\Sales\Model\Order $order)
+    {
+        return (
+            $order->getBaseSubtotal() - $order->getBaseSubtotalCanceled()
+            - (abs($order->getBaseDiscountAmount()) - abs($order->getBaseDiscountCanceled()))
+            + ($order->getBaseTaxAmount() - $order->getBaseTaxCanceled())
+        ) * $order->getBaseToGlobalRate();
+    }
+
+    /**
+     * Repeat sql formula from \Magento\SalesRule\Model\Resource\Report\Rule\Createdat::_aggregateByOrder
+     *
+     * @param \Magento\Sales\Model\Order $order
+     * @return float
+     */
+    private function getTotalAmountActual(\Magento\Sales\Model\Order $order)
+    {
+        return (
+            $order->getBaseSubtotalInvoiced() - $order->getSubtotalRefunded()
+            - abs($order->getBaseDiscountInvoiced()) - abs($order->getBaseDiscountRefunded())
+            + $order->getBaseTaxInvoiced() - $order->getBaseTaxRefunded()
+        ) * $order->getBaseToGlobalRate();
+    }
+
+    /**
+     * @return array
+     */
+    public function orderParamsDataProvider()
+    {
+        return [
+            [
+                [
+                    'base_discount_amount' => 98.80,
+                    'base_subtotal' => 494,
+                    'base_tax_amount' => 8.8,
+                    'base_subtotal_invoiced' => 494,
+                    'base_discount_invoiced' => 98.80,
+                    'base_tax_invoiced' => 8.8
+                ]
+            ]
+        ];
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/TaxClass/Source/CustomerTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/TaxClass/Source/CustomerTest.php
index 94bcf24352b16bfd9c3d816990bcb9fac6695b67..f6ef2eced2db724e13d211dff8d906144e443e80 100644
--- a/dev/tests/integration/testsuite/Magento/Tax/Model/TaxClass/Source/CustomerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Tax/Model/TaxClass/Source/CustomerTest.php
@@ -27,7 +27,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
         $source = Bootstrap::getObjectManager()->get('Magento\Tax\Model\TaxClass\Source\Customer');
         $this->assertEquals(
             $expectedResult,
-            $source->getAllOptions(false),
+            $source->getAllOptions(),
             'Tax Class options are invalid.'
         );
     }
@@ -46,7 +46,6 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
         if (empty($expectedResult)) {
             $this->fail('Preconditions failed: At least one tax class should be available.');
         }
-        $expectedResult = array_merge([['value' => '0', 'label' => __('None')]], $expectedResult);
         /** @var \Magento\Tax\Model\TaxClass\Source\Product $source */
         $source = Bootstrap::getObjectManager()->get('Magento\Tax\Model\TaxClass\Source\Customer');
         $this->assertEquals(
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
index 07fe86d82d8068908c698b11f38be652418aa0a6..425044b2bdd626b6dea92862fe818cc8b1a239c4 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
@@ -2001,6 +2001,11 @@ return [
     ['getScriptTranslation', 'Magento\Framework\LocaleInterface'],
     ['getCountryTranslation', 'Magento\Framework\LocaleInterface'],
     ['getTerritoryTranslation', 'Magento\Framework\LocaleInterface'],
+    [
+        'getNoteNotify',
+        'Magento\Sales\Block\Adminhtml\Order\Create\Comment',
+        'Magento\Sales\Block\Adminhtml\Order\Create\Totals'
+    ],
     ['getLinksConfig', 'Magento\Downloadable\Block\Catalog\Product\Links'],
     ['getAuthorizationAmounts', 'Magento\Paypal\Model\Config'],
     ['cleanTransactions', 'Magento\Paypal\Model\Observer']
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
index 89690a5dd630054c8c4bddbf318749ef6162600b..083fbe5c84c2fbab4e519adeb8e61f21d67feacb 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
@@ -144,3 +144,4 @@ app/code/Magento/Sales/Model/Spi
 Magento/Catalog/Model/ProductLink
 Magento/GroupedProduct/Model/Resource/Product/Type/Grouped
 lib/internal/Magento/Framework/Interception/ObjectManager/Config
+app/code/Magento/OfflinePayments/Model
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..9237b9f7ff895f02c4394d41bbc7d0e0803b0d9d
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php
@@ -0,0 +1,356 @@
+<?php
+/**
+ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ */
+namespace Magento\Persistent\Block\Header;
+
+/**
+ * Class AdditionalTest
+ */
+class AdditionalTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Customer\Helper\View|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $customerViewHelperMock;
+
+    /**
+     * @var \Magento\Persistent\Helper\Session|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $persistentSessionHelperMock;
+
+    /**
+     * Customer repository
+     *
+     * @var \Magento\Customer\Api\CustomerRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $customerRepositoryMock;
+
+    /**
+     * @var \Magento\Framework\View\Element\Template\Context|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $contextMock;
+
+    /**
+     * @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $eventManagerMock;
+
+    /**
+     * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $scopeConfigMock;
+
+    /**
+     * @var \Magento\Framework\App\Cache\StateInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $cacheStateMock;
+
+    /**
+     * @var \Magento\Framework\App\CacheInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $cacheMock;
+
+    /**
+     * @var \Magento\Framework\Session\SidResolverInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $sidResolverMock;
+
+    /**
+     * @var \Magento\Framework\Session\SessionManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $sessionMock;
+
+    /**
+     * @var \Magento\Framework\Escaper|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $escaperMock;
+
+    /**
+     * @var \Magento\Framework\UrlInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $urlBuilderMock;
+
+    /**
+     * @var \Magento\Persistent\Block\Header\Additional
+     */
+    protected $additional;
+
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * Set up
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $this->contextMock = $this->getMock(
+            'Magento\Framework\View\Element\Template\Context',
+            [
+                'getEventManager',
+                'getScopeConfig',
+                'getCacheState',
+                'getCache',
+                'getInlineTranslation',
+                'getSidResolver',
+                'getSession',
+                'getEscaper',
+                'getUrlBuilder'
+            ],
+            [],
+            '',
+            false
+        );
+        $this->customerViewHelperMock = $this->getMock(
+            'Magento\Customer\Helper\View',
+            [],
+            [],
+            '',
+            false
+        );
+        $this->persistentSessionHelperMock = $this->getMock(
+            'Magento\Persistent\Helper\Session',
+            ['getSession'],
+            [],
+            '',
+            false
+        );
+        $this->customerRepositoryMock = $this->getMockForAbstractClass(
+            'Magento\Customer\Api\CustomerRepositoryInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['getById']
+        );
+
+        $this->eventManagerMock = $this->getMockForAbstractClass(
+            'Magento\Framework\Event\ManagerInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['dispatch']
+        );
+        $this->scopeConfigMock = $this->getMockForAbstractClass(
+            'Magento\Framework\App\Config\ScopeConfigInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['getValue']
+        );
+        $this->cacheStateMock = $this->getMockForAbstractClass(
+            'Magento\Framework\App\Cache\StateInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['isEnabled']
+        );
+        $this->cacheMock = $this->getMockForAbstractClass(
+            'Magento\Framework\App\CacheInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['load']
+        );
+        $this->sidResolverMock = $this->getMockForAbstractClass(
+            'Magento\Framework\Session\SidResolverInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['getSessionIdQueryParam']
+        );
+        $this->sessionMock = $this->getMockForAbstractClass(
+            'Magento\Framework\Session\SessionManagerInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['getSessionId']
+        );
+        $this->escaperMock = $this->getMockForAbstractClass(
+            'Magento\Framework\Escaper',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['escapeHtml']
+        );
+        $this->urlBuilderMock = $this->getMockForAbstractClass(
+            'Magento\Framework\UrlInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['getUrl']
+        );
+
+        $this->contextMock->expects($this->once())
+            ->method('getEventManager')
+            ->willReturn($this->eventManagerMock);
+        $this->contextMock->expects($this->once())
+            ->method('getScopeConfig')
+            ->willReturn($this->scopeConfigMock);
+        $this->contextMock->expects($this->once())
+            ->method('getCacheState')
+            ->willReturn($this->cacheStateMock);
+        $this->contextMock->expects($this->once())
+            ->method('getCache')
+            ->willReturn($this->cacheMock);
+        $this->contextMock->expects($this->once())
+            ->method('getSidResolver')
+            ->willReturn($this->sidResolverMock);
+        $this->contextMock->expects($this->once())
+            ->method('getSession')
+            ->willReturn($this->sessionMock);
+        $this->contextMock->expects($this->once())
+            ->method('getEscaper')
+            ->willReturn($this->escaperMock);
+        $this->contextMock->expects($this->once())
+            ->method('getUrlBuilder')
+            ->willReturn($this->urlBuilderMock);
+
+        $this->additional = $this->objectManager->getObject(
+            'Magento\Persistent\Block\Header\Additional',
+            [
+                'context' => $this->contextMock,
+                'customerViewHelper' => $this->customerViewHelperMock,
+                'persistentSessionHelper' => $this->persistentSessionHelperMock,
+                'customerRepository' => $this->customerRepositoryMock,
+                'data' => []
+            ]
+        );
+    }
+
+    /**
+     * Run test toHtml method
+     *
+     * @param bool $customerId
+     * @return void
+     *
+     * @dataProvider dataProviderToHtml
+     */
+    public function testToHtml($customerId)
+    {
+        $cacheData = false;
+        $idQueryParam = 'id-query-param';
+        $sessionId = 'session-id';
+        $customerName = 'customer-name';
+
+        $this->additional->setData('cache_lifetime', 789);
+        $this->additional->setData('cache_key', 'cache-key');
+
+        $this->eventManagerMock->expects($this->once())
+            ->method('dispatch')
+            ->with('view_block_abstract_to_html_before', ['block' => $this->additional]);
+        $this->scopeConfigMock->expects($this->once())
+            ->method('getValue')
+            ->with(
+                'advanced/modules_disable_output/Magento_Persistent',
+                \Magento\Store\Model\ScopeInterface::SCOPE_STORE
+            )->willReturn(false);
+
+        // get cache
+        $this->cacheStateMock->expects($this->at(0))
+            ->method('isEnabled')
+            ->with(\Magento\Persistent\Block\Header\Additional::CACHE_GROUP)
+            ->willReturn(true);
+        // save cache
+        $this->cacheStateMock->expects($this->at(1))
+            ->method('isEnabled')
+            ->with(\Magento\Persistent\Block\Header\Additional::CACHE_GROUP)
+            ->willReturn(false);
+
+        $this->cacheMock->expects($this->once())
+            ->method('load')
+            ->willReturn($cacheData);
+        $this->sidResolverMock->expects($this->never())
+            ->method('getSessionIdQueryParam')
+            ->with($this->sessionMock)
+            ->willReturn($idQueryParam);
+        $this->sessionMock->expects($this->never())
+            ->method('getSessionId')
+            ->willReturn($sessionId);
+
+        // call protected _toHtml method
+        $sessionMock = $this->getMock(
+            'Magento\Persistent\Model\Session',
+            ['getCustomerId'],
+            [],
+            '',
+            false
+        );
+
+        $this->persistentSessionHelperMock->expects($this->atLeastOnce())
+            ->method('getSession')
+            ->willReturn($sessionMock);
+
+        $sessionMock->expects($this->atLeastOnce())
+            ->method('getCustomerId')
+            ->willReturn($customerId);
+
+        if ($customerId) {
+
+            $customerMock = $this->getMockForAbstractClass(
+                'Magento\Customer\Api\Data\CustomerInterface',
+                [],
+                '',
+                false,
+                true,
+                true,
+                []
+            );
+
+            $this->customerRepositoryMock->expects($this->once())
+                ->method('getById')
+                ->with($customerId)
+                ->willReturn($customerMock);
+
+            $this->customerViewHelperMock->expects($this->once())
+                ->method('getCustomerName')
+                ->with($customerMock)
+                ->willReturn($customerName);
+
+            $this->escaperMock->expects($this->at(0))
+                ->method('escapeHtml')
+                ->with($customerName)
+                ->willReturn($customerName);
+
+            $this->assertEquals('<span><a  >(Not customer-name?)</a></span>', $this->additional->toHtml());
+        } else {
+            $this->assertEquals('', $this->additional->toHtml());
+        }
+    }
+
+    /**
+     * Data provider for dataProviderToHtml method
+     *
+     * @return array
+     */
+    public function dataProviderToHtml()
+    {
+        return [
+            ['customerId' => 2],
+            ['customerId' => null],
+        ];
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Model/Layout/DepersonalizePluginTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Model/Layout/DepersonalizePluginTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..4e92b86b297d766ee1e177c0d5679bdc65cb4faf
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/Layout/DepersonalizePluginTest.php
@@ -0,0 +1,163 @@
+<?php
+/**
+ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ */
+namespace Magento\Persistent\Model\Layout;
+
+/**
+ * Class DepersonalizePluginTest
+ */
+class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Persistent\Model\Session|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $persistentSessionMock;
+
+    /**
+     * @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $requestMock;
+
+    /**
+     * @var \Magento\Framework\Module\Manager|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $moduleManagerMock;
+
+    /**
+     * @var \Magento\PageCache\Model\Config|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $cacheConfigMock;
+
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * @var \Magento\Persistent\Model\Layout\DepersonalizePlugin
+     */
+    protected $plugin;
+
+    /**
+     * Set up
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $this->persistentSessionMock = $this->getMock(
+            'Magento\Persistent\Model\Session',
+            ['setCustomerId'],
+            [],
+            '',
+            false
+        );
+
+        $this->requestMock = $this->getMockForAbstractClass(
+            'Magento\Framework\App\RequestInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['isAjax']
+        );
+        $this->moduleManagerMock = $this->getMock(
+            'Magento\Framework\Module\Manager',
+            ['isEnabled'],
+            [],
+            '',
+            false
+        );
+        $this->cacheConfigMock = $this->getMock(
+            'Magento\PageCache\Model\Config',
+            ['isEnabled'],
+            [],
+            '',
+            false
+        );
+
+        $this->plugin = $this->objectManager->getObject(
+            'Magento\Persistent\Model\Layout\DepersonalizePlugin',
+            [
+                'persistentSession' => $this->persistentSessionMock,
+                'request' => $this->requestMock,
+                'moduleManager' => $this->moduleManagerMock,
+                'cacheConfig' => $this->cacheConfigMock
+            ]
+        );
+    }
+
+    /**
+     * Run test afterGenerateXml method
+     *
+     * @param bool $result
+     *
+     * @dataProvider dataProviderAfterGenerateXml
+     */
+    public function testAfterGenerateXml($result)
+    {
+        /** @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject $subjectMock */
+        $subjectMock = $this->getMockForAbstractClass(
+            'Magento\Framework\View\LayoutInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['isCacheable']
+        );
+        /** @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject $resultMock */
+        $resultMock = $this->getMockForAbstractClass(
+            'Magento\Framework\View\LayoutInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            []
+        );
+
+        $this->moduleManagerMock->expects($this->once())
+            ->method('isEnabled')
+            ->with('Magento_PageCache')
+            ->willReturn($result);
+        $this->cacheConfigMock->expects($this->any())
+            ->method('isEnabled')
+            ->willReturn($result);
+        $this->requestMock->expects($this->any())
+            ->method('isAjax')
+            ->willReturn(!$result);
+        $subjectMock->expects($this->any())
+            ->method('isCacheable')
+            ->willReturn($result);
+
+        if ($result) {
+            $this->persistentSessionMock->expects($this->once())
+                ->method('setCustomerId')
+                ->with(null);
+        } else {
+            $this->persistentSessionMock->expects($this->never())
+                ->method('setCustomerId')
+                ->with(null);
+        }
+
+        $this->assertEquals($resultMock, $this->plugin->afterGenerateXml($subjectMock, $resultMock));
+    }
+
+    /**
+     * Data provider for testAfterGenerateXml
+     *
+     * @return array
+     */
+    public function dataProviderAfterGenerateXml()
+    {
+        return [
+            ['result' => true],
+            ['result' => false]
+        ];
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/AbstractConditionTest.php b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/AbstractConditionTest.php
index ba41ccae4d43eb879a598c7b938a958421f704ea..9d1f9f3ac6f0af6db46d7c80c0e1cdff08bc0231 100644
--- a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/AbstractConditionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/AbstractConditionTest.php
@@ -106,6 +106,48 @@ class AbstractConditionTest extends \PHPUnit_Framework_TestCase
         );
     }
 
+    /**
+     * @param $existingValue
+     * @param $operator
+     * @param $valueForValidate
+     * @param $expectedResult
+     *
+     * @dataProvider validateAttributeDataProvider
+     */
+    public function testValidate($existingValue, $operator, $valueForValidate, $expectedResult)
+    {
+        $objectMock = $this->getMock(
+            'Magento\Framework\Model\AbstractModel',
+            ['hasData', 'load', 'getId', 'getData'],
+            [],
+            '',
+            false
+        );
+        $objectMock->expects($this->once())
+            ->method('hasData')
+            ->willReturn(false);
+        $objectMock->expects($this->once())
+            ->method('getId')
+            ->willReturn(7);
+        $objectMock->expects($this->once())
+            ->method('load')
+            ->with(7);
+        $objectMock->expects($this->once())
+            ->method('getData')
+            ->willReturn($valueForValidate);
+
+        $this->_condition->setOperator($operator);
+        $this->_condition->setData('value_parsed', $existingValue);
+        $this->assertEquals(
+            $expectedResult,
+            $this->_condition->validate($objectMock),
+            "Failed asserting that "
+            . var_export($existingValue, true)
+            . $operator
+            . var_export($valueForValidate, true)
+        );
+    }
+
     public function validateAttributeArrayInputTypeDataProvider()
     {
         return [
diff --git a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php
index 97289d77f0598c92a3f42df1faf45b58e14b4e62..93ad5f6f97d44e8b5012a8df2c51edb88bfa1173 100644
--- a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php
+++ b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/Product/AbstractProductTest.php
@@ -55,7 +55,7 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase
 
     public function testValidateAttributeEqualCategoryId()
     {
-        $product = $this->getMock('\Magento\Framework\Object', ["getAttribute"], [], '', false);
+        $product = $this->getMock('Magento\Framework\Model\AbstractModel', ["getAttribute"], [], '', false);
         $this->_condition->setAttribute('category_ids');
         $product->setAvailableInCategories(new \Magento\Framework\Object());
         $this->assertFalse($this->_condition->validate($product));
@@ -63,7 +63,16 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase
 
     public function testValidateEmptyEntityAttributeValues()
     {
-        $product = $this->getMock('\Magento\Framework\Object', ["getAttribute"], [], '', false);
+        $product = $this->getMock(
+            'Magento\Framework\Model\AbstractModel',
+            ["getAttribute", 'getResource'],
+            [],
+            '',
+            false
+        );
+        $product->expects($this->once())
+            ->method('getResource')
+            ->willReturn(null);
         $product->setId(1);
         $configProperty = new \ReflectionProperty(
             'Magento\Rule\Model\Condition\Product\AbstractProduct',
@@ -76,7 +85,13 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase
 
     public function testValidateEmptyEntityAttributeValuesWithResource()
     {
-        $product = $this->getMock('\Magento\Framework\Object', ["getAttribute"], [], '', false);
+        $product = $this->getMock(
+            'Magento\Framework\Model\AbstractModel',
+            ["getAttribute", 'getResource'],
+            [],
+            '',
+            false
+        );
         $product->setId(1);
         $time = '04/19/2012 11:59 am';
         $product->setData('someAttribute', $time);
@@ -103,8 +118,10 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase
             ->with('someAttribute')
             ->will($this->returnValue($attribute));
         $newResource->_config = $this->getMock('Magento\Eav\Model\Config', [], [], '', false);
+        $product->expects($this->atLeastOnce())
+            ->method('getResource')
+            ->willReturn($newResource);
 
-        $product->setResource($newResource);
         $this->assertFalse($this->_condition->validate($product));
 
         $product->setData('someAttribute', 'option1,option2,option3');
@@ -125,7 +142,13 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase
     public function testValidateSetEntityAttributeValuesWithResource()
     {
         $this->_condition->setAttribute('someAttribute');
-        $product = $this->getMock('\Magento\Framework\Object', ['getAttribute'], [], '', false);
+        $product = $this->getMock(
+            'Magento\Framework\Model\AbstractModel',
+            ['getAttribute', 'getResource'],
+            [],
+            '',
+            false
+        );
         $product->setAtribute('attribute');
         $product->setId(12);
 
@@ -146,7 +169,9 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($attribute));
         $newResource->_config = $this->getMock('Magento\Eav\Model\Config', [], [], '', false);
 
-        $product->setResource($newResource);
+        $product->expects($this->atLeastOnce())
+            ->method('getResource')
+            ->willReturn($newResource);
 
         $this->_entityAttributeValuesProperty->setValue(
             $this->_condition,
@@ -161,7 +186,13 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase
 
     public function testValidateSetEntityAttributeValuesWithoutResource()
     {
-        $product = $this->getMock('\Magento\Framework\Object', ['someMethod'], [], '', false);
+        $product = $this->getMock(
+            'Magento\Framework\Model\AbstractModel',
+            ['someMethod', 'getResource', 'load'],
+            [],
+            '',
+            false
+        );
         $this->_condition->setAttribute('someAttribute');
         $product->setAtribute('attribute');
         $product->setId(12);
@@ -198,7 +229,9 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($attribute));
         $newResource->_config = $this->getMock('Magento\Eav\Model\Config', [], [], '', false);
 
-        $product->setResource($newResource);
+        $product->expects($this->atLeastOnce())
+            ->method('getResource')
+            ->willReturn($newResource);
 
         $this->_entityAttributeValuesProperty->setValue(
             $this->_condition,
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/TotalsTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/TotalsTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..79deefa5c8c7908bc27408326e7911afff6ef7fe
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/TotalsTest.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ */
+namespace Magento\Sales\Block\Adminhtml\Order\Create;
+
+use Magento\TestFramework\Helper\ObjectManager;
+
+/**
+ * Totals block test
+ */
+class TotalsTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * @var \Magento\Sales\Block\Adminhtml\Order\Create\Totals
+     */
+    protected $totals;
+
+    /**
+     * @var \Magento\Sales\Model\Quote|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $quoteMock;
+
+    /**
+     * @var \Magento\Backend\Model\Session\Quote|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $sessionQuoteMock;
+
+    protected function setUp()
+    {
+        $this->objectManager = new ObjectManager($this);
+
+        $this->quoteMock = $this->getMock(
+            '\Magento\Sales\Model\Quote', ['getCustomerNoteNotify'], [], '', false
+        );
+        $this->sessionQuoteMock = $this->getMock(
+            '\Magento\Backend\Model\Session\Quote', [], [], '', false
+        );
+
+        $this->sessionQuoteMock->expects($this->any())
+            ->method('getQuote')
+            ->willReturn($this->quoteMock);
+
+        $this->totals = $this->objectManager->getObject(
+            '\Magento\Sales\Block\Adminhtml\Order\Create\Totals',
+            [
+                'sessionQuote' => $this->sessionQuoteMock
+            ]
+        );
+    }
+
+    /**
+     * @param mixed $customerNoteNotify
+     * @param bool $expectedResult
+     * @dataProvider getNoteNotifyDataProvider
+     */
+    public function testGetNoteNotify($customerNoteNotify, $expectedResult)
+    {
+        $this->quoteMock->expects($this->any())
+            ->method('getCustomerNoteNotify')
+            ->willReturn($customerNoteNotify);
+
+        $this->assertEquals($expectedResult, $this->totals->getNoteNotify());
+    }
+
+    /**
+     * @return array
+     */
+    public function getNoteNotifyDataProvider()
+    {
+        return [
+            [0, false],
+            [1, true],
+            ['0', false],
+            ['1', true],
+            [null, true]
+        ];
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/View/Tab/Stub/OnlineMethod.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/View/Tab/Stub/OnlineMethod.php
new file mode 100644
index 0000000000000000000000000000000000000000..28818895ef30c57dfce4c1b52c97890b5f5fc137
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/View/Tab/Stub/OnlineMethod.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ */
+namespace Magento\Sales\Block\Adminhtml\Order\View\Tab\Stub;
+
+/**
+ * Stub for an online payment method
+ */
+class OnlineMethod extends \Magento\Payment\Model\Method\AbstractMethod
+{
+    /**
+     * Availability option
+     *
+     * @var bool
+     */
+    protected $_isOffline = false;
+}
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/View/Tab/TransactionsTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/View/Tab/TransactionsTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..f82ea8b4220103e75002921f7e153b19ced441cc
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/View/Tab/TransactionsTest.php
@@ -0,0 +1,129 @@
+<?php
+/**
+ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ */
+namespace Magento\Sales\Block\Adminhtml\Order\View\Tab;
+
+/**
+ * Order transactions tab test
+ */
+class TransactionsTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * @var \Magento\Sales\Block\Adminhtml\Order\View\Tab\Transactions
+     */
+    protected $transactionsTab;
+
+    /**
+     * @var \Magento\Framework\Authorization|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $authorizationMock;
+
+    /**
+     * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $coreRegistryMock;
+
+    /**
+     * @var \Magento\Sales\Model\Order|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $orderMock;
+
+    /**
+     * @var \Magento\Sales\Model\Order\Payment|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $paymentMock;
+
+    protected function setUp()
+    {
+        $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $this->authorizationMock = $this->getMock('\Magento\Framework\Authorization', [], [], '', false);
+        $this->coreRegistryMock = $this->getMock('Magento\Framework\Registry', [], [], '', false);
+        $this->orderMock = $this->getMock('\Magento\Sales\Model\Order', [], [], '', false);
+        $this->paymentMock = $this->getMock('\Magento\Sales\Model\Order\Payment', [], [], '', false);
+
+        $this->coreRegistryMock->expects($this->any())
+            ->method('registry')
+            ->with('current_order')
+            ->willReturn($this->orderMock);
+
+        $this->orderMock->expects($this->any())
+            ->method('getPayment')
+            ->willReturn($this->paymentMock);
+
+        $this->transactionsTab = $this->objectManager->getObject(
+            'Magento\Sales\Block\Adminhtml\Order\View\Tab\Transactions',
+            [
+                'authorization' => $this->authorizationMock,
+                'registry' => $this->coreRegistryMock
+            ]
+        );
+    }
+
+    public function testGetOrder()
+    {
+        $this->assertInstanceOf('\Magento\Sales\Model\Order', $this->transactionsTab->getOrder());
+    }
+
+    /**
+     * @param string $methodClass
+     * @param bool $expectedResult
+     * @depends testGetOrder
+     * @dataProvider canShowTabDataProvider
+     */
+    public function testCanShowTab($methodClass, $expectedResult)
+    {
+        $methodInstance = $this->objectManager->getObject($methodClass);
+        $this->paymentMock->expects($this->any())
+            ->method('getMethodInstance')
+            ->willReturn($methodInstance);
+
+        $this->assertEquals($expectedResult, $this->transactionsTab->canShowTab());
+    }
+
+    /**
+     * @return array
+     */
+    public function canShowTabDataProvider()
+    {
+        return [
+            ['\Magento\Sales\Block\Adminhtml\Order\View\Tab\Stub\OnlineMethod', true],
+            ['\Magento\OfflinePayments\Model\Cashondelivery', false],
+            ['\Magento\OfflinePayments\Model\Checkmo', false],
+            ['\Magento\OfflinePayments\Model\Banktransfer', false],
+            ['\Magento\OfflinePayments\Model\Purchaseorder', false]
+        ];
+    }
+
+    /**
+     * @param bool $isAllowed
+     * @param bool $expectedResult
+     * @dataProvider isHiddenDataProvider
+     */
+    public function testIsHidden($isAllowed, $expectedResult)
+    {
+        $this->authorizationMock->expects($this->any())
+            ->method('isAllowed')
+            ->with('Magento_Sales::transactions_fetch')
+            ->willReturn($isAllowed);
+
+        $this->assertEquals($expectedResult, $this->transactionsTab->isHidden());
+    }
+
+    /**
+     * @return array
+     */
+    public function isHiddenDataProvider()
+    {
+        return [
+            [true, false],
+            [false, true]
+        ];
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/OrderTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/OrderTest.php
index 17e91454fa8cdab23e95d7c8fc8f49d868e3a814..6af26f5a8165ff5d41b2ca92cd10dbe50ee0ae12 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/OrderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/OrderTest.php
@@ -4,6 +4,8 @@
  */
 namespace Magento\Sales\Model;
 
+use Magento\Sales\Model\Resource\Order\Status\History\CollectionFactory as HistoryCollectionFactory;
+
 /**
  * Test class for \Magento\Sales\Model\Order
  */
@@ -39,6 +41,11 @@ class OrderTest extends \PHPUnit_Framework_TestCase
      */
     protected $item;
 
+    /**
+     * @var HistoryCollectionFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $historyCollectionFactoryMock;
+
     protected function setUp()
     {
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
@@ -56,6 +63,13 @@ class OrderTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
+        $this->historyCollectionFactoryMock = $this->getMock(
+            'Magento\Sales\Model\Resource\Order\Status\History\CollectionFactory',
+            ['create'],
+            [],
+            '',
+            false
+        );
         $this->item = $this->getMock(
             'Magento\Sales\Model\Resource\Order\Item',
             ['isDeleted', 'getQtyToInvoice', 'getParentItemId', 'getQuoteItemId'],
@@ -87,7 +101,8 @@ class OrderTest extends \PHPUnit_Framework_TestCase
                 'paymentCollectionFactory' => $this->paymentCollectionFactoryMock,
                 'orderItemCollectionFactory' => $this->orderItemCollectionFactoryMock,
                 'data' => ['increment_id' => $this->incrementId],
-                'context' => $context
+                'context' => $context,
+                'historyCollectionFactory' => $this->historyCollectionFactoryMock
             ]
         );
     }
@@ -484,4 +499,70 @@ class OrderTest extends \PHPUnit_Framework_TestCase
     {
         $this->assertEquals('order', $this->order->getEntityType());
     }
+
+    /**
+     * Run test getStatusHistories method
+     *
+     * @return void
+     */
+    public function testGetStatusHistories()
+    {
+        $itemMock = $this->getMockForAbstractClass(
+            'Magento\Sales\Api\Data\OrderStatusHistoryInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['setOrder']
+        );
+        $dbMock = $this->getMock(
+            'Magento\Framework\Data\Collection\Db',
+            ['setOrder'],
+            [],
+            '',
+            false
+        );
+        $collectionMock = $this->getMock(
+            'Magento\Sales\Model\Resource\Order\Status\History\Collection',
+            [
+                'setOrderFilter',
+                'setOrder',
+                'getItems',
+                'getIterator',
+                'toOptionArray',
+                'count',
+                'load'
+            ],
+            [],
+            '',
+            false
+        );
+
+        $collectionItems = [$itemMock];
+
+        $collectionMock->expects($this->once())
+            ->method('setOrderFilter')
+            ->with($this->order)
+            ->willReturnSelf();
+        $collectionMock->expects($this->once())
+            ->method('setOrder')
+            ->with('created_at', 'desc')
+            ->willReturn($dbMock);
+        $dbMock->expects($this->once())
+            ->method('setOrder')
+            ->with('entity_id', 'desc')
+            ->willReturn($collectionMock);
+        $collectionMock->expects($this->once())
+            ->method('getItems')
+            ->willReturn($collectionItems);
+
+        $this->historyCollectionFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($collectionMock);
+
+        for ($i = 10; --$i;) {
+            $this->assertEquals($collectionItems, $this->order->getStatusHistories());
+        }
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/RulesApplierTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/RulesApplierTest.php
index bc875f4835b177b4cd8f2ce1e657c20c3fdd703e..200e619dbfcbed2678ce3ae894a762c019289a84 100644
--- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/RulesApplierTest.php
+++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/RulesApplierTest.php
@@ -58,10 +58,16 @@ class RulesApplierTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    public function testApplyRulesWhenRuleWithStopRulesProcessingIsUsed()
+    /**
+     * @param bool $isChildren
+     * @param bool $isContinue
+     *
+     * @dataProvider dataProviderChildren
+     */
+    public function testApplyRulesWhenRuleWithStopRulesProcessingIsUsed($isChildren, $isContinue)
     {
         $positivePrice = 1;
-        $skipValidation = true;
+        $skipValidation = false;
         $item = $this->getPreparedItem();
         $couponCode = 111;
 
@@ -73,7 +79,7 @@ class RulesApplierTest extends \PHPUnit_Framework_TestCase
          */
         $ruleWithStopFurtherProcessing = $this->getMock(
             'Magento\SalesRule\Model\Rule',
-            ['getStoreLabel', 'getCouponType', 'getRuleId', '__wakeup'],
+            ['getStoreLabel', 'getCouponType', 'getRuleId', '__wakeup', 'getActions'],
             [],
             '',
             false
@@ -87,6 +93,14 @@ class RulesApplierTest extends \PHPUnit_Framework_TestCase
             false
         );
 
+        $actionMock = $this->getMock(
+            'Magento\Rule\Model\Action\Collection',
+            ['validate'],
+            [],
+            '',
+            false
+        );
+
         $ruleWithStopFurtherProcessing->setName('ruleWithStopFurtherProcessing');
         $ruleThatShouldNotBeRun->setName('ruleThatShouldNotBeRun');
         $rules = [$ruleWithStopFurtherProcessing, $ruleThatShouldNotBeRun];
@@ -96,20 +110,52 @@ class RulesApplierTest extends \PHPUnit_Framework_TestCase
 
         $this->validatorUtility->expects($this->atLeastOnce())
             ->method('canProcessRule')
-            ->will(
-                $this->returnValue(true)
-            );
-        $ruleWithStopFurtherProcessing->expects($this->any())
-            ->method('getRuleId')
-            ->will($this->returnValue($ruleId));
-        $this->applyRule($item, $ruleWithStopFurtherProcessing);
-        $ruleWithStopFurtherProcessing->setStopRulesProcessing(true);
-        $ruleThatShouldNotBeRun->expects($this->never())
-            ->method('getStopRulesProcessing');
+            ->will($this->returnValue(true));
+
+        $ruleWithStopFurtherProcessing->expects($this->atLeastOnce())
+            ->method('getActions')
+            ->willReturn($actionMock);
+        $actionMock->expects($this->at(0))
+            ->method('validate')
+            ->with($item)
+            ->willReturn(!$isChildren);
+
+        // if there are child elements, check them
+        if ($isChildren) {
+            $item->expects($this->atLeastOnce())
+                ->method('getChildren')
+                ->willReturn([$item]);
+            $actionMock->expects($this->at(1))
+                ->method('validate')
+                ->with($item)
+                ->willReturn(!$isContinue);
+        }
+
+        //
+        if (!$isContinue || !$isChildren) {
+            $ruleWithStopFurtherProcessing->expects($this->any())
+                ->method('getRuleId')
+                ->will($this->returnValue($ruleId));
+
+            $this->applyRule($item, $ruleWithStopFurtherProcessing);
+
+            $ruleWithStopFurtherProcessing->setStopRulesProcessing(true);
+            $ruleThatShouldNotBeRun->expects($this->never())
+                ->method('getStopRulesProcessing');
+        }
+
         $result = $this->rulesApplier->applyRules($item, $rules, $skipValidation, $couponCode);
         $this->assertEquals($appliedRuleIds, $result);
     }
 
+    public function dataProviderChildren()
+    {
+        return [
+            ['isChildren' => true, 'isContinue' => false],
+            ['isChildren' => false, 'isContinue' => true],
+        ];
+    }
+
     /**
      * @return \Magento\Sales\Model\Quote\Item\AbstractItem|\PHPUnit_Framework_MockObject_MockObject
      */
@@ -137,7 +183,8 @@ class RulesApplierTest extends \PHPUnit_Framework_TestCase
                 'setDiscountPercent',
                 'getAddress',
                 'setAppliedRuleIds',
-                '__wakeup'
+                '__wakeup',
+                'getChildren'
             ],
             [],
             '',
diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/TaxClass/Source/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Tax/Model/TaxClass/Source/CustomerTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..2787e1c44c582e7280ca89617c703b9bd351bbfe
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Tax/Model/TaxClass/Source/CustomerTest.php
@@ -0,0 +1,183 @@
+<?php
+/**
+ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ */
+namespace Magento\Tax\Model\TaxClass\Source;
+
+use Magento\TestFramework\Helper\ObjectManager;
+
+class CustomerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Tax\Api\TaxClassRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $taxClassRepositoryMock;
+
+    /**
+     * @var \Magento\Framework\Api\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $searchCriteriaBuilderMock;
+
+    /**
+     * @var \Magento\Framework\Api\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $filterBuilderMock;
+
+    /**
+     * @var \Magento\Tax\Model\TaxClass\Source\Customer
+     */
+    protected $customer;
+
+    /**
+     * @var ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * Set up
+     *
+     * @return void
+     */
+    protected function setUp()
+    {
+        $this->objectManager = new ObjectManager($this);
+
+        $this->taxClassRepositoryMock = $this->getMockForAbstractClass(
+            'Magento\Tax\Api\TaxClassRepositoryInterface',
+            ['getList'],
+            '',
+            false,
+            true,
+            true,
+            []
+        );
+        $this->searchCriteriaBuilderMock = $this->getMock(
+            'Magento\Framework\Api\SearchCriteriaBuilder',
+            ['addFilter', 'create'],
+            [],
+            '',
+            false
+        );
+        $this->filterBuilderMock = $this->getMock(
+            'Magento\Framework\Api\FilterBuilder',
+            ['setField', 'setValue', 'create'],
+            [],
+            '',
+            false
+        );
+
+        $this->customer = $this->objectManager->getObject(
+            'Magento\Tax\Model\TaxClass\Source\Customer',
+            [
+                'taxClassRepository' => $this->taxClassRepositoryMock,
+                'searchCriteriaBuilder' => $this->searchCriteriaBuilderMock,
+                'filterBuilder' => $this->filterBuilderMock
+            ]
+        );
+    }
+
+    /**
+     * Run test getAllOptions method
+     *
+     * @param bool $isEmpty
+     * @param array $expected
+     * @dataProvider dataProviderGetAllOptions
+     */
+    public function testGetAllOptions($isEmpty, array $expected)
+    {
+        $filterMock = $this->getMock(
+            'Magento\Framework\Api\Filter',
+            [],
+            [],
+            '',
+            false
+        );
+        $searchCriteriaMock = $this->getMock(
+            'Magento\Framework\Api\SearchCriteria',
+            [],
+            [],
+            '',
+            false
+        );
+        $searchResultsMock = $this->getMockForAbstractClass(
+            'Magento\Tax\Api\Data\TaxClassSearchResultsInterface',
+            [],
+            '',
+            false,
+            true,
+            true,
+            ['getItems']
+        );
+        $taxClassMock = $this->getMockForAbstractClass(
+            'Magento\Tax\Api\Data\TaxClassInterface',
+            ['getClassId', 'getClassName'],
+            '',
+            false,
+            true,
+            true
+        );
+
+        $this->filterBuilderMock->expects($this->once())
+            ->method('setField')
+            ->with(\Magento\Tax\Api\Data\TaxClassInterface::KEY_TYPE)
+            ->willReturnSelf();
+        $this->filterBuilderMock->expects($this->once())
+            ->method('setValue')
+            ->with(\Magento\Tax\Api\TaxClassManagementInterface::TYPE_CUSTOMER)
+            ->willReturnSelf();
+        $this->filterBuilderMock->expects($this->once())
+            ->method('create')
+            ->willReturn($filterMock);
+        $this->searchCriteriaBuilderMock->expects($this->once())
+            ->method('addFilter')
+            ->with([$filterMock])
+            ->willReturnSelf();
+        $this->searchCriteriaBuilderMock->expects($this->once())
+            ->method('create')
+            ->willReturn($searchCriteriaMock);
+        $this->taxClassRepositoryMock->expects($this->once())
+            ->method('getList')
+            ->with($searchCriteriaMock)
+            ->willReturn($searchResultsMock);
+
+        if (!$isEmpty) {
+            $taxClassMock->expects($this->once())
+                ->method('getClassId')
+                ->willReturn(10);
+            $taxClassMock->expects($this->once())
+                ->method('getClassName')
+                ->willReturn('class-name');
+
+            $items = [$taxClassMock];
+            $searchResultsMock->expects($this->once())
+                ->method('getItems')
+                ->willReturn($items);
+
+            // checking of a lack of re-initialization
+            for ($i = 10; --$i;) {
+                $result = $this->customer->getAllOptions();
+                $this->assertEquals($expected, $result);
+            }
+        } else {
+            $items = [];
+            $searchResultsMock->expects($this->once())
+                ->method('getItems')
+                ->willReturn($items);
+            // checking exception
+            $this->assertEmpty($this->customer->getAllOptions());
+        }
+    }
+
+    /**
+     * Data provider for testGetAllOptions
+     *
+     * @return array
+     */
+    public function dataProviderGetAllOptions()
+    {
+        return [
+            ['isEmpty' => false, 'expected' => [['value' => 10, 'label' => 'class-name']]],
+            ['isEmpty' => true, 'expected' => []]
+        ];
+    }
+}