Integrations
Use Mokksy and AI-Mocks with Spring Boot, Ktor, Quarkus, LangChain4j, Koog, Spring AI, the OpenAI SDK, and the Anthropic SDK.
Use this section when your application, framework, or SDK can be pointed at a configurable base URL. These pages are organized by the client or framework you use. For general HTTP dependencies, use Mokksy directly. For AI provider SDKs and frameworks such as LangChain4j, Koog, or Spring AI, use the provider-specific AI-Mocks layer built on top of Mokksy.
If you need the supported endpoint surface or mock DSL for one provider rather than client setup, start from the AI-Mocks provider reference.
Backend frameworks
- Spring Boot for
RestClient,WebClient, and property-driven HTTP clients - Ktor when Mokksy needs to live inside an existing Ktor application
- Quarkus for tests that replace outbound HTTP or AI provider dependencies
AI frameworks and SDKs
- LangChain4j for provider-backed LangChain4j tests with AI-Mocks
- Koog for provider-backed Koog applications; the example uses OpenAI
- Spring AI for Spring AI clients that need deterministic provider behavior
- OpenAI SDK for the official
openai-javaclient - Anthropic SDK for the official Anthropic Java client
Which product should you use?
- Use Mokksy when the dependency is a general HTTP API, SSE endpoint, or internal service.
- Use AI-Mocks when the dependency is OpenAI, Anthropic, Gemini, Ollama, or A2A.
Provider references
Spring Boot
Use Mokksy as a mock HTTP server in Spring Boot integration tests by pointing application properties, RestClient, or WebClient at mokksy.baseUrl().
Quarkus
Test Quarkus applications against Mokksy or AI-Mocks by replacing outbound HTTP and AI provider dependencies with deterministic local endpoints.
LangChain4j
Use AI-Mocks with LangChain4j to test provider-backed chat and streaming flows without real OpenAI, Anthropic, or Ollama calls.
Spring AI
Test Spring AI clients against provider-compatible AI-Mocks servers for deterministic OpenAI and Gemini behavior, including streaming.
OpenAI Java SDK
Use AI-Mocks OpenAI with the official openai-java SDK for deterministic chat, streaming, embeddings, moderation, and error-path integration tests.
Anthropic Java SDK
Use AI-Mocks Anthropic with the official Anthropic Java SDK for deterministic Messages API and streaming integration tests.
Koog
Test Koog applications against AI-Mocks provider endpoints. This guide uses a verified OpenAI-backed Spring Boot example for chat, streaming, moderation, and failure paths.