diff --git a/openstack/identity/v2/extensions/delegate.go b/openstack/identity/v2/extensions/delegate.go
index 77bf7fb..cee275f 100644
--- a/openstack/identity/v2/extensions/delegate.go
+++ b/openstack/identity/v2/extensions/delegate.go
@@ -7,16 +7,6 @@
 	"github.com/rackspace/gophercloud/pagination"
 )
 
-// Extension is a single OpenStack extension.
-type Extension struct {
-	common.Extension
-}
-
-// GetResult wraps a GetResult from common.
-type GetResult struct {
-	common.GetResult
-}
-
 // ExtensionPage is a single page of Extension results.
 type ExtensionPage struct {
 	common.ExtensionPage
@@ -33,47 +23,22 @@
 
 // ExtractExtensions accepts a Page struct, specifically an ExtensionPage struct, and extracts the
 // elements into a slice of Extension structs.
-func ExtractExtensions(page pagination.Page) ([]Extension, error) {
+func ExtractExtensions(page pagination.Page) ([]common.Extension, error) {
 	// Identity v2 adds an intermediate "values" object.
 
-	type extension struct {
-		Updated     string        `mapstructure:"updated"`
-		Name        string        `mapstructure:"name"`
-		Namespace   string        `mapstructure:"namespace"`
-		Alias       string        `mapstructure:"alias"`
-		Description string        `mapstructure:"description"`
-		Links       []interface{} `mapstructure:"links"`
-	}
-
 	var resp struct {
 		Extensions struct {
-			Values []extension `mapstructure:"values"`
+			Values []common.Extension `mapstructure:"values"`
 		} `mapstructure:"extensions"`
 	}
 
 	err := mapstructure.Decode(page.(ExtensionPage).Body, &resp)
-	if err != nil {
-		return nil, err
-	}
-
-	exts := make([]Extension, len(resp.Extensions.Values))
-	for i, original := range resp.Extensions.Values {
-		exts[i] = Extension{common.Extension{
-			Updated:     original.Updated,
-			Name:        original.Name,
-			Namespace:   original.Namespace,
-			Alias:       original.Alias,
-			Description: original.Description,
-			Links:       original.Links,
-		}}
-	}
-
-	return exts, err
+	return resp.Extensions.Values, err
 }
 
 // Get retrieves information for a specific extension using its alias.
-func Get(c *gophercloud.ServiceClient, alias string) GetResult {
-	return GetResult{common.Get(c, alias)}
+func Get(c *gophercloud.ServiceClient, alias string) common.GetResult {
+	return common.Get(c, alias)
 }
 
 // List returns a Pager which allows you to iterate over the full collection of extensions.
diff --git a/openstack/identity/v2/extensions/delegate_test.go b/openstack/identity/v2/extensions/delegate_test.go
index 90eb21b..504118a 100644
--- a/openstack/identity/v2/extensions/delegate_test.go
+++ b/openstack/identity/v2/extensions/delegate_test.go
@@ -1,76 +1,25 @@
 package extensions
 
 import (
-	"fmt"
-	"net/http"
 	"testing"
 
-	"github.com/rackspace/gophercloud"
 	common "github.com/rackspace/gophercloud/openstack/common/extensions"
 	"github.com/rackspace/gophercloud/pagination"
 	th "github.com/rackspace/gophercloud/testhelper"
+	"github.com/rackspace/gophercloud/testhelper/client"
 )
 
-const TokenID = "123"
-
-func ServiceClient() *gophercloud.ServiceClient {
-	return &gophercloud.ServiceClient{
-		Provider: &gophercloud.ProviderClient{
-			TokenID: TokenID,
-		},
-		Endpoint: th.Endpoint(),
-	}
-}
-
 func TestList(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	th.Mux.HandleFunc("/extensions", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", TokenID)
-
-		w.Header().Add("Content-Type", "application/json")
-
-		fmt.Fprintf(w, `
-{
-	"extensions": {
-		"values": [
-			{
-				"updated": "2013-01-20T00:00:00-00:00",
-				"name": "Neutron Service Type Management",
-				"links": [],
-				"namespace": "http://docs.openstack.org/ext/neutron/service-type/api/v1.0",
-				"alias": "service-type",
-				"description": "API for retrieving service providers for Neutron advanced services"
-			}
-		]
-	}
-}
-		`)
-	})
+	HandleListExtensionsSuccessfully(t)
 
 	count := 0
-
-	err := List(ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
+	err := List(client.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
 		count++
 		actual, err := ExtractExtensions(page)
 		th.AssertNoErr(t, err)
-
-		expected := []Extension{
-			Extension{
-				common.Extension{
-					Updated:     "2013-01-20T00:00:00-00:00",
-					Name:        "Neutron Service Type Management",
-					Links:       []interface{}{},
-					Namespace:   "http://docs.openstack.org/ext/neutron/service-type/api/v1.0",
-					Alias:       "service-type",
-					Description: "API for retrieving service providers for Neutron advanced services",
-				},
-			},
-		}
-
-		th.AssertDeepEquals(t, expected, actual)
+		th.CheckDeepEquals(t, common.ExpectedExtensions, actual)
 
 		return true, nil
 	})
@@ -81,34 +30,9 @@
 func TestGet(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
+	common.HandleGetExtensionSuccessfully(t)
 
-	th.Mux.HandleFunc("/extensions/agent", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", TokenID)
-
-		w.Header().Add("Content-Type", "application/json")
-		w.WriteHeader(http.StatusOK)
-
-		fmt.Fprintf(w, `
-{
-    "extension": {
-        "updated": "2013-02-03T10:00:00-00:00",
-        "name": "agent",
-        "links": [],
-        "namespace": "http://docs.openstack.org/ext/agent/api/v2.0",
-        "alias": "agent",
-        "description": "The agent management extension."
-    }
-}
-    `)
-
-		ext, err := Get(ServiceClient(), "agent").Extract()
-		th.AssertNoErr(t, err)
-
-		th.AssertEquals(t, ext.Updated, "2013-02-03T10:00:00-00:00")
-		th.AssertEquals(t, ext.Name, "agent")
-		th.AssertEquals(t, ext.Namespace, "http://docs.openstack.org/ext/agent/api/v2.0")
-		th.AssertEquals(t, ext.Alias, "agent")
-		th.AssertEquals(t, ext.Description, "The agent management extension.")
-	})
+	actual, err := Get(client.ServiceClient(), "agent").Extract()
+	th.AssertNoErr(t, err)
+	th.CheckDeepEquals(t, common.SingleExtension, actual)
 }
diff --git a/openstack/identity/v2/extensions/fixtures.go b/openstack/identity/v2/extensions/fixtures.go
new file mode 100644
index 0000000..96cb7d2
--- /dev/null
+++ b/openstack/identity/v2/extensions/fixtures.go
@@ -0,0 +1,60 @@
+// +build fixtures
+
+package extensions
+
+import (
+	"fmt"
+	"net/http"
+	"testing"
+
+	th "github.com/rackspace/gophercloud/testhelper"
+	"github.com/rackspace/gophercloud/testhelper/client"
+)
+
+// ListOutput provides a single Extension result. It differs from the delegated implementation
+// by the introduction of an intermediate "values" member.
+const ListOutput = `
+{
+	"extensions": {
+		"values": [
+			{
+				"updated": "2013-01-20T00:00:00-00:00",
+				"name": "Neutron Service Type Management",
+				"links": [],
+				"namespace": "http://docs.openstack.org/ext/neutron/service-type/api/v1.0",
+				"alias": "service-type",
+				"description": "API for retrieving service providers for Neutron advanced services"
+			}
+		]
+	}
+}
+`
+
+// HandleListExtensionsSuccessfully creates an HTTP handler that returns ListOutput for a List
+// call.
+func HandleListExtensionsSuccessfully(t *testing.T) {
+	th.Mux.HandleFunc("/extensions", func(w http.ResponseWriter, r *http.Request) {
+		th.TestMethod(t, r, "GET")
+		th.TestHeader(t, r, "X-Auth-Token", client.TokenID)
+
+		w.Header().Add("Content-Type", "application/json")
+
+		fmt.Fprintf(w, `
+{
+  "extensions": {
+    "values": [
+      {
+        "updated": "2013-01-20T00:00:00-00:00",
+        "name": "Neutron Service Type Management",
+        "links": [],
+        "namespace": "http://docs.openstack.org/ext/neutron/service-type/api/v1.0",
+        "alias": "service-type",
+        "description": "API for retrieving service providers for Neutron advanced services"
+      }
+    ]
+  }
+}
+    `)
+	})
+
+}
