   end
 
   describe "update_lead/2" do
-    @update_lead_id "update_lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O"
+    @update_lead_id Closex.MockClient.get_lead_id
     test "invalidates cache when updating lead" do
       {:ok, result} = Closex.CachingClient.get_lead(@update_lead_id)
-      assert_received {:closex_mock_client, :get_lead, [@update_lead_id, []]}
-      assert result["name"] != "New Name"
+      assert result["name"] == "Wayne Enterprises (Sample Lead)"
 
       {:ok, updated_lead} = Closex.CachingClient.update_lead(@update_lead_id, %{"name" => "New Name"})
       assert_received {:closex_mock_client, :update_lead, [@update_lead_id, %{"name" => "New Name"}, []]}

  @not_found_id "not_found"

  describe "get_lead/1" do
    @lead_id "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O"

    test "when called in quick succession returns cached copy" do
      fallback = Closex.CachingClient.get_lead(@lead_id)

  end

  describe "update_opportunity/2" do
    @update_opportunity_id Closex.MockClient.get_opportunity_id
    test "invalidates cache when updating opportunity" do
      {:ok, result} = Closex.CachingClient.get_opportunity(@update_opportunity_id)
      assert result["confidence"] == 75

      {:ok, updated_opportunity} = Closex.CachingClient.update_opportunity(@update_opportunity_id, %{"confidence" => 50})
      assert_received {:closex_mock_client, :update_opportunity, [@update_opportunity_id, %{"confidence" => 50}, []]}
