/*
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.mpalourdio.hello.controllers;

import com.mpalourdio.hello.AbstractTestRunner;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.test.autoconfigure.orm.jpa.TestDatabaseAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.web.servlet.MockMvc;

import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;

@SpringBootTest(webEnvironment = WebEnvironment.MOCK)
@AutoConfigureMockMvc
@ImportAutoConfiguration(value = {
        TestDatabaseAutoConfiguration.class,
})
public class EventControllerTest extends AbstractTestRunner {

    @Autowired
    private MockMvc mvc;

    @Test
    public void testEventIsPublished() throws Exception {
        mvc.perform(get("/event")).andExpect(
                content().string("\uD83D\uDE0A -> now I have been published\nHey I'm there too!")
        );
    }
}

@@ -689,16 +689,21 @@
 rk.boot.
+test.
 autoconf
@@ -712,83 +712,29 @@
 ure.
-ImportAutoConfiguration;%0Aimport org.springframework.boot.test.autoc
+orm.jpa.AutoC
 onfigure
 .orm
@@ -729,25 +729,16 @@
 onfigure
-.orm.jpa.
 TestData
@@ -741,33 +741,16 @@
 Database
-AutoConfiguration
 ;%0Aimport
@@ -1277,14 +1277,8 @@
 vc%0A@
-Import
 Auto
@@ -1289,71 +1289,21 @@
 igur
-ation(value = %7B%0A        TestDatabaseAutoConfiguration.class,%0A%7D)
+eTestDatabase
 %0Apub

Replace TestDatabaseAutoConfiguration.class by @AutoConfigureTestDatabase