package com.example;

import org.junit.AfterClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.contract.wiremock.WireMockSpring;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;

import com.github.tomakehurst.wiremock.junit.WireMockClassRule;

import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static org.assertj.core.api.Assertions.assertThat;


@RunWith(SpringRunner.class)
@SpringBootTest("app.baseUrl=https://localhost:8443")
@DirtiesContext
@ActiveProfiles("ssl")
public class WiremockHttpsServerApplicationTests {

	@ClassRule
	public static WireMockClassRule wiremock = new WireMockClassRule(
			WireMockSpring.options().httpsPort(8443));

	@Autowired
	private Service service;

	@Test
	public void contextLoads() throws Exception {
		stubFor(get(urlEqualTo("/resource"))
				.willReturn(aResponse().withHeader("Content-Type", "text/plain").withBody("Hello World!")));
		assertThat(this.service.go()).isEqualTo("Hello World!");
	}

}

@@ -26,29 +26,344 @@
 ort 
-org.junit.AfterClass;
+static com.github.tomakehurst.wiremock.client.WireMock.aResponse;%0Aimport static com.github.tomakehurst.wiremock.client.WireMock.get;%0Aimport static com.github.tomakehurst.wiremock.client.WireMock.stubFor;%0Aimport static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A
 %0Aimp
@@ -880,352 +880,8 @@
 e;%0A%0A
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;%0Aimport static com.github.tomakehurst.wiremock.client.WireMock.get;%0Aimport static com.github.tomakehurst.wiremock.client.WireMock.stubFor;%0Aimport static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A
 %0A@Ru

Remove unused imports