diff --git a/restws.test b/restws.test
index 82645fe..087eace 100644
--- a/restws.test
+++ b/restws.test
@@ -340,31 +340,99 @@ class RestWSTestCase extends DrupalWebTestCase {
   }
 
   /**
+   * Creates a term.
+   */
+  protected function createTerm($term_name) {
+    $term = new stdClass();
+    $term->name = $term_name;
+    $term->vid = 1;
+    taxonomy_term_save($term);
+  }
+
+  /**
+   * Helper function to issue a HTTP request with simpletest's cURL.
+   *
+   * @param array $body
+   *   Either the body for POST and PUT or additional URL parameters for GET.
+   */
+  protected function httpRequest($url, $method, $account = NULL, $body = NULL, $format = 'json') {
+    if (isset($account)) {
+      unset($this->curlHandle);
+      $this->drupalLogin($account);
+    }
+    switch ($method) {
+      case 'GET':
+        // Set query if there are addition GET parameters.
+        $options = isset($body) ? array('absolute' => TRUE, 'query' => $body) : array('absolute' => TRUE);
+        return $this->curlExec(array(
+          CURLOPT_HTTPGET => TRUE,
+          CURLOPT_URL => url($url, $options),
+          CURLOPT_NOBODY => FALSE)
+        );
+      case 'POST':
+        return $this->curlExec(array(
+          CURLOPT_HTTPGET => FALSE,
+          CURLOPT_POST => TRUE,
+          CURLOPT_POSTFIELDS => $body,
+          CURLOPT_URL => url($url, array('absolute' => TRUE)),
+          CURLOPT_NOBODY => FALSE,
+          CURLOPT_HTTPHEADER => array('Content-Type: application/' . $format),
+        ));
+      case 'PUT':
+        return $this->curlExec(array(
+          CURLOPT_HTTPGET => FALSE,
+          CURLOPT_CUSTOMREQUEST => 'PUT',
+          CURLOPT_POSTFIELDS => $body,
+          CURLOPT_URL => url($url, array('absolute' => TRUE)),
+          CURLOPT_NOBODY => FALSE,
+          CURLOPT_HTTPHEADER => array('Content-Type: application/' . $format),
+        ));
+      case 'DELETE':
+        return $this->curlExec(array(
+          CURLOPT_HTTPGET => FALSE,
+          CURLOPT_CUSTOMREQUEST => 'DELETE',
+          CURLOPT_URL => url($url, array('absolute' => TRUE)),
+          CURLOPT_NOBODY => FALSE,
+        ));
+    }
+  }
+}
+
+class RestWSMenuPathTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'RESTful web services menu path tests',
+      'description' => 'Tests the menu path alteration of RestWS.',
+      'group' => 'Services',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp('restws', 'restws_test');
+  }
+
+  /**
    * Test menu path resource setting.
    */
   public function testMenuPath() {
-    module_enable(array('restws_test'));
-
     $account = $this->drupalCreateUser(array('access content',
         'bypass node access', 'access resource node')
     );
     $this->drupalLogin($account);
 
     $title = $this->randomName(8);
-    $node = $this->drupalCreateNode(array('title' => $title));
+    $this->drupalCreateNode(array('title' => $title));
 
     $result = $this->httpRequest('foo/1.json', 'GET', $account);
-    $this->assertEqual($node->title, $title, "Node was received correctly on the right menu path.");
-  }
+    $node = drupal_json_decode($result);
+    $this->assertEqual($node['title'], $title, "Node was received correctly on the right menu path.");
 
-  /**
-   * Creates a term.
-   */
-  protected function createTerm($term_name) {
-    $term = new stdClass();
-    $term->name = $term_name;
-    $term->vid = 1;
-    taxonomy_term_save($term);
+    // Test that the uri's generated by restws are generated correctly.
+    $result = $this->httpRequest('foo.json', 'GET', $account);
+    $result_nodes = drupal_json_decode($result);
+    $this->assertTrue($result_nodes['self'] == url('foo', array('absolute' => TRUE)), 'Self link was generated');
+    $this->assertTrue($result_nodes['list'][0]['author']['uri'] == url('bar/' . $account->uid, array('absolute' => TRUE)), 'The user path was correctly generated.');
   }
 
   /**
@@ -378,14 +446,15 @@ class RestWSTestCase extends DrupalWebTestCase {
       unset($this->curlHandle);
       $this->drupalLogin($account);
     }
+
     switch ($method) {
       case 'GET':
         // Set query if there are addition GET parameters.
         $options = isset($body) ? array('absolute' => TRUE, 'query' => $body) : array('absolute' => TRUE);
         return $this->curlExec(array(
-          CURLOPT_HTTPGET => TRUE,
-          CURLOPT_URL => url($url, $options),
-          CURLOPT_NOBODY => FALSE)
+            CURLOPT_HTTPGET => TRUE,
+            CURLOPT_URL => url($url, $options),
+            CURLOPT_NOBODY => FALSE)
         );
       case 'POST':
         return $this->curlExec(array(
diff --git a/tests/restws_test.module b/tests/restws_test.module
index b8f68b1..bb87a82 100644
--- a/tests/restws_test.module
+++ b/tests/restws_test.module
@@ -12,4 +12,5 @@
  */
 function restws_test_restws_resource_info_alter(&$resource_info) {
   $resource_info['node']['menu_path'] = 'foo';
+  $resource_info['user']['menu_path'] = 'bar';
 }
