> ## Documentation Index
> Fetch the complete documentation index at: https://repost.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Kotlin Sends Without the Network

> Use StubTransport and the repost-client-test module to assert on sends, outcomes, and recorded requests with no network access.

`repost-client-test` provides `StubTransport`, a recording, no-network transport. Set it via the `transport` property, enqueue responses, send, and assert on the recorded request. The `Authorization` header is stripped from recordings; the idempotency key travels as the `Idempotency-Key` header:

```kotlin theme={"languages":{"custom":["/languages/repost.json"]}}
val transport = StubTransport().enqueueResponse(
    202,
    "{\"id\":\"msg_1\",\"type\":\"order.created\",\"customerId\":\"customer-123\"," +
        "\"timestamp\":\"1970-01-01T00:00:00.000Z\"}",
)
RepostClient {
    apiKey = "test-key"
    this.transport = transport
    maxAttempts = 1
}.use { repost ->
    val result = repost.webhooks.order.created("customer-123") { id = "order-123" }
    check(result.id == "msg_1")
}
check(String(transport.requests[0].bodyBytes, Charsets.UTF_8).contains("\"id\":\"order-123\""))
```

Add `repost-client-test` in `test` scope. It also ships `enqueueFailure`, `enqueuePending` for deferred completion, a `RecordingObserver`, a `NoNetworkGuard`, and deterministic clocks and generators.

## Continue

<Columns cols={3} className="gap-y-4">
  <Card title="Frameworks" icon="boxes" href="/docs/send/kotlin/frameworks" cta="Inject" arrow="true">
    Spring Boot, Jakarta CDI, Ktor, and the framework-neutral core pattern.
  </Card>

  <Card title="Reliability" icon="shield-check" href="/docs/send/kotlin/reliability" cta="Outcomes" arrow="true">
    The delivery states and error codes to exercise in your tests.
  </Card>

  <Card title="HTTP API" icon="globe" href="/docs/send/publishing" cta="Publish" arrow="true">
    The endpoint and retry rules the stub transport stands in for.
  </Card>
</Columns>
