diff --git a/core/modules/migrate/tests/modules/migrate_sql_source_test/config/install/migrate.migration.sql_test.yml b/core/modules/migrate/tests/modules/migrate_sql_source_test/config/install/migrate.migration.sql_test.yml
new file mode 100644
index 0000000..c3b8a8f
--- /dev/null
+++ b/core/modules/migrate/tests/modules/migrate_sql_source_test/config/install/migrate.migration.sql_test.yml
@@ -0,0 +1,16 @@
+id: sql_test
+label: SQL migration test.
+high_water_property:
+  name: changed
+source:
+  plugin: migrate_sql_test
+destination:
+  plugin: entity:node
+migration_tags:
+  test: test
+process:
+  changed: changed
+  title: title
+  type:
+    plugin: default_value
+    default_value: sql_import_node
diff --git a/core/modules/migrate/tests/modules/migrate_sql_source_test/config/install/node.type.sql_import_node.yml b/core/modules/migrate/tests/modules/migrate_sql_source_test/config/install/node.type.sql_import_node.yml
new file mode 100644
index 0000000..3aee29d
--- /dev/null
+++ b/core/modules/migrate/tests/modules/migrate_sql_source_test/config/install/node.type.sql_import_node.yml
@@ -0,0 +1,9 @@
+langcode: en
+status: true
+name: SQL import node
+type: sql_import_node
+description: ''
+help: ''
+new_revision: false
+preview_mode: 1
+display_submitted: true
diff --git a/core/modules/migrate/tests/modules/migrate_sql_source_test/migrate_sql_test.info.yml b/core/modules/migrate/tests/modules/migrate_sql_source_test/migrate_sql_test.info.yml
new file mode 100644
index 0000000..23cd53c
--- /dev/null
+++ b/core/modules/migrate/tests/modules/migrate_sql_source_test/migrate_sql_test.info.yml
@@ -0,0 +1,7 @@
+type: module
+name: Migrate SQL Source test
+description: 'Provides a database table and records for SQL import testing.'
+package: Testing
+core: 8.x
+dependencies:
+  - migrate
diff --git a/core/modules/migrate/tests/modules/migrate_sql_source_test/migrate_sql_test.install b/core/modules/migrate/tests/modules/migrate_sql_source_test/migrate_sql_test.install
new file mode 100644
index 0000000..8ea7078
--- /dev/null
+++ b/core/modules/migrate/tests/modules/migrate_sql_source_test/migrate_sql_test.install
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * Implements hook_schema().
+ */
+function migrate_sql_test_schema() {
+  $schema['migrate_sql_test'] = array(
+    'description' => 'Contains nodes to import.',
+    'fields' => array(
+      'id' => array(
+        'description' => 'Serial',
+        'type' => 'serial',
+        'unsigned' => TRUE,
+      ),
+      'changed' => array(
+        'description' => 'Highwater',
+        'type' => 'int',
+        'unsigned' => TRUE,
+      ),
+      'title' => array(
+        'description' => 'Title',
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => TRUE,
+        'default' => '',
+      ),
+    ),
+    'primary key' => array('id'),
+  );
+  return $schema;
+}
diff --git a/core/modules/migrate/tests/modules/migrate_sql_source_test/migrate_sql_test.module b/core/modules/migrate/tests/modules/migrate_sql_source_test/migrate_sql_test.module
new file mode 100644
index 0000000..0fa1def
--- /dev/null
+++ b/core/modules/migrate/tests/modules/migrate_sql_source_test/migrate_sql_test.module
@@ -0,0 +1,43 @@
+<?php
+
+/**
+ * @file
+ * Provides a database table that can be used as simple SQL migration source
+ * and a function to populate it.
+ */
+
+/**
+ * Adds or updates record in migration source table.
+ *
+ * @param string $title
+ *   Value to put in title column.
+ *
+ * @param int $changed
+ *   Value for high water property (changed).
+ *
+ * @param int $id
+ *   Id of the row to update. Optional.
+ *
+ * @return int
+ *   External item id.
+ */
+function migrate_sql_test_write_record($title, $changed, $id = NULL) {
+  $table = 'migrate_sql_test';
+  $fields = [
+    'title' => $title,
+    'changed' => $changed,
+  ];
+
+  if (is_null($id)) {
+    $id = db_insert($table)
+      ->fields($fields)
+      ->execute();
+  } else {
+    db_merge($table)
+      ->key('id', $id)
+      ->fields($fields)
+      ->execute();
+  }
+
+  return $id;
+}
diff --git a/core/modules/migrate/tests/modules/migrate_sql_source_test/src/Plugin/migrate/source/MigrateSQLTestSource.php b/core/modules/migrate/tests/modules/migrate_sql_source_test/src/Plugin/migrate/source/MigrateSQLTestSource.php
new file mode 100644
index 0000000..3e30073
--- /dev/null
+++ b/core/modules/migrate/tests/modules/migrate_sql_source_test/src/Plugin/migrate/source/MigrateSQLTestSource.php
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_sql_test\Plugin\migrate\source\MigrateSQLTestSource.
+ */
+
+namespace Drupal\migrate_sql_test\Plugin\migrate\source;
+
+use Drupal\migrate\Plugin\migrate\source\SqlBase;
+use Drupal\migrate\Row;
+
+/**
+ * Source plugin for migration tests.
+ *
+ * @MigrateSource(
+ *   id = "migrate_sql_test"
+ * )
+ */
+class MigrateSQLTestSource extends SqlBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function query() {
+    $query = $this
+      ->select('migrate_sql_test', 'm')
+      ->fields('m', array_keys($this->fields()));
+
+    return $query;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    $fields = [
+      'id' => $this->t('Id'),
+      'title' => $this->t('Title'),
+      'changed' => $this->t('Changed'),
+    ];
+
+    return $fields;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    return [
+      'id' => [
+        'type' => 'integer',
+      ],
+    ];
+  }
+
+}
diff --git a/core/modules/migrate/tests/src/Kernel/SQLBaseTest.php b/core/modules/migrate/tests/src/Kernel/SQLBaseTest.php
new file mode 100644
index 0000000..3306c1b
--- /dev/null
+++ b/core/modules/migrate/tests/src/Kernel/SQLBaseTest.php
@@ -0,0 +1,153 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\migrate\Kernel\SQLBaseTest.
+ */
+
+namespace Drupal\Tests\migrate\Kernel;
+
+use Drupal\KernelTests\KernelTestBase;
+use Drupal\migrate\Entity\Migration;
+use Drupal\migrate\MigrateExecutable;
+use Drupal\migrate\MigrateMessageInterface;
+use Drupal\Core\Database\Database;
+use Drupal\node\Entity\Node;
+
+/**
+ * Tests SQLBase - abstract source plugin class.
+ *
+ * @coversDefaultClass \Drupal\migrate\Plugin\migrate\source\SqlBase
+ * @group migrate
+ */
+class SQLBaseTest extends KernelTestBase implements MigrateMessageInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['system', 'user', 'node', 'migrate', 'migrate_sql_test'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    // Clone default database connection and save the copy as 'migrate'.
+    Database::addConnectionInfo('migrate', 'default', Database::getConnectionInfo('default')['default']);
+
+    $this->installEntitySchema('node');
+    $this->installEntitySchema('user');
+    $this->installSchema('migrate_sql_test', 'migrate_sql_test');
+    $this->installSchema('node', 'node_access');
+    $this->installConfig(array('migrate_sql_test'));
+  }
+
+  /**
+   * @covers ::initializeIterator
+   */
+  public function testSQLMigration() {
+    // Add 3 items to source table.
+    $id1 = migrate_sql_test_write_record('Item 1', 1);
+    $id2 = migrate_sql_test_write_record('Item 2', 2);
+    $id3 = migrate_sql_test_write_record('Item 3', 3);
+
+    // Execute migration.
+    $this->executeMigration();
+
+    // Assert all of the nodes have been imported.
+    $this->assertNodeExists('Item 1');
+    $this->assertNodeExists('Item 2');
+    $this->assertNodeExists('Item 3');
+
+    // Highwater mark is now equal to 3.
+
+    // Update Item 1 setting it's high_water_property to value that is below
+    // current high water mark.
+    migrate_sql_test_write_record('Item 1 updated', 2, $id1);
+
+    // Update Item 2 setting it's high_water_property to value equal to
+    // current high water mark.
+    migrate_sql_test_write_record('Item 2 updated', 3, $id2);
+
+    // Update Item 3 setting it's high_water_property to value that is above
+    // current high water mark.
+    migrate_sql_test_write_record('Item 3 updated', 4, $id3);
+
+    // Execute migration again.
+    $this->executeMigration();
+
+    // Item with lower highwater should not be updated.
+    $this->assertNodeExists('Item 1');
+    $this->assertNodeDoesNotExist('Item 1 updated');
+
+    // Item with equal highwater should not be updated.
+    $this->assertNodeExists('Item 2');
+    $this->assertNodeDoesNotExist('Item 2 updated');
+
+    // Item with greater highwater. Should be updated.
+    $this->assertNodeExists('Item 3 updated');
+    $this->assertNodeDoesNotExist('Item 3');
+  }
+
+  /**
+   * Assert that node with given title exists.
+   *
+   * @param string $title
+   *   Title of the node.
+   */
+  protected function assertNodeExists($title) {
+    self::assertTrue($this->nodeExists($title));
+  }
+
+  /**
+   * Assert that node with given title does not exist.
+   *
+   * @param string $title
+   *   Title of the node.
+   */
+  protected function assertNodeDoesNotExist($title) {
+    self::assertFalse($this->nodeExists($title));
+  }
+
+  /**
+   * Checks if node with given title exists.
+   *
+   * @param string $title
+   *   Title of the node.
+   *
+   * @return bool
+   */
+  protected function nodeExists($title) {
+    $query = \Drupal::entityQuery('node');
+    $result = $query
+      ->condition('title', $title)
+      ->range(0,1)
+      ->execute();
+
+    return !empty($result);
+  }
+
+  /**
+   * Loads migration entity and executes import.
+   */
+  protected function executeMigration() {
+    if ($this instanceof MigrateDumpAlterInterface) {
+      static::migrateDumpAlter($this);
+    }
+    (new MigrateExecutable(Migration::load('sql_test'), $this))->import();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function display($message, $type = 'status') {
+    if ($this->collectMessages) {
+      $this->migrateMessages[$type][] = $message;
+    }
+    else {
+      $this->assert($type == 'status', $message, 'migrate');
+    }
+  }
+
+}
