     body = Poison.decode!(conn.resp_body)
 
     assert length(body) == 2
-    :meck.new(Repo)
   end
 
   test "clusters action -- provider has no clusters" do
-    :meck.unload(Repo)
     provider1 = CloudProvider.new(%{name: "a", type: "a", configuration: "{}"}) |> Repo.insert
     provider2 = CloudProvider.new(%{name: "a", type: "a", configuration: "{}"}) |> Repo.insert
     _cluster1 = EtcdCluster.new(%{etcd_token: "abc125", hosting_provider_id: provider2.id}) |> Repo.insert

  end

  test "index action" do
    providers = [%CloudProvider{id: 1, name: "aws", type: "aws", configuration: "{}"}, %CloudProvider{id: 2, name: "azure", type: "azure", configuration: "{}"}]
    :meck.expect(Repo, :all, 1, providers)

    conn = call(Router, :get, "/cloud_providers")


  end

  test "clusters action -- provider found" do 
    provider = CloudProvider.new(%{name: "a", type: "a", configuration: "{}"}) |> Repo.insert
    _cluster1 = EtcdCluster.new(%{etcd_token: "abc125", hosting_provider_id: provider.id}) |> Repo.insert
    _cluster2 = EtcdCluster.new(%{etcd_token: "abc126", hosting_provider_id: provider.id}) |> Repo.insert
