Confluent Certified Developer for Apache Kafka (CCDAK) · 15% practice allocation

Confluent CCDAK: Application Testing Practice Questions

5 free sample questions from the Application Testing domain, with answers and explanations. The full CCDAK bank has 58 questions across 4 domains. Questions are scenario-based and written from the official Confluent exam guide.

1.

To unit-test producer logic without connecting to a real broker, which Kafka client testing utility should a developer use?

  • A. MockProducer✓ Correct
  • B. TopologyTestDriver
  • C. A production Kafka cluster
  • D. AdminClient
Explanation

MockProducer implements the Producer interface in-memory, recording sent records so you can assert on producer behavior without a broker. TopologyTestDriver (B) is for Streams topologies, a production cluster (C) isn't a unit-test tool, and AdminClient (D) manages topics/configs.

2.

Which Kafka Streams utility lets a developer unit-test a topology by piping input records through it and reading outputs WITHOUT a running Kafka cluster?

  • A. An embedded broker only
  • B. MockProducer only
  • C. The Schema Registry
  • D. TopologyTestDriver✓ Correct
Explanation

TopologyTestDriver runs a Kafka Streams topology in-memory, letting you feed input records and assert on outputs and state without a real cluster — fast, deterministic unit testing. MockProducer (B) tests plain producers, an embedded broker (A) is heavier integration testing, and the Schema Registry (C) manages schemas.

3.

A developer needs to unit-test consumer processing logic in isolation. Which utility simulates a consumer feeding predefined records?

  • A. The Schema Registry
  • B. MockConsumer✓ Correct
  • C. Kafka Connect
  • D. MockProducer
Explanation

MockConsumer implements the Consumer interface in-memory, letting you seed records and partitions to test consumer logic without a broker. MockProducer (D) is for producers, the Schema Registry (A) manages schemas, and Kafka Connect (C) integrates external systems.

4.

What does testing a Kafka Streams application's state store behavior typically involve?

  • A. Counting the number of consumer groups
  • B. Checking the broker's CPU usage
  • C. Measuring network bandwidth between brokers
  • D. Feeding input records and asserting the resulting state (e.g., aggregation values) via the TopologyTestDriver's access to state stores✓ Correct
Explanation

Testing stateful logic means driving inputs through the topology and asserting the state store contents/aggregation results, which TopologyTestDriver exposes. Broker CPU (B), network bandwidth (C), and consumer-group counts (A) are operational metrics unrelated to unit-testing state logic.

5.

When is an INTEGRATION test (e.g., with an embedded or test Kafka cluster) more appropriate than a unit test?

  • A. When you want the fastest possible test with no dependencies
  • B. When verifying end-to-end behavior across real producers, brokers, and consumers, including serialization and configuration✓ Correct
  • C. When testing a single pure function with no Kafka interaction
  • D. Never; unit tests always suffice
Explanation

Integration tests with a real/embedded cluster validate end-to-end behavior — actual produce/consume, serialization, and broker configuration — that mocks can't fully capture. Pure functions (C) and fastest no-dependency tests (A) are unit-test territory, and integration tests are sometimes necessary (D).

Test yourself across every CCDAK domain

The free CCDAK practice test mixes about 20 questions weighted like the exam. The full 58-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Application Testing study guide (CCDAK) →

Other CCDAK domains

← All Confluent Certified Developer for Apache Kafka study resources