Your Tests Are Code, Too!
summary
Project uses Kotlin, Spring Boot, Postgres, Kafka and Keycloak and test code often outgrows production code (around 60% more in one project), so tests must be fast and focused. Swap slow Spring Boot tests for plain JUnit or webMvc/dataJpa slices when possible, replace fixed waits with polling every 100ms and a 7s grace, cache tokens with beforeAll instead of beforeEach, mock external systems with Mockito, use test object factories/mothers, and deliberately mutate production code to confirm tests actually fail.
AI-written summary · about
