Package ai.tabforge.workshop
Class ApiSmokeTest
java.lang.Object
ai.tabforge.workshop.ApiSmokeTest
Smoke test that verifies both SDKs are correctly on the classpath
and that the Anthropic API key is valid.
Run via: java -jar workshop-server.jar --smoke-test
This class is the Day 1-2 deliverable from the development roadmap. It answers the question: "Can we call Claude API from Java and get a response?" before any domain logic is written.
Two SDKs verified here — the key architectural distinction:
- Anthropic Java SDK (
com.anthropic:anthropic-java) — we call the Claude API. We are the CLIENT. We send prompts, we get responses. Every sub-agent uses this SDK to run a specialist Claude instance. - MCP SDK (
io.modelcontextprotocol.sdk:mcp) — Claude Desktop calls US. We are the SERVER. We register tools, we receive tool calls, we return results.
CERTIFICATION NOTE — Tool Design & MCP Integration (18% of exam): Understanding the client/server inversion between these two SDKs is the first concept tested in the Tool Design domain. This smoke test makes the inversion concrete and executable.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ApiSmokeTest
public ApiSmokeTest()
-
-
Method Details
-
run
public static void run()Entry point called fromMainwhen--smoke-testflag is present.Exit codes:
- 0 — both SDKs verified successfully
- 1 — Anthropic API key missing or invalid
- 2 — unexpected error (classpath, network, etc.)
-