A lightweight Spring Boot application demonstrating how to configure Kafka Streams for testing. Includes examples of various testing strategies.
A topology for a very rudimentary card transaction fraud detection is defines in FraudDetectionTopologyConfig.
Tests the topology in isolation using Kafka Streams' TopologyTestDriver.
See: FraudDetectionTopologyTestDriverTest.
Verifies that messages produced by the topology are correctly published to the output topic. This approach uses a consumer, KafkaTestUtils, and @EmbeddedKafka.
See: FraudDetectionKafkaTestUtilsTest.
Validates that the expected service methods are invoked during the integration test. See: FraudDetectionIntegrationTest.
- Java 21+
./gradlew clean check --info