When compiling the project https://github.com/ILDAR1976/transport_task.git encountered such a problem. When you run unit testing, commenting out the @Ignore annotation, I get the error: java.lang.IllegalStateException: Failed to load ApplicationContext. I can not understand why this is happening, because in the usual start-up, the fxml file loaded perfectly, the spring context got up and everything started up?
package edu.transport_task; import static org.junit.Assert.assertTrue; import org.junit.Assert; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import edu.transport_task.service.ChargesPlaneService; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.DirtiesContext; @SuppressWarnings("unused") @RunWith(SpringJUnit4ClassRunner.class) @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) @SpringBootTest(classes = Application.class) public class ApplicationTests { @Before public void setUp() { } //@Ignore @Test public void testDrawChargesPlane() { assertTrue(true); } }