---
schema_version: "1"
id: 8afb198b77e1d43c1198f52e0876e461aaf37c5b4d7e1cfc2084d25e351f4fba
title: Test Archive Callouts in Apex with Mock HTTP Responses
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/262-0-0/rn_262_archive_apex_testing.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_262_archive_apex_testing.htm&release=262.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 758cb7d68f6b502e1818dda93f9338ab981a7b5cc4749c38b09069885d251660
description: Mock archive callouts in your Apex test classes to test Archive Apex functionality without making actual HTTP requests to the archive service. Previously, customers couldn't mock archive callouts, which prevented complete unit testing of Apex code that uses Archive Apex.
products:
  - Cross Cloud
release: "262"
---
# Test Archive Callouts in Apex with Mock HTTP Responses

Mock archive callouts in your Apex test classes to test Archive Apex functionality without making actual HTTP requests to the archive service. Previously, customers couldn't mock archive callouts, which prevented complete unit testing of Apex code that uses Archive Apex.

**Where:** This change applies to Archive 2.0 in Developer, Enterprise, and Performance editions with the Archive add-on license.

**How:** In your Apex test class, call `SF_Archive.ArchiverAccessor.setMock` and pass in your mock `HttpCalloutMock` implementation before testing Archive Apex methods.

#### See Also

- [_Salesforce Help_: Archive Apex Testing](https://help.salesforce.com/s/articleView?id=xcloud.archive_apex_testing.htm&type=5&language=en_US)