package org.axonframework.springboot.autoconfig;

import org.axonframework.axonserver.connector.command.CommandLoadFactorProvider;
import org.junit.*;
import org.junit.runner.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.EnableMBeanExport;
import org.springframework.jmx.support.RegistrationPolicy;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;

import static org.junit.Assert.*;

/**
 * @author Sara Pellegrini
 */
@ContextConfiguration
@EnableAutoConfiguration
@RunWith(SpringRunner.class)
@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
@TestPropertySource("classpath:application.commandLoadFactor-autoConfiguration.properties")
public class AxonServerAutoConfigurationLoadFactorTest {


    @Autowired
    private CommandLoadFactorProvider commandLoadFactorProvider;

    @Test
    public void testLoadFactor() {
        int loadFactor = commandLoadFactorProvider.getFor("anything");
        assertEquals(36, loadFactor);
    }
}

@@ -141,16 +141,28 @@
 g.junit.
+jupiter.api.
 *;%0Aimpor
@@ -177,14 +177,29 @@
 nit.
-runner
+jupiter.api.extension
 .*;%0A
@@ -627,22 +627,32 @@
 unit
-4.SpringRunner
+.jupiter.SpringExtension
 ;%0A%0Ai
@@ -678,14 +678,30 @@
 nit.
+jupiter.api.
 Assert
+ions
 .*;%0A
@@ -705,16 +705,112 @@
 *;%0A%0A/**%0A
+ * Test class validating the %7B@link CommandLoadFactorProvider%7D is correctly auto configured.%0A *%0A
  * @auth
@@ -880,19 +880,22 @@
 ration%0A@
-Run
+Extend
 With(Spr
@@ -901,14 +901,17 @@
 ring
-Runner
+Extension
 .cla
@@ -1134,17 +1134,16 @@
 Test %7B%0A%0A
-%0A
     @Aut

Remove JUnit4 based test