Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I cannot reproduce your issue with the following, which does not appear materially different to your tests...</p> <pre><code>&lt;int:header-value-router input-channel="headerEnriched" header-name="messageType"&gt; &lt;int:mapping value="stp" channel="stpChannel" /&gt; &lt;int:mapping value="nonStp" channel="nonStpChannel" /&gt; &lt;/int:header-value-router&gt; &lt;int:publish-subscribe-channel id="nonStpChannel" /&gt; &lt;int:publish-subscribe-channel id="stpChannel" apply-sequence="true"/&gt; &lt;int:chain input-channel="stpChannel" output-channel="systemChannel1"&gt; &lt;int:transformer expression="'bar'"/&gt; &lt;/int:chain&gt; &lt;int:chain input-channel="nonStpChannel" output-channel="systemChannel3"&gt; &lt;int:transformer expression="'bar'"/&gt; &lt;/int:chain&gt; &lt;int:channel id="systemChannel1" /&gt; &lt;int:channel id="systemChannel3" /&gt; &lt;int:outbound-channel-adapter channel="systemChannel1" ref="systemChannel1OutputHandler" method="handleMessage"/&gt; &lt;bean id="systemChannel1OutputHandler" class="org.mockito.Mockito" factory-method="mock"&gt; &lt;constructor-arg value="org.springframework.integration.core.MessageHandler"/&gt; &lt;/bean&gt; &lt;int:outbound-channel-adapter channel="systemChannel3" ref="systemChannel3OutputHandler" method="handleMessage"/&gt; &lt;bean id="systemChannel3OutputHandler" class="org.mockito.Mockito" factory-method="mock"&gt; &lt;constructor-arg value="org.springframework.integration.core.MessageHandler"/&gt; &lt;/bean&gt; </code></pre> <p>.</p> <pre><code>@ContextConfiguration @RunWith(SpringJUnit4ClassRunner.class) public class Foo { @Autowired private MessageChannel headerEnriched; @Autowired private MessageHandler systemChannel1OutputHandler; @Autowired private MessageHandler systemChannel3OutputHandler; @Test public void test10() { Message&lt;String&gt; foo = MessageBuilder.withPayload("foo") .setHeader("messageType", "stp").build(); headerEnriched.send(foo); verify(systemChannel1OutputHandler).handleMessage(any(Message.class)); } @Test public void test30() { Message&lt;String&gt; foo = MessageBuilder.withPayload("foo") .setHeader("messageType", "nonStp").build(); headerEnriched.send(foo); verify(systemChannel3OutputHandler).handleMessage(any(Message.class)); } } </code></pre> <p>Both tests run fine for me.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload