I am trying to use TestSupportBinder to write tests for spring cloud stream application. All examples I found, including official documents and official github, are to test a Processor
with a Transformer
. These tests use Tranformer
to get output Channel, and feed the Channel object into messageCollector.forChannel
method to poll output.
However, instead of using the provided Processer
, I wrote my own Interface. I can't find a way to get the required Channel object in test code. I had tried to autowire my Interface into test class to get Channel object but ended with java.lang.IllegalArgumentException: Channel [MY_CHANNEL] was not bound by class org.springframework.cloud.stream.test.binder.TestSupportBinder
.