# Environment setup
source: https://developer.mastercard.com/mastercard-insurance-programs/documentation/tutorials-and-guides/step2/index.md

This tutorial will help you to create a simple Java application that makes an API call to the Insurance service in the Sandbox environment.

## 1. Pre-requisites {#1-pre-requisites}

To complete this tutorial, you will need:

* [JDK 1.8.0](https://www.oracle.com/java/technologies/downloads/) or later
* [Maven 3.6](https://maven.apache.org/) or later
* [IntelliJ IDEA](https://www.jetbrains.com/idea/) (or any other IDE of your choice)
* Mastercard Developers account with access to the Insurance service

## 2. Create a Maven Project {#2-create-a-maven-project}

For this tutorial, IntelliJ IDEA as the IDE is used.

* In IntelliJ IDEA, create a new Maven project which sets your directory structure automatically.
* Provide an ArtifactId and a project name as per your choice.

## 3. Add Resources {#3-add-resources}

* Add the Insurance service specification to your Maven project folder. Keeping a separate resource folder for these files is suggested.
  * Specification file to be added: [LoyaltyInsuranceSpec.yaml](https://static.developer.mastercard.com/content/mastercard-insurance-programs/swagger/LoyaltyInsuranceSpec.yaml) (11KB)
  * For API description, refer to the [API reference](https://developer.mastercard.com/mastercard-insurance-programs/documentation/api-reference/index.md).
* Add the generated Sandbox key (.p12 file) and encryption cert (.pem file) to your Maven project resources folder.
  * pem file can be downloaded from the **Client Encryption Keys** section in the project dashboard. Click on Actions -\> Download Encryption Key

## 4. Generate API client {#4-generate-api-client}

Follow instructions [here to generate an API client](https://developer.mastercard.com/platform/documentation/security-and-authentication/generating-and-configuring-a-mastercard-api-client/#step-3-generate-an-api-client-project)
using Open API generator.
This tutorial uses okhttp-gson library in open api generator.
