KStreamTestDriver TopologyTestDriver (added via KIP-247) is being used to unit test topologies while developing KStreams apps.
One such topology uses a Pattern to consume from multiple topics at once.
The unit test of the topology fails because
KStreamTestDriver TopologyTestDriver fails to deal with Patterns properly.
Underneath is a unit test explaining what I understand should happen, but is failing.
*Note: the example below is outdate as it used the old KStreamTestDriver. The overall test layout can be adopted for TopologyTestDriver though, thus, we just leave it in the description.*
Explicitly adding a source topic matching the topic pattern, generates an exception as the topology builder explicitly checks overlapping topic names and patterns, in any order of adding pattern and topic. So, it is intended behaviour.
If anybody can help in defining the solution, I can create a pull request for this change.-