# Testing
source: https://developer.mastercard.com/bin-lookup/documentation/testing/index.md

When testing in **Sandbox** you will have access to a rich set of data that mimics what is available in production. The data in sandbox is entirely **mocked** information that utilises realtisic acconunt ranges, but should not be used in any production system, the values for each range are **not** applicable to real world configurations.
Warning: The account ranges used in sandbox are randomly generated mocked data and should not be treated as being an accurate representation of real world Mastercard account (BIN) ranges.

## BIN Ranges {#bin-ranges}

| BIN Range |   |
|-----------|---|
| 99875393  |   |
| 29214303  |   |
| 47980829  |   |
| 66757806  |   |
| 855153163 |   |
| 1157111   |   |
| 966741047 |   |
| 225108    |   |
| 932860    |   |
| 777305770 |   |

## Test Cases {#test-cases}

This section provides some guidance about how to approach testing the functionality the product provides, within the confines of the **Sandbox**.

### Pagination {#pagination}

There are `120802` records in the Sandbox so we recommend using the following query parameter values if you want to test *pagination*:

**Post** `https://sandbox.api.mastercard.com/bin-resources/bin-ranges?page=1&size=5000`

This way, you can test the pagination process by making up to twenty five iterative calls to the Sandbox and checking your coded logic stops when the `currentPageNumber` matches the `totalPages` value in the response metadata. See the [pagination tutorial](https://developer.mastercard.com/bin-lookup/documentation/tutorials-and-guides/pagination-tutorial/index.md) for more information.

### Filtering {#filtering}

To test *filtering* you can use any of the values from the results you received in testing the full download endpoint with pagination. Here is an example of filtering for a specific issuer:

**Post** `https://sandbox.api.mastercard.com/bin-resources/bin-ranges`

```json
[
  {
    "key": "customerName",
    "value": "NIUM FINTECH LIMITED"
  }
]
```

See the [filtering tutorial](https://developer.mastercard.com/bin-lookup/documentation/tutorials-and-guides/filtering-tutorial/index.md) for more information.

### Single BIN Lookup {#single-bin-lookup}

To test the single BIN Lookup endpoint you can use the first 6 - 11 digits of any of the account ranges you see in the results of the full download endpoint, or you can refer to the [BIN range table](https://developer.mastercard.com/bin-lookup/documentation/testing/index.md#bin-ranges) for some provided examples.

**Post** `https://sandbox.api.mastercard.com/bin-resources/bin-ranges/account-searches`

```json
{
  "accountRange": "99875393"
}
```

See the [single lookup tutorial](https://developer.mastercard.com/bin-lookup/documentation/tutorials-and-guides/single-lookup/index.md) for more information.
