title: Artemis activeMQ embeded not working with spring integration tests
body: <p>I try to use artemis activeMQ with the embedded mode in Spring boot integration tests, but when i send a message, it can't recive it.
  I use the native mode and it works good but it's not the case when i run the integrations tests (embedded).</p>
  
  <p><strong>Here is my <code>applications-test.properties</code> (src/test/resources) :</strong></p>
  
  <pre><code>spring.artemis.mode=embedded
  spring.artemis.host=localhost
  spring.artemis.port=61616
  spring.artemis.user=exampleuser
  spring.artemis.password=examplepassword
  spring.artemis.embedded.topics=exampleTopic,exampleTopic2
  jms.queue.destination=exampleQueue
  spring.jms.pub-sub-domain=true
  </code></pre>
  
  <p><strong>My <code>broker.xml.bak</code> (src/test/resources) :</strong></p>
  
  <pre><code>&lt;?xml version='1.0'?&gt;
  &lt;configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="urn:activemq" xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd"&gt;
  &lt;jms xmlns="urn:activemq:jms"&gt;
      &lt;!--the queue used by the example --&gt;
      &lt;queue name="exampleQueue" /&gt;
  &lt;/jms&gt;
  
  &lt;core xmlns="urn:activemq:core"&gt;
  
      &lt;persistence-enabled&gt;false&lt;/persistence-enabled&gt;
      &lt;journal-type&gt;NIO&lt;/journal-type&gt;
  
      &lt;!-- Acceptors --&gt;
      &lt;acceptors&gt;
          &lt;acceptor name="netty"&gt;tcp://localhost:61616&lt;/acceptor&gt;
      &lt;/acceptors&gt;
  
      &lt;!-- Other config --&gt;
  
      &lt;security-settings&gt;
          &lt;!--security for example queue --&gt;
          &lt;security-setting match="#"&gt;
              &lt;permission type="createDurableQueue" roles="example" /&gt;
              &lt;permission type="deleteDurableQueue" roles="example" /&gt;
              &lt;permission type="createNonDurableQueue" roles="example" /&gt;
              &lt;permission type="deleteNonDurableQueue" roles="example" /&gt;
              &lt;permission type="consume" roles="example" /&gt;
              &lt;permission type="send" roles="example" /&gt;
          &lt;/security-setting&gt;
      &lt;/security-settings&gt;
  
  &lt;/core&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>The producer jms message Class :</strong></p>
  
  <pre><code>@Component
  public class JmsProducer {
  
    @Autowired
    private
    JmsTemplate jmsTemplate;
  
    @Value("${jms.queue.destination}")
    private String destinationQueue;
  
    public void send(String msg){
        getJmsTemplate().convertAndSend(destinationQueue, msg);
    }
  
    public JmsTemplate getJmsTemplate() {
        return jmsTemplate;
    }
   }
  </code></pre>
  
  <p><strong>Here is the Integration test Class :</strong></p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest
  @TestPropertySource(locations = {"/application-test.properties","/broker.xml.bak"})
  public class outilConverterApplicationTests {
  
  @Autowired
  private JmsProducer producer;
  
  @Autowired
  private ArtemisProperties artemisProperties;
  
  @Before
  public void init(){
      customizer();
  }
  
  public ArtemisConfigurationCustomizer customizer() {
      return new ArtemisConfigurationCustomizer() {
  
          @Override
          public void customize(org.apache.activemq.artemis.core.config.Configuration configuration) {
              try {
                  configuration.addAcceptorConfiguration("netty", "tcp://localhost:" + artemisProperties.getPort());
  
              } catch (Exception e) {
                  throw new RuntimeException("Failed to add netty transport acceptor to artemis instance", e);
              }
  
          }
  
      };
  }
  
  @Test
  public void send(){
      producer.send("MyMessage");
      producer.getJmsTemplate().setReceiveTimeout(20_000);
      assertThat(producer.getJmsTemplate().receiveAndConvert("exampleQueue")).isEqualTo("MyMessage");
  }
  }
  </code></pre>
  
  <p><strong>The Junit Contole trace error :</strong></p>
  
  <pre><code>org.junit.ComparisonFailure: expected:&lt;"MyMessage"&gt; but was:&lt;null&gt;
  </code></pre>