> ## 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 Java 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. Install it with `.transport(...)`, 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:

```java theme={"languages":{"custom":["/languages/repost.json"]}}
StubTransport transport = new StubTransport().enqueueResponse(
        202,
        "{\"id\":\"msg_1\",\"type\":\"order.created\",\"customerId\":\"customer-123\","
                + "\"timestamp\":\"1970-01-01T00:00:00.000Z\"}");
ClientOptions options = ClientOptions.builder()
        .apiKey("test-key")
        .transport(transport)
        .maxAttempts(1)
        .build();
Order order = Order.builder().id("order-123").build();
try (RepostClient repost = RepostClient.create(options)) {
    SendResult result = repost.webhooks().order().created("customer-123", order);
    assertTrue("msg_1".equals(result.getId()));
}
String sent = new String(transport.getRequests().get(0).getBodyBytes(), StandardCharsets.UTF_8);
assertTrue(sent.contains("\"id\":\"order-123\""));
```

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

## Continue

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

  <Card title="Reliability" icon="shield-check" href="/docs/send/java/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>
