diff --git a/src/Tests/FlagResetTest.php b/src/Tests/FlagResetTest.php
new file mode 100644
index 0000000..7ca12f0
--- /dev/null
+++ b/src/Tests/FlagResetTest.php
@@ -0,0 +1,114 @@
+<?php
+/**
+ * @file
+ * Contains \Drupal\flag\Tests\FlagResetTest.
+ */
+
+namespace Drupal\flag\Tests;
+
+use Drupal\flag\Entity\Flag;
+
+/**
+ * Test resetting a flag.
+ *
+ * @group flag
+ */
+class FlagResetTest extends FlagTestBase {
+
+  /**
+   * The flag.
+   *
+   * @var \Drupal\flag\FlagInterface
+   *
+   */
+  protected $flag;
+
+  /**
+   * The flag service.
+   *
+   * @var \Drupal\flag\FlagServiceInterface
+   */
+  protected $flagService;
+
+  /**
+   * The entity query service.
+   *
+   * @var \TODO
+   */
+  protected $entityQueryManager;
+
+  /**
+   * User object.
+   *
+   * @var \Drupal\user\Entity\User|false
+   */
+  protected $adminUser;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->flagService = $this->container->get('flag');
+
+    $this->entityQueryManager = $this->container->get('entity.query');
+
+    // Create a flag.
+    $this->flag = $this->createFlag('node', ['article'], 'reload');
+
+    // Create a user who may flag.
+    $this->adminUser = $this->drupalCreateUser([
+      'administer flags',
+    ]);
+
+    // Create a node to flag.
+    $this->node = Node::create([
+      'body' => [
+        [
+          'value' => $this->randomMachineName(32),
+          'format' => filter_default_format(),
+        ]
+      ],
+      'type' => 'article',
+      'title' => $this->randomMachineName(8),
+    ]);
+    $this->node->save();
+  }
+
+  /**
+   * Tests that counts are kept in sync and can be retrieved.
+   */
+  public function testFlagResetUI() {
+    // Flag the node.
+    $this->flagService->flag($this->flag, $this->node, $this->adminUser);
+
+    $this->entityQueryManager->get('flagging')
+      ->condition('flag_id', $this->flag->id())
+      ->condition('entity_type', 'node')
+      ->condition('entity_id', $this->node->id());
+
+    $ids = $query->execute();
+
+    $this->assertEqual(count($ids), 1, "The flag has one flagging.");
+
+    // Go to the reset form for the flag.
+    $this->drupalGet('flag/reset/' . $this->flag->id());
+
+    $this->assertText(t('Are you sure you want to reset the Flag test?'));
+
+    $this->drupalPostForm(NULL, [], t('Reset'));
+
+    $this->entityQueryManager->get('flagging')
+      ->condition('flag_id', $this->flag->id())
+      ->condition('entity_type', 'node')
+      ->condition('entity_id', $this->node->id());
+
+    $ids = $query->execute();
+
+    $this->assertEqual(count($ids), 0, "The flag has no flaggings after being reset.");
+  }
+
+  // TODO: test the API directly too?
+
+}
