To do this, open the Spring application's test class and use an @ContextConfiguration annotation to specify the configuration classes to be used by the test class. Open PlaceReviewerApplicationTests.kt (located in the com.example.placereviewer package of your project's src/test/kotlin directory). Now, set its configuration class as follows:
package com.example.placereviewerimport com.example.placereviewer.config.TestConfigimport org.junit.runner.RunWithimport org.springframework.boot.test.context.SpringBootTestimport org.springframework.test.context.ContextConfigurationimport org.springframework.test.context.junit4.SpringRunner@RunWith(SpringRunner::class)@SpringBootTest@ContextConfiguration(classes ...