@@ -0,0 +1,498 @@
+import junit.framework.TestCase;%0Aimport org.junit.Test;%0A%0Apublic class TestMain extends TestCase%7B%0A%0A    @Test%0A    public void testParseHost()%7B%0A        String l1 = %22GET http://www.reddit.com/r/random HTTP/1.1%22;%0A        String l2 = %22Host: www.reddit.com%22;%0A        String l3 = %22Proxy-Connection: keep-alive%22;%0A        String l4 = %22Cache-Control: max-age=0%22;%0A        String%5B%5D sampleRequest = new String%5B%5D %7Bl1,l2,l3,l4%7D;%0A        assertTrue(Server.parseHost(sampleRequest).equals(%22www.reddit.com%22));%0A    %7D%0A%7D

test case to parse the host from an HTTP request