@Rule
public ExpectedException expectedException = ExpectedException.none();
@Test
public void testChannelTransactedOverriddenWhenTxManager() throws Exception {
final SingleConnectionFactory singleConnectionFactory = new SingleConnectionFactory("localhost");
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(singleConnectionFactory);
container.setMessageListener(new MessageListenerAdapter(this));
container.setQueueNames("foo");
container.setChannelTransacted(false);
container.setTransactionManager(new TestTransactionManager());
container.afterPropertiesSet();
assertTrue(TestUtils.getPropertyValue(container, "transactional", Boolean.class));
container.stop();
singleConnectionFactory.destroy();
}