Spring Boot provides utilities and annotations to help when testing your application.
Spring Boot provides a @SpringBootTest annotation which can be used as an alternative to the standard spring-test @ContextConfiguration annotation when you need Spring Boot features. The annotation works by creating the ApplicationContext used in your tests via SpringApplication.
Utilities: ConfigFileApplicationContextInitializer,EnvironmentTestUtils,OutputCapture and TestRestTemplate
for example
EnvironmentTestUtils.addEnvironment(env, "org=Spring", "name=Boot");
Docs: https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html
 
     
     
     
     
     
     
     
     
     
     
     
     
     
    