Mokksy mascot
Java and Kotlin Integration Testing Open Source

Mock HTTP APIs
with real-world behavior

Mokksy is a mock Streaming HTTP and SSE server for deterministic Java and Kotlin integration testing. Test streaming APIs, retries, timeouts, and failure paths through real HTTP behavior. Testing AI providers? Use AI-Mocks, built on Mokksy.

Catch failures before production

Unit tests don’t cover timeouts, retries, or streaming behavior. Mokksy lets you test real HTTP interactions β€” including slow responses, partial streams, and hanging streams β€” in a deterministic way.

Test real HTTP behavior
with confidence

Mock streaming APIs, slow responses, retries, partial failures, and connection-sensitive clients in repeatable Kotlin and Java integration tests.

True SSE and Streaming

Native Server-Sent Events and chunked response streams with controllable timing between chunks.

Request Matching

Match paths, headers, request bodies, multipart uploads, and typed payloads with a fluent Java API and Kotlin DSL.

Failure Simulation

Model slow responses, retry-after headers, rate limits, malformed payloads, hanging streams, and timeout paths.

Deterministic CI Tests

Run integration tests locally and in CI without depending on external service availability or network stability.

Framework Friendly

Use Mokksy with Spring Boot, Quarkus, Ktor, JVM SDK clients, and any HTTP client that accepts a base URL.

AI-Mocks Layer

Add provider-specific OpenAI, Anthropic, Gemini, Ollama, and A2A mocks when the dependency is an AI API.

Use the right layer for your dependency

Test external services without external risk

Use Mokksy for real HTTP and streaming behavior. Use AI-Mocks for provider-compatible AI tests without live provider credentials, rate limits, or provider outages.