diff --git a/neutron/tests/tempest/api/base.py b/neutron/tests/tempest/api/base.py
index 1f24141..045cca2 100644
--- a/neutron/tests/tempest/api/base.py
+++ b/neutron/tests/tempest/api/base.py
@@ -472,7 +472,7 @@
 def _require_sorting(f):
     @functools.wraps(f)
     def inner(self, *args, **kwargs):
-        if not CONF.neutron_plugin_options.validate_sorting:
+        if not test.is_extension_enabled("sorting", "network"):
             self.skipTest('Sorting feature is required')
         return f(self, *args, **kwargs)
     return inner
@@ -481,7 +481,7 @@
 def _require_pagination(f):
     @functools.wraps(f)
     def inner(self, *args, **kwargs):
-        if not CONF.neutron_plugin_options.validate_pagination:
+        if not test.is_extension_enabled("pagination", "network"):
             self.skipTest('Pagination feature is required')
         return f(self, *args, **kwargs)
     return inner
diff --git a/neutron/tests/tempest/api/test_extensions.py b/neutron/tests/tempest/api/test_extensions.py
new file mode 100644
index 0000000..1defb33
--- /dev/null
+++ b/neutron/tests/tempest/api/test_extensions.py
@@ -0,0 +1,39 @@
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest import test
+
+from neutron.tests.tempest.api import base
+from neutron.tests.tempest import config
+
+CONF = config.CONF
+
+
+class ExtensionsTest(base.BaseNetworkTest):
+
+    def _test_list_extensions_includes(self, ext):
+        body = self.client.list_extensions()
+        extensions = {ext_['alias'] for ext_ in body['extensions']}
+        self.assertNotEmpty(extensions, "Extension list returned is empty")
+        ext_enabled = test.is_extension_enabled(ext, "network")
+        if ext_enabled:
+            self.assertIn(ext, extensions)
+        else:
+            self.assertNotIn(ext, extensions)
+
+    @test.idempotent_id('262420b7-a4bb-4a3e-b4b5-e73bad18df8c')
+    def test_list_extensions_sorting(self):
+        self._test_list_extensions_includes('sorting')
+
+    @test.idempotent_id('19db409e-a23f-445d-8bc8-ca3d64c84706')
+    def test_list_extensions_pagination(self):
+        self._test_list_extensions_includes('pagination')
diff --git a/neutron/tests/tempest/config.py b/neutron/tests/tempest/config.py
index bad1000..f50fa39 100644
--- a/neutron/tests/tempest/config.py
+++ b/neutron/tests/tempest/config.py
@@ -12,7 +12,6 @@
 
 from oslo_config import cfg
 
-from neutron import api
 from tempest import config
 
 
@@ -23,13 +22,7 @@
     cfg.BoolOpt('specify_floating_ip_address_available',
                 default=True,
                 help='Allow passing an IP Address of the floating ip when '
-                     'creating the floating ip'),
-    cfg.BoolOpt('validate_pagination',
-                default=api.DEFAULT_ALLOW_PAGINATION,
-                help='Validate pagination'),
-    cfg.BoolOpt('validate_sorting',
-                default=api.DEFAULT_ALLOW_SORTING,
-                help='Validate sorting')]
+                     'creating the floating ip')]
 
 # TODO(amuller): Redo configuration options registration as part of the planned
 # transition to the Tempest plugin architecture
diff --git a/neutron/tests/tempest/services/network/json/network_client.py b/neutron/tests/tempest/services/network/json/network_client.py
index 12ba685..9c8cb05 100644
--- a/neutron/tests/tempest/services/network/json/network_client.py
+++ b/neutron/tests/tempest/services/network/json/network_client.py
@@ -791,3 +791,12 @@
         self.expected_success(201, resp.status)
         body = jsonutils.loads(body)
         return service_client.ResponseBody(resp, body)
+
+    def list_extensions(self, **filters):
+        uri = self.get_uri("extensions")
+        if filters:
+            uri = '?'.join([uri, urlparse.urlencode(filters)])
+        resp, body = self.get(uri)
+        body = {'extensions': self.deserialize_list(body)}
+        self.expected_success(200, resp.status)
+        return service_client.ResponseBody(resp, body)
