diff --git a/rackspace/db/v1/instances/delegate_test.go b/rackspace/db/v1/instances/delegate_test.go
index d43b1e1..4a13286 100644
--- a/rackspace/db/v1/instances/delegate_test.go
+++ b/rackspace/db/v1/instances/delegate_test.go
@@ -10,9 +10,14 @@
 	"github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
 	th "github.com/rackspace/gophercloud/testhelper"
 	fake "github.com/rackspace/gophercloud/testhelper/client"
+	"github.com/rackspace/gophercloud/testhelper/fixture"
 )
 
-var instanceID = "d4603f69-ec7e-4e9b-803f-600b9205576f"
+var (
+	instanceID = "{instanceID}"
+	_rootURL   = "/instances"
+	resURL     = "/instances/" + instanceID
+)
 
 var expectedInstance = &Instance{
 	Created:   "2014-02-13T21:47:13",
@@ -38,8 +43,7 @@
 func TestCreate(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleCreateInstanceSuccessfully(t)
+	fixture.SetupHandler(t, _rootURL, "POST", createReq, createResp, 200)
 
 	opts := CreateOpts{
 		Name:      "json_rack_instance",
@@ -70,8 +74,7 @@
 func TestGet(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleGetInstanceSuccessfully(t, instanceID)
+	fixture.SetupHandler(t, resURL, "GET", "", getResp, 200)
 
 	instance, err := Get(fake.ServiceClient(), instanceID).Extract()
 
@@ -82,8 +85,7 @@
 func TestDeleteInstance(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	os.HandleDeleteInstanceSuccessfully(t, instanceID)
+	os.HandleDelete(t)
 
 	res := Delete(fake.ServiceClient(), instanceID)
 	th.AssertNoErr(t, res.Err)
@@ -92,8 +94,7 @@
 func TestEnableRootUser(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	os.HandleEnableRootUserSuccessfully(t, instanceID)
+	os.HandleEnableRoot(t)
 
 	expected := &osUsers.User{Name: "root", Password: "secretsecret"}
 
@@ -105,32 +106,26 @@
 func TestRestartService(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	os.HandleRestartSuccessfully(t, instanceID)
+	os.HandleRestart(t)
 
 	res := RestartService(fake.ServiceClient(), instanceID)
-
 	th.AssertNoErr(t, res.Err)
 }
 
 func TestResizeInstance(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	os.HandleResizeInstanceSuccessfully(t, instanceID)
+	os.HandleResize(t)
 
 	res := ResizeInstance(fake.ServiceClient(), instanceID, "2")
-
 	th.AssertNoErr(t, res.Err)
 }
 
 func TestResizeVolume(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	os.HandleResizeVolSuccessfully(t, instanceID)
+	os.HandleResizeVol(t)
 
 	res := ResizeVolume(fake.ServiceClient(), instanceID, 4)
-
 	th.AssertNoErr(t, res.Err)
 }
diff --git a/rackspace/db/v1/instances/fixtures.go b/rackspace/db/v1/instances/fixtures.go
index e144099..92ad7ec 100644
--- a/rackspace/db/v1/instances/fixtures.go
+++ b/rackspace/db/v1/instances/fixtures.go
@@ -1,15 +1,12 @@
 package instances
 
 import (
-	"fmt"
-	"net/http"
-	"testing"
-
-	th "github.com/rackspace/gophercloud/testhelper"
-	fake "github.com/rackspace/gophercloud/testhelper/client"
+	"github.com/rackspace/gophercloud"
+	os "github.com/rackspace/gophercloud/openstack/db/v1/instances"
+	"github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
 )
 
-const singleInstanceJson = `
+const instance = `
 {
   "instance": {
     "created": "2014-02-13T21:47:13",
@@ -37,7 +34,7 @@
       }
     ],
     "hostname": "e09ad9a3f73309469cf1f43d11e79549caf9acf2.rackspaceclouddb.com",
-    "id": "d4603f69-ec7e-4e9b-803f-600b9205576f",
+    "id": "{instanceID}",
     "name": "json_rack_instance",
     "status": "BUILD",
     "updated": "2014-02-13T21:47:13",
@@ -48,15 +45,7 @@
 }
 `
 
-func HandleCreateInstanceSuccessfully(t *testing.T) {
-	th.Mux.HandleFunc("/instances", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "POST")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		w.Header().Set("Content-Type", "application/json")
-		w.WriteHeader(http.StatusOK)
-
-		th.TestJSONRequest(t, r, `
+var createReq = `
 {
   "instance": {
     "databases": [
@@ -85,22 +74,14 @@
     "volume": {
       "size": 2
     },
-		"restorePoint": {
-			"backupRef": "1234567890"
-		}
+    "restorePoint": {
+      "backupRef": "1234567890"
+    }
   }
 }
-`)
+`
 
-		fmt.Fprintf(w, singleInstanceJson)
-	})
-}
-
-func HandleCreateReplicaSuccessfully(t *testing.T) {
-	th.Mux.HandleFunc("/instances", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "POST")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-		th.TestJSONRequest(t, r, `
+var createReplicaReq = `
 {
   "instance": {
     "volume": {
@@ -111,12 +92,9 @@
     "replica_of": "6bdca2fc-418e-40bd-a595-62abda61862d"
   }
 }
-`)
+`
 
-		w.Header().Set("Content-Type", "application/json")
-		w.WriteHeader(http.StatusOK)
-
-		fmt.Fprintf(w, `
+var createReplicaResp = `
 {
   "instance": {
     "status": "BUILD",
@@ -134,85 +112,62 @@
     ],
     "created": "2014-10-14T18:42:15",
     "id": "8367c312-7c40-4a66-aab1-5767478914fc",
-    "volume": {"size": 1},
-    "flavor": {"id": "9"},
+    "volume": {
+      "size": 1
+    },
+    "flavor": {
+      "id": "9"
+    },
     "datastore": {
       "version": "5.6",
       "type": "mysql"
     },
-    "replica_of": {"id": "6bdca2fc-418e-40bd-a595-62abda61862d"}
+    "replica_of": {
+      "id": "6bdca2fc-418e-40bd-a595-62abda61862d"
+    }
   }
 }
-`)
-	})
-}
+`
 
-func HandleListReplicasSuccessfully(t *testing.T) {
-	th.Mux.HandleFunc("/instances", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		w.Header().Add("Content-Type", "application/json")
-
-		fmt.Fprintf(w, `
+var listReplicasResp = `
 {
-	"instances": [
-		{
-			"status": "ACTIVE",
-			"name": "t1s1_ALT_GUEST",
-			"links": [
-				{
-					"href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/3c691f06-bf9a-4618-b7ec-2817ce0cf254",
-					"rel": "self"
-				},
-				{
-					"href": "https://ord.databases.api.rackspacecloud.com/instances/3c691f06-bf9a-4618-b7ec-2817ce0cf254",
-					"rel": "bookmark"
-				}
-			],
-			"ip": [
-				"10.0.0.3"
-			],
-			"id": "3c691f06-bf9a-4618-b7ec-2817ce0cf254",
-			"volume": {
-				"size": 1
-			},
-			"flavor": {
-				"id": "9"
-			},
-			"datastore": {
-				"version": "5.6",
-				"type": "mysql"
-			},
-			"replica_of": {
-				"id": "8b499b45-52d6-402d-b398-f9d8f279c69a"
-			}
-		}
-	]
+  "instances": [
+    {
+      "status": "ACTIVE",
+      "name": "t1s1_ALT_GUEST",
+      "links": [
+        {
+          "href": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/3c691f06-bf9a-4618-b7ec-2817ce0cf254",
+          "rel": "self"
+        },
+        {
+          "href": "https://ord.databases.api.rackspacecloud.com/instances/3c691f06-bf9a-4618-b7ec-2817ce0cf254",
+          "rel": "bookmark"
+        }
+      ],
+      "ip": [
+        "10.0.0.3"
+      ],
+      "id": "3c691f06-bf9a-4618-b7ec-2817ce0cf254",
+      "volume": {
+        "size": 1
+      },
+      "flavor": {
+        "id": "9"
+      },
+      "datastore": {
+        "version": "5.6",
+        "type": "mysql"
+      },
+      "replica_of": {
+        "id": "8b499b45-52d6-402d-b398-f9d8f279c69a"
+      }
+    }
+  ]
 }
-`)
-	})
-}
+`
 
-func HandleGetInstanceSuccessfully(t *testing.T, id string) {
-	th.Mux.HandleFunc("/instances/"+id, func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		w.Header().Add("Content-Type", "application/json")
-
-		fmt.Fprintf(w, singleInstanceJson)
-	})
-}
-
-func HandleGetReplicaSuccessfully(t *testing.T, id string) {
-	th.Mux.HandleFunc("/instances/"+id, func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		w.Header().Add("Content-Type", "application/json")
-
-		fmt.Fprintf(w, `
+var getReplicaResp = `
 {
   "instance": {
     "status": "ACTIVE",
@@ -223,32 +178,36 @@
       "10.0.0.2"
     ],
     "replicas": [
-			{"id": "3c691f06-bf9a-4618-b7ec-2817ce0cf254"}
+      {
+        "id": "3c691f06-bf9a-4618-b7ec-2817ce0cf254"
+      }
     ],
     "id": "8b499b45-52d6-402d-b398-f9d8f279c69a",
     "volume": {
       "used": 0.54,
       "size": 1
     },
-    "flavor": {"id": "9"},
+    "flavor": {
+      "id": "9"
+    },
     "datastore": {
       "version": "5.6",
       "type": "mysql"
     }
   }
 }
-`)
-	})
+`
+
+var detachReq = `
+{
+  "instance": {
+    "replica_of": "",
+    "slave_of": ""
+  }
 }
+`
 
-func HandleGetConfigSuccessfully(t *testing.T, id string) {
-	th.Mux.HandleFunc("/instances/"+id+"/configuration", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		w.Header().Add("Content-Type", "application/json")
-
-		fmt.Fprintf(w, `
+var getConfigResp = `
 {
   "instance": {
     "configuration": {
@@ -297,31 +256,11 @@
     }
   }
 }
-`)
-	})
-}
+`
 
-func HandleAssociateGroupSuccessfully(t *testing.T, id string) {
-	th.Mux.HandleFunc("/instances/"+id, func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "PUT")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-		th.TestJSONRequest(t, r, `{"instance": {"configuration": "{configGroupID}"}}`)
+var associateReq = `{"instance": {"configuration": "{configGroupID}"}}`
 
-		w.WriteHeader(http.StatusAccepted)
-		w.Header().Add("Content-Type", "application/json")
-
-		fmt.Fprintf(w, singleInstanceJson)
-	})
-}
-
-func HandleListBackupsSuccessfully(t *testing.T, id string) {
-	th.Mux.HandleFunc("/instances/"+id+"/backups", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		w.Header().Add("Content-Type", "application/json")
-
-		fmt.Fprintf(w, `
+var listBackupsResp = `
 {
   "backups": [
     {
@@ -343,25 +282,28 @@
     }
   ]
 }
-`)
-	})
-}
+`
 
-func HandleDetachReplicaSuccessfully(t *testing.T, id string) {
-	th.Mux.HandleFunc("/instances/"+id, func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "PATCH")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
+var (
+	createResp    = instance
+	getResp       = instance
+	associateResp = instance
+)
 
-		th.TestJSONRequest(t, r, `
-{
-	"instance": {
-		"replica_of": "",
-		"slave_of": ""
-	}
-}
-`)
-
-		w.Header().Add("Content-Type", "application/json")
-		w.WriteHeader(http.StatusAccepted)
-	})
+var expectedReplica = &Instance{
+	Status:  "BUILD",
+	Updated: "2014-10-14T18:42:15",
+	Name:    "t2s1_ALT_GUEST",
+	Links: []gophercloud.Link{
+		gophercloud.Link{Rel: "self", Href: "https://ord.databases.api.rackspacecloud.com/v1.0/5919009/instances/8367c312-7c40-4a66-aab1-5767478914fc"},
+		gophercloud.Link{Rel: "bookmark", Href: "https://ord.databases.api.rackspacecloud.com/instances/8367c312-7c40-4a66-aab1-5767478914fc"},
+	},
+	Created:   "2014-10-14T18:42:15",
+	ID:        "8367c312-7c40-4a66-aab1-5767478914fc",
+	Volume:    os.Volume{Size: 1},
+	Flavor:    os.Flavor{ID: "9"},
+	Datastore: datastores.DatastorePartial{Version: "5.6", Type: "mysql"},
+	ReplicaOf: &Instance{
+		ID: "6bdca2fc-418e-40bd-a595-62abda61862d",
+	},
 }
diff --git a/rackspace/db/v1/instances/requests_test.go b/rackspace/db/v1/instances/requests_test.go
index 35afe01..0805dd8 100644
--- a/rackspace/db/v1/instances/requests_test.go
+++ b/rackspace/db/v1/instances/requests_test.go
@@ -10,31 +10,13 @@
 	"github.com/rackspace/gophercloud/rackspace/db/v1/datastores"
 	th "github.com/rackspace/gophercloud/testhelper"
 	fake "github.com/rackspace/gophercloud/testhelper/client"
+	"github.com/rackspace/gophercloud/testhelper/fixture"
 )
 
-var expectedReplica = &Instance{
-	Status:  "BUILD",
-	Updated: "2014-10-14T18:42:15",
-	Name:    "t2s1_ALT_GUEST",
-	Links: []gophercloud.Link{
-		gophercloud.Link{Rel: "self", Href: "https://ord.databases.api.rackspacecloud.com/v1.0/5919009/instances/8367c312-7c40-4a66-aab1-5767478914fc"},
-		gophercloud.Link{Rel: "bookmark", Href: "https://ord.databases.api.rackspacecloud.com/instances/8367c312-7c40-4a66-aab1-5767478914fc"},
-	},
-	Created:   "2014-10-14T18:42:15",
-	ID:        "8367c312-7c40-4a66-aab1-5767478914fc",
-	Volume:    os.Volume{Size: 1},
-	Flavor:    os.Flavor{ID: "9"},
-	Datastore: datastores.DatastorePartial{Version: "5.6", Type: "mysql"},
-	ReplicaOf: &Instance{
-		ID: "6bdca2fc-418e-40bd-a595-62abda61862d",
-	},
-}
-
 func TestGetConfig(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleGetConfigSuccessfully(t, instanceID)
+	fixture.SetupHandler(t, resURL+"/configuration", "GET", "", getConfigResp, 200)
 
 	config, err := GetDefaultConfig(fake.ServiceClient(), instanceID).Extract()
 
@@ -90,23 +72,21 @@
 func TestAssociateWithConfigGroup(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
+	fixture.SetupHandler(t, resURL, "PUT", associateReq, associateResp, 202)
 
-	HandleAssociateGroupSuccessfully(t, instanceID)
-
-	configGroupID := "{configGroupID}"
-	res := AssociateWithConfigGroup(fake.ServiceClient(), instanceID, configGroupID)
+	res := AssociateWithConfigGroup(fake.ServiceClient(), instanceID, "{configGroupID}")
 	th.AssertNoErr(t, res.Err)
 }
 
 func TestListBackups(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
+	fixture.SetupHandler(t, resURL+"/backups", "GET", "", listBackupsResp, 200)
 
-	HandleListBackupsSuccessfully(t, instanceID)
-	count := 0
+	pages := 0
 
-	ListBackups(fake.ServiceClient(), instanceID).EachPage(func(page pagination.Page) (bool, error) {
-		count++
+	err := ListBackups(fake.ServiceClient(), instanceID).EachPage(func(page pagination.Page) (bool, error) {
+		pages++
 		actual, err := backups.ExtractBackups(page)
 		th.AssertNoErr(t, err)
 
@@ -127,20 +107,17 @@
 		}
 
 		th.AssertDeepEquals(t, expected, actual)
-
 		return true, nil
 	})
 
-	if count != 1 {
-		t.Errorf("Expected 1 page, got %d", count)
-	}
+	th.AssertNoErr(t, err)
+	th.AssertEquals(t, 1, pages)
 }
 
 func TestCreateReplica(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleCreateReplicaSuccessfully(t)
+	fixture.SetupHandler(t, _rootURL, "POST", createReplicaReq, createReplicaResp, 200)
 
 	opts := CreateOpts{
 		Name:      "t2s1_ALT_GUEST",
@@ -151,15 +128,13 @@
 
 	replica, err := Create(fake.ServiceClient(), opts).Extract()
 	th.AssertNoErr(t, err)
-
 	th.AssertDeepEquals(t, expectedReplica, replica)
 }
 
 func TestListReplicas(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleListReplicasSuccessfully(t)
+	fixture.SetupHandler(t, _rootURL, "GET", "", listReplicasResp, 200)
 
 	pages := 0
 	err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
@@ -195,17 +170,13 @@
 	})
 
 	th.AssertNoErr(t, err)
-
-	if pages != 1 {
-		t.Errorf("Expected 1 page, saw %d", pages)
-	}
+	th.AssertEquals(t, 1, pages)
 }
 
 func TestGetReplica(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleGetReplicaSuccessfully(t, instanceID)
+	fixture.SetupHandler(t, resURL, "GET", "", getReplicaResp, 200)
 
 	replica, err := Get(fake.ServiceClient(), instanceID).Extract()
 	th.AssertNoErr(t, err)
@@ -239,9 +210,8 @@
 func TestDetachReplica(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
+	fixture.SetupHandler(t, resURL, "PATCH", detachReq, "", 202)
 
-	HandleDetachReplicaSuccessfully(t, "{replicaID}")
-
-	err := DetachReplica(fake.ServiceClient(), "{replicaID}").ExtractErr()
+	err := DetachReplica(fake.ServiceClient(), instanceID).ExtractErr()
 	th.AssertNoErr(t, err)
 }
