   test "invalid resource results in an error message tuple for URI" do
     resource = %Braise.Resource{links: 'this is the beginning of the song'}
 
-    {:error, msg } = Braise.Resource.url(resource)
+    {:error, msg } = url(resource)
 
     assert msg == "Invalid links portion of JSON Schema"
   end

  test "invalid resource results in an error message tuple for name" do
    resource = %Braise.Resource{definitions: 'rock hard awesome'}

    {:error, msg } = Braise.Resource.name(resource)

    assert msg = "Invalid definition portion of JSON Schema"
  end

  test "valid resource results in a resource name tuple" do
    resource = %Braise.Resource{definitions: %{"patient" => "rock hard awesome"}}

    {:ok, name } = Braise.Resource.name(resource)

    assert name == "patient"
  end

    resource = %Braise.Resource{links: [%{"href" => uri}]}

    expected_url        = URI.parse(uri)
    {:ok, actual_url}   =  url(resource)

    assert expected_url == actual_url
  end
