diff --git a/openstack/identity/extensions_test.go b/openstack/identity/extensions_test.go
index a5eede2..009d29d 100644
--- a/openstack/identity/extensions_test.go
+++ b/openstack/identity/extensions_test.go
@@ -5,48 +5,6 @@
 	"testing"
 )
 
-// Taken from: http://docs.openstack.org/api/openstack-identity-service/2.0/content/GET_listExtensions_v2.0_extensions_.html#GET_listExtensions_v2.0_extensions_-Request
-const queryResults = `{
-    "extensions":[{
-            "name": "Reset Password Extension",
-            "namespace": "http://docs.rackspacecloud.com/identity/api/ext/rpe/v2.0",
-            "alias": "RS-RPE",
-            "updated": "2011-01-22T13:25:27-06:00",
-            "description": "Adds the capability to reset a user's password. The user is emailed when the password has been reset.",
-            "links":[{
-                    "rel": "describedby",
-                    "type": "application/pdf",
-                    "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-rpe-20111111.pdf"
-                },
-                {
-                    "rel": "describedby",
-                    "type": "application/vnd.sun.wadl+xml",
-                    "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-rpe.wadl"
-                }
-            ]
-        },
-        {
-            "name": "User Metadata Extension",
-            "namespace": "http://docs.rackspacecloud.com/identity/api/ext/meta/v2.0",
-            "alias": "RS-META",
-            "updated": "2011-01-12T11:22:33-06:00",
-            "description": "Allows associating arbritrary metadata with a user.",
-            "links":[{
-                    "rel": "describedby",
-                    "type": "application/pdf",
-                    "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-meta-20111201.pdf"
-                },
-                {
-                    "rel": "describedby",
-                    "type": "application/vnd.sun.wadl+xml",
-                    "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-meta.wadl"
-                }
-            ]
-        }
-    ],
-    "extensions_links":[]
-}`
-
 func TestIsExtensionAvailable(t *testing.T) {
 	// Make a response as we'd expect from the IdentityService.GetExtensions() call.
 	getExtensionsResults := make(map[string]interface{})
@@ -56,7 +14,7 @@
 		return
 	}
 
-	e := Extensions(getExtensionsResults)
+	e := ExtensionsResult(getExtensionsResults)
 	for _, alias := range []string{"RS-RPE", "RS-META"} {
 		if !e.IsExtensionAvailable(alias) {
 			t.Errorf("Expected extension %s present.", alias)
@@ -78,7 +36,7 @@
 		return
 	}
 
-	e := Extensions(getExtensionsResults)
+	e := ExtensionsResult(getExtensionsResults)
 	ed, err := e.ExtensionDetailsByAlias("RS-META")
 	if err != nil {
 		t.Error(err)
@@ -106,3 +64,48 @@
 		}
 	}
 }
+
+func TestMalformedResponses(t *testing.T) {
+	getExtensionsResults := make(map[string]interface{})
+	err := json.Unmarshal([]byte(bogusExtensionsResults), &getExtensionsResults)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	e := ExtensionsResult(getExtensionsResults)
+
+	_, err = e.ExtensionDetailsByAlias("RS-META")
+	if err == nil {
+		t.Error("Expected ErrNotImplemented at least")
+		return
+	}
+	if err != ErrNotImplemented {
+		t.Error("Expected ErrNotImplemented")
+		return
+	}
+
+	if e.IsExtensionAvailable("anything at all") {
+		t.Error("No extensions are available with a bogus result.")
+		return
+	}
+}
+
+func TestAliases(t *testing.T) {
+	getExtensionsResults := make(map[string]interface{})
+	err := json.Unmarshal([]byte(queryResults), &getExtensionsResults)
+	if err != nil {
+		t.Error(err)
+		return
+	}
+
+	e := ExtensionsResult(getExtensionsResults)
+	aliases, err := e.Aliases()
+	if err != nil {
+		t.Error(err)
+		return
+	}
+	if len(aliases) != len(e) {
+		t.Error("Expected one alias name per extension")
+		return
+	}
+}
