Prove migrated Clojure code preserves Java behavior with golden tests, unit checks, integration tests, production-like fixtures, performance measurements, and rollback criteria.
After migrating code, your job is to prove you did not change behavior accidentally. It compiles is not validation.
This section focuses on practical validation layers: unit tests for the pure core, integration tests for boundaries, and production-like checks (fixtures, golden tests, load tests) when correctness or performance risk is high.
| Validation layer | What it proves |
|---|---|
| Characterization tests | The Clojure version still matches important Java behavior. |
| Pure-core unit tests | Domain transformations are deterministic and easy to reason about. |
| Boundary integration tests | Java callers, databases, HTTP, queues, and serialization still agree. |
| Performance and rollback checks | The migrated path meets service expectations and can be backed out safely. |