package webmon;

import org.junit.Test;

import static org.junit.Assert.*;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class HelloWorldTest {
	private String toTest = TestConstants.localAddress;
	private String expectedResponse = "Hello World!";
	
	@Test
	public void testReply() throws IOException {
		URL url;
		HttpURLConnection connection;
		
		url = new URL(toTest);
		connection = (HttpURLConnection)url.openConnection();
		connection.setRequestMethod("GET");
		connection.connect();
		int code = connection.getResponseCode();
		assertEquals(200, code);
		String response = (new BufferedReader(new InputStreamReader((connection.getInputStream())))).readLine();
		assertEquals(expectedResponse, response);
	}
}
@@ -390,30 +390,11 @@
 ly()
- throws IOException
  %7B%0A
+
 %09%09UR
@@ -435,16 +435,25 @@
 ion;%0A%09%09%0A
+%09%09try %7B%0A%09
 %09%09url = 
@@ -469,16 +469,17 @@
 oTest);%0A
+%09
 %09%09connec
@@ -524,24 +524,25 @@
 ection();%0A%09%09
+%09
 connection.s
@@ -567,16 +567,17 @@
 ET%22);%0A%09%09
+%09
 connecti
@@ -590,16 +590,17 @@
 nect();%0A
+%09
 %09%09int co
@@ -632,24 +632,25 @@
 seCode();%0A%09%09
+%09
 assertEquals
@@ -662,16 +662,17 @@
  code);%0A
+%09
 %09%09String
@@ -772,16 +772,17 @@
 ne();%0A%09%09
+%09
 assertEq
@@ -815,12 +815,69 @@
 ponse);%0A
+%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%09%0A
 %09%7D%0A%7D

Fix test execution step in maven build