package br.gov.servicos.editor.frontend;

import br.gov.servicos.editor.Main;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

import java.net.HttpURLConnection;
import java.net.URL;

import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Main.class)
@WebAppConfiguration
@IntegrationTest("server.port:0")
public class FrontendIntegrationTest {

    @Value("${local.server.port}")
    int port;

    @Test
    public void abrePaginaInfoComSucesso() throws Exception {
        HttpURLConnection c = (HttpURLConnection) new URL(String.format("http://localhost:%d/info", port)).openConnection();
        assertThat(c.getResponseCode(), is(200));
    }

}
@@ -223,31 +223,46 @@
 ot.test.
-Integ
+SpringApplicationConfigu
 ration
-Test
 ;%0Aimport
@@ -296,38 +296,26 @@
 est.
-SpringApplicationConfigu
+WebInteg
 ration
+Test
 ;%0Aim
@@ -707,16 +707,19 @@
 ration%0A@
+Web
 Integrat
@@ -730,23 +730,25 @@
 est(
-%22server.port:0%22
+randomPort = true
 )%0Apu

Usa anotacao correta