diff --git a/src/Form/ZoneForm.php b/src/Form/ZoneForm.php
index a445bb0..8af3567 100644
--- a/src/Form/ZoneForm.php
+++ b/src/Form/ZoneForm.php
@@ -245,20 +245,23 @@ class ZoneForm extends EntityForm {
   public function submitForm(array &$form, FormStateInterface $form_state) {
     parent::submitForm($form, $form_state);
 
-    foreach ($form_state->getValue(['members']) as $member_index => $values) {
-      $member_form = $form['members'][$member_index]['form'];
-      /** @var \Drupal\address\Plugin\ZoneMember\ZoneMemberInterface $member */
-      $member = $member_form['#member'];
-      $member_form_state = $this->buildMemberFormState($member_form['#parents'], $form_state);
-      $member->submitConfigurationForm($member_form, $member_form_state);
-      // Update form state with values that might have been changed by the plugin.
-      $form_state->setValue($member_form['#parents'], $member_form_state->getValues());
-      // Update the member weight.
-      $configuration = $member->getConfiguration();
-      $configuration['weight'] = $values['weight'];
-      $member->setConfiguration($configuration);
-      // Update the member on the entity.
-      $this->entity->getMembers()->addInstanceId($member->getId(), $configuration);
+    if (!empty($form_state->getValue(['members']))) {
+      foreach ($form_state->getValue(['members']) as $member_index => $values) {
+        $member_form = $form['members'][$member_index]['form'];
+        /** @var \Drupal\address\Plugin\ZoneMember\ZoneMemberInterface $member */
+        $member = $member_form['#member'];
+        $member_form_state = $this->buildMemberFormState($member_form['#parents'], $form_state);
+        $member->submitConfigurationForm($member_form, $member_form_state);
+        // Update form state with values that might have been changed by the plugin.
+        $form_state->setValue($member_form['#parents'], $member_form_state->getValues());
+        // Update the member weight.
+        $configuration = $member->getConfiguration();
+        $configuration['weight'] = $values['weight'];
+        $member->setConfiguration($configuration);
+        // Update the member on the entity.
+        $this->entity->getMembers()
+          ->addInstanceId($member->getId(), $configuration);
+      }
     }
   }
 
diff --git a/src/Tests/ZoneTest.php b/src/Tests/ZoneTest.php
new file mode 100644
index 0000000..19b7a28
--- /dev/null
+++ b/src/Tests/ZoneTest.php
@@ -0,0 +1,139 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\address\Tests\ZoneTest.
+ */
+
+namespace Drupal\address\Tests;
+
+use CommerceGuys\Addressing\Model\Address;
+use Drupal\address\Entity\Zone;
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests the zone entity and UI.
+ *
+ * @group address
+ */
+class ZoneTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = [
+    'address',
+    'block',
+    'system',
+    'user',
+
+  ];
+
+  /**
+   * A test user with administrative privileges.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->drupalPlaceBlock('local_tasks_block');
+    $this->drupalPlaceBlock('local_actions_block');
+    $this->drupalPlaceBlock('page_title_block');
+
+    $this->adminUser = $this->drupalCreateUser([
+      'administer zones',
+      'access administration pages',
+      'administer site configuration',
+    ]);
+    $this->drupalLogin($this->adminUser);
+  }
+
+  /**
+   * Tests CRUD operations zones via UI.
+   */
+  function testZone() {
+    // Create a zone via UI.
+    $this->drupalGet('admin/config/regional/zones');
+    $this->clickLink('Add a new zone');
+    $edit = [
+      'id' => 'test_zone',
+      'name' => 'Test Zone',
+      'scope' => 'scope',
+    ];
+    $this->drupalGet('admin/config/regional/zones/add');
+    $this->assertResponse(200, 'The zone add form can be accessed at admin/config/regional/zones/add.');
+    $this->drupalPostForm('admin/config/regional/zones/add', $edit, t('Save'));
+
+    $zone = Zone::load($edit['id']);
+    $this->assertEqual($zone->getName(), $edit['name'], 'The new zone has the correct name.');
+    $this->assertEqual($zone->getScope(), $edit['scope'], 'The new zone has the correct scope.');
+
+    // Test editing zone from UI.
+    $this->drupalGet('admin/config/regional/zones/manage/' . $zone->id());
+    $edit = [
+      'name' => 'New Test Zone name',
+      'scope' => 'new scope',
+    ];
+
+    // Test zone members.
+    // Add a EU zone member.
+    $zone_member_values = [
+      'plugin' => 'eu',
+    ];
+    $this->drupalPostForm(NULL, $zone_member_values, t('Add'));
+
+    // Add US California zone member.
+    $zone_member_values = [
+      'plugin' => 'country',
+    ];
+    $this->drupalPostForm(NULL, $zone_member_values, t('Add'));
+    $country_values = [
+      'members[1][form][country_code]' => 'US',
+    ];
+    // Set the US for the country code with Ajax.
+    $this->drupalPostAjaxForm(NULL, $country_values, 'members[1][form][country_code]');
+
+    // Set California values for name and administrative area.
+    $edit += [
+      'members[1][form][name]' => 'California zone member',
+      'members[1][form][administrative_area]' => 'US-CA',
+    ];
+    // Save the editing zone.
+    $this->drupalPostForm(NULL, $edit, t('Save'));
+
+    // Check the results.
+    $zone = Zone::load($zone->id());
+    $this->assertEqual($zone->getName(), $edit['name'], 'The zone name has been successfully changed.');
+
+    // Check an EU address.
+    $eu_address = new Address('FR');
+    $this->assertTrue($zone->match($eu_address), 'The EU zone member successfully set.');
+
+    // Check an US California address.
+    $us_ca_address = new Address();
+    $us_ca_address = $us_ca_address
+      ->withCountryCode('US')
+      ->withAdministrativeArea('US-CA')
+      ->withLocality('Mountain View')
+      ->withAddressLine1('1098 Alta Ave');
+    $this->assertTrue($zone->match($us_ca_address), 'The California zone member successfully set.');
+
+    // Delete a zone from UI.
+    $this->drupalGet('admin/config/regional/zones/manage/' . $zone->id() . '/delete');
+    $this->assertResponse(200, 'The zone delete form can be accessed.');
+    $this->assertText(t('This action cannot be undone.'), 'The zone delete confirmation form is available.');
+    $this->drupalPostForm(NULL, NULL, t('Delete'));
+
+    $zone_exists = (bool) Zone::load($zone->id());
+    $this->assertFalse($zone_exists, 'The zone has been deleted form the database.');
+  }
+
+}
