diff --git a/acceptance/openstack/identity/v3/endpoint_test.go b/acceptance/openstack/identity/v3/endpoint_test.go
index c924ac6..8b302cc 100644
--- a/acceptance/openstack/identity/v3/endpoint_test.go
+++ b/acceptance/openstack/identity/v3/endpoint_test.go
@@ -5,7 +5,9 @@
 import (
 	"testing"
 
+	"github.com/rackspace/gophercloud"
 	endpoints3 "github.com/rackspace/gophercloud/openstack/identity/v3/endpoints"
+	services3 "github.com/rackspace/gophercloud/openstack/identity/v3/services"
 )
 
 func TestListEndpoints(t *testing.T) {
@@ -13,8 +15,70 @@
 	serviceClient := createAuthenticatedClient(t)
 
 	// Use the service to list all available endpoints.
-	_, err := endpoints3.List(serviceClient, endpoints3.ListOpts{})
+	results, err := endpoints3.List(serviceClient, endpoints3.ListOpts{})
 	if err != nil {
-		t.Errorf("Unexpected error while listing endpoints: %v", err)
+		t.Fatalf("Unexpected error while listing endpoints: %v", err)
 	}
+
+	err = gophercloud.EachPage(results, func(page gophercloud.Collection) bool {
+		t.Logf("--- Page ---")
+
+		for _, endpoint := range endpoints3.AsEndpoints(page) {
+			t.Logf("Endpoint: %8s %10s %9s %s",
+				endpoint.ID,
+				endpoint.Interface,
+				endpoint.Name,
+				endpoint.URL)
+		}
+
+		return true
+	})
+	if err != nil {
+		t.Errorf("Unexpected error while iterating endpoint pages: %v", err)
+	}
+}
+
+func TestNavigateCatalog(t *testing.T) {
+	// Create a service client.
+	client := createAuthenticatedClient(t)
+
+	// Discover the service we're interested in.
+	computeResults, err := services3.List(client, services3.ListOpts{ServiceType: "compute"})
+	if err != nil {
+		t.Fatalf("Unexpected error while listing services: %v", err)
+	}
+
+	allServices, err := gophercloud.AllPages(computeResults)
+	if err != nil {
+		t.Fatalf("Unexpected error while traversing service results: %v", err)
+	}
+
+	computeServices := services3.AsServices(allServices)
+
+	if len(computeServices) != 1 {
+		t.Logf("%d compute services are available at this endpoint.", len(computeServices))
+		return
+	}
+	computeService := computeServices[0]
+
+	// Enumerate the endpoints available for this service.
+	endpointResults, err := endpoints3.List(client, endpoints3.ListOpts{
+		Interface: endpoints3.InterfacePublic,
+		ServiceID: computeService.ID,
+	})
+
+	allEndpoints, err := gophercloud.AllPages(endpointResults)
+	if err != nil {
+		t.Fatalf("Unexpected error while listing endpoints: %v", err)
+	}
+
+	endpoints := endpoints3.AsEndpoints(allEndpoints)
+
+	if len(endpoints) != 1 {
+		t.Logf("%d endpoints are available for the service %v.", len(endpoints), computeService.Name)
+		return
+	}
+
+	endpoint := endpoints[0]
+	t.Logf("Success. The compute endpoint is at %s.", endpoint.URL)
 }
