# Testing
source: https://developer.mastercard.com/mastercard-insurance-programs/documentation/testing/index.md

## Loyalty Insurance user data token generation {#loyalty-insurance-user-data-token-generation}

You can test your integration in Sandbox using the test data listed below

**Test bins include:**

* 519704

**Test cards include:**

* Generate 16-digit pans using above listed bins
* Create your own card numbers using any sample credit card generators

**Other test data include:**

* firstName: any sample string can be passed
* lastName: any sample string can be passed
* addressLine1: user address line1, any sample string can be passed. Ex:123 Test str
* addressLine2: address line2, any sample string can be passed. Ex:apt 1001
* city: any sample string can be passed. Ex: Guarulhos
* state: any sample string can be passed.. Ex: SP
* postalCode: postal code. Ex: 07272-060
* country: country. Ex: BRA
* email: user email address. Ex: [john.smith@mail.com](mailto:john.smith@mail.com)
* phone: user phone number. Ex: (11) 1111-1111

**Test cases:**

**generate user data token**

* Generate a test card as listed above. For example, 5197040000000958
* Fill in the other test data as listed above
* Send a request to /loyalty/insurance/user-data-tokens POST endpoint
* Get a response back with a unique id.

## Loyalty Insurance claim search {#loyalty-insurance-claim-search}

You can test your integration in Sandbox using the test data listed below

**Test data include:**

* claimId: claim id of the user. ex:215030618
* postalCode: postal code. Ex:63368
* preferredLanguage: user preferred language for the response Ex. en

**Test cases:**

**claim search**

* Generate/configure a test claimid as listed above. For example, 215030618
* Fill in the other test data as listed above
* Send a request to /loyalty/insurance/claim-searches POST endpoint
* Get a response back with feature name along with the language selected.

```json
{
  "Errors": {
    "Error": [
      {
        "Source": "Loyalty Service - Insurance",
        "ReasonCode": "CLAIM_STATUS_CHK_ERR",
        "Description": "Claim status check error",
        "Recoverable": false,
        "Details": "Error while checking claim status"
         }
     ]
  }
}
```

```json
{
   "Errors": {
      "Error": [
          {
              "Source": "Loyalty Service - Insurance",
              "ReasonCode": "CLAIM_NOT_FOUND",
              "Description": "Claim not found",
              "Recoverable": false,
              "Details": "Invalid claim number or Claim not found"
      }
  ]
}
}
```

