package org.axonframework.boot.autoconfig;

import org.axonframework.axonserver.connector.query.AxonServerQueryBus;
import org.axonframework.queryhandling.QueryBus;
import org.axonframework.queryhandling.QueryUpdateEmitter;
import org.junit.*;
import org.junit.runner.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;

import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;


@ContextConfiguration
@EnableAutoConfiguration
@RunWith(SpringRunner.class)
public class AxonServerAutoConfigurationTest {

    @Autowired
    private QueryBus queryBus;

    @Autowired
    private QueryUpdateEmitter updateEmitter;

    @Test
    public void testAxonServerQueryBusConfiguration() {
        assertTrue(queryBus instanceof AxonServerQueryBus);
        assertSame(updateEmitter, queryBus.queryUpdateEmitter());
    }
}
@@ -425,29 +425,24 @@
 amework.
-test.
 context.
 ContextC
@@ -433,36 +433,103 @@
 context.
-ContextConfiguration
+annotation.EnableMBeanExport;%0Aimport org.springframework.jmx.support.RegistrationPolicy
 ;%0Aimport
@@ -566,72 +566,91 @@
 ext.
-junit4.SpringRunner
+ContextConfiguration
 ;%0A
-%0A
 import 
-static org.junit.Assert.assertSame;
+org.springframework.test.context.junit4.SpringRunner;%0A
 %0Aimp
@@ -677,26 +677,17 @@
 .Assert.
-assertTrue
+*
 ;%0A%0A%0A@Con
@@ -758,16 +758,86 @@
 .class)%0A
+@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)%0A
 public c

Set test to ignore failed MBean registration