# Apex example: scope and setup Both classes compiled in a Trailhead Developer Edition org on October 8, 2026, and Salesforce reported all six mock test methods passed. These are mock tests, not live receiver or Named Credential verification. In a separately authorized sandbox, configure a Named Credential whose developer name is `Integration_Target`, with the receiver URL, appropriate authentication and narrowly scoped principal access. The POST uses the credential's base URL. `X-Operation-Id` is a receiver-defined example header, not a Salesforce feature or universal idempotency standard. Compile/deploy both classes and run `IntegrationProbeClientTest`. Its six test methods exercise request construction, 200, 202, 400, 503, an exception path and blank input. Mocks avoid real network calls. Then separately verify credential access and a synthetic live request if authorized. Mocks do not prove that credentials, permissions or the live receiver work. Do not call this synchronously from a record trigger or after uncommitted DML. Choose the appropriate callout-capable transaction/asynchronous context for your workflow. This sample performs no DML, persistence, retries, monitoring or business-result reconciliation. HTTP_SUCCESS includes all 2xx responses; it is not an order-completed flag. NO_RESPONSE also covers callout exceptions other than a timeout and does not prove that a request reached the receiver. Usage in an approved callout-capable context: ```apex IntegrationProbeClient.Result result = IntegrationProbeClient.sendProbe('probe-001'); // Persist only approved outcome fields in your chosen recovery mechanism. // Evaluate the receiving API's business contract before deciding what to do next. ```