---
schema_version: "1"
id: 25b7dc5fdfa3947521e5c46ce40f51efcc47ea05e025cbd8ef322c3d103b04c3
title: MultiStaticResourceCalloutMock Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_methods_system_multistaticresourcecalloutmock.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_multistaticresourcecalloutmock.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9d0d6a4fa6563edab3244a10aa34b28eaca063e094910110f5868232eff92b58
description: Utility class used to specify a fake response using multiple resources for testing HTTP callouts.Creates a new instance of the System.MultiStaticResourceCalloutMock class.Sets the specified header name and value for the fake response.Sets the specified static resource corresponding to the endpoint. The static resource contains the response body.Sets the specified HTTP status for the response.Sets the specified HTTP status code for the response.
---
# MultiStaticResourceCalloutMock Class

Utility class used to specify a fake response using multiple resources for testing HTTP callouts.

## Namespace

[System](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_System.htm "The System namespace provides classes and methods for core Apex functionality.")

## Usage

Use the methods in this class to set the response properties for testing HTTP callouts. You can specify a resource for each endpoint.

- **[MultiStaticResourceCalloutMock Constructors](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_multistaticresourcecalloutmock.htm#apex_System_MultiStaticResourceCalloutMock_constructors)**
- **[MultiStaticResourceCalloutMock Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_multistaticresourcecalloutmock.htm#apex_System_MultiStaticResourceCalloutMock_methods)**

## MultiStaticResourceCalloutMock Constructors

The following are constructors for MultiStaticResourceCalloutMock.

- **[MultiStaticResourceCalloutMock()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_multistaticresourcecalloutmock.htm#apex_System_MultiStaticResourceCalloutMock_ctor)**  
    Creates a new instance of the System.MultiStaticResourceCalloutMock class.

### MultiStaticResourceCalloutMock()

Creates a new instance of the System.MultiStaticResourceCalloutMock class.

#### Signature

public MultiStaticResourceCalloutMock()

## MultiStaticResourceCalloutMock Methods

The following are methods for MultiStaticResourceCalloutMock. All are instance methods.

- **[setHeader(headerName, headerValue)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_multistaticresourcecalloutmock.htm#apex_System_MultiStaticResourceCalloutMock_setHeader)**  
    Sets the specified header name and value for the fake response.
- **[setStaticResource(endpoint, resourceName)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_multistaticresourcecalloutmock.htm#apex_System_MultiStaticResourceCalloutMock_setStaticResource)**  
    Sets the specified static resource corresponding to the endpoint. The static resource contains the response body.
- **[setStatus(httpStatus)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_multistaticresourcecalloutmock.htm#apex_System_MultiStaticResourceCalloutMock_setStatus)**  
    Sets the specified HTTP status for the response.
- **[setStatusCode(httpStatusCode)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_multistaticresourcecalloutmock.htm#apex_System_MultiStaticResourceCalloutMock_setStatusCode)**  
    Sets the specified HTTP status code for the response.

### setHeader(headerName, headerValue)

Sets the specified header name and value for the fake response.

#### Signature

public Void setHeader(String headerName, String headerValue)

#### Parameters

- **headerName**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
- **headerValue**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

#### Return Value

Type: Void

### setStaticResource(endpoint, resourceName)

Sets the specified static resource corresponding to the endpoint. The static resource contains the response body.

#### Signature

public Void setStaticResource(String endpoint, String resourceName)

#### Parameters

- **endpoint**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
- **resourceName**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

#### Return Value

Type: Void

### setStatus(httpStatus)

Sets the specified HTTP status for the response.

#### Signature

public Void setStatus(String httpStatus)

#### Parameters

- **httpStatus**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

#### Return Value

Type: Void

### setStatusCode(httpStatusCode)

Sets the specified HTTP status code for the response.

#### Signature

public Void setStatusCode(Integer httpStatusCode)

#### Parameters

- **httpStatusCode**: Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

#### Return Value

Type: Void