# Testing your integration ## Sandbox [Sandbox](https://developers.enode.com/docs/sandbox) lets you simulate and test EV Charger Pairing before releasing to production. You can create virtual vehicles and chargers, pair them, and verify that your integration behaves as expected. With Sandbox, you can: - [Create virtual vehicles](https://developers.enode.com/docs/sandbox#adding-a-device-to-a-virtual-account) and chargers that represent real OEM devices. - [Link both assets to the same user](https://developers.enode.com/docs/sandbox#linking-a-virtual-account-to-a-user) via LinkUI to simulate the pairing process. - Test how capabilities unlock when a vehicle and charger are paired. - Send charging commands through the Vehicle API and verify they reach both assets. - Watch how state changes on one device affect the pair. ## Step 1: Create virtual devices Follow [the Sandbox guide](https://developers.enode.com/docs/sandbox#creating-a-new-vendor-account) to create virtual accounts for both a vehicle and a charger. ## Step 2: Link the vehicle and disable its capabilities ![Asset with missing capabilities](https://developers.enode.com/images/evc-pairing/EVC-testing-capabilities.png) 1. [Link the vehicle's virtual account](https://developers.enode.com/docs/sandbox#linking-a-virtual-account-to-a-user) to a user either by using Sandbox's automatic linking or by linking through LinkUI. 2. Open the vehicle from the **Asset** list. 3. Disable charging control and location capabilities. This sets up a vehicle that can't be controlled directly. After pairing, you'll see these capabilities unlock. ## Step 3: Link the charger to the same user Now link the charger's virtual account to the same user as the vehicle. ## Step 4: Verify pairing state ![Vehicle with Paired label](https://developers.enode.com/images/evc-pairing/EVC-testing-label.png) Open the vehicle from the **Asset** list and confirm: - A **Pairing established** label appears at the top of the vehicle view - `startCharging`, `stopCharging`, and `location` capabilities are now `isCapable: true` ## Step 5: Activate the pair ![Connect pair dialog](https://developers.enode.com/images/evc-pairing/EVC-testing-pairing.png) 1. Click on the **Pairing established** label to open the connection dialog. 2. Select the charger and a shared location. 3. Click **Pair**. 4. Sandbox simulates the physical plug-in, moving the pair from established to activated. ## Step 6: Test charging behavior 1. In the vehicle view, use the **edit state** option to simulate plugging in or unplugging the charger. 2. Send `startCharging` or `stopCharging` [through your integration](https://developers.enode.com/docs/integration-guide/controlling-devices). 3. Observe the state updates on both devices (for example, `powerDeliveryState` transitions to `PLUGGED_IN:CHARGING`). Tip: When testing pairing logic, focus on capability transitions and plug-in events. These show how pairing unlocks new functionality and how your product should handle users linking and unlinking devices. ## Edge cases | Theme | Scenario | Behavior | | --- | --- | --- | | **State changes** | Vehicle and charger are plugged in before linking to Enode. | The pair will not be activated and `pluggedInChargerId` stays `null`. We need to observe the plug-in event to detect the connection. **Workaround:** Have the user unplug and re-plug. | | **State changes** | A charging action is sent and the charger starts within 10 seconds, but the vehicle is unreachable. | The action transitions to a `CONFIRMED` state. | | **Schedules** | A user has both a charger schedule and a vehicle schedule for the same location. | We disable the charger schedule and use the vehicle schedule. Multiple schedules for different locations are allowed. | | **Optional charger interventions** | A capable vehicle (no interventions) is linked to a charger with an active intervention. | The vehicle capability stays `isCapable: true`, but the charger's intervention appears in `interventionIds`. This lets the user know about the charger's issue. | | **Location configuration** | A charger is linked without a location set. | The vehicle location capability stays locked. A charger only unlocks it if the charger has a location set via the API. | | **Location configuration** | A charger has an incorrect location configured via the API. | We use the charger's configured location for the vehicle. If that location is wrong (e.g., a work charger marked as home), the vehicle inherits the wrong location. | | **Multiple vehicles, one charger** | Two vehicles at the same location plug into one charger within seconds, and both start charging. | `pluggedInChargerId` may initially appear on the wrong vehicle. We auto-correct: if we see an inconsistent state (e.g., vehicle A stops charging but the charger continues), we clear `pluggedInChargerId` to `null`. | | **Missing control capabilities** | A user links a charger that later becomes unreachable (relink intervention). They then link a vehicle without charging control. | Vehicle charging control stays locked because the charger can't provide it. Control unlocks when the charger is relinked. | | **Charge state requirements** | Either device lacks charge state (e.g., needs relink, terms & conditions acceptance, or a data subscription). | Pairing requires charge state on both devices. Without it, pairing features won't work. | [Read next: FAQs](https://developers.enode.com/docs/ev-charger-pairing/faqs)