String contentType = connect.getContentType(); int semicolon = contentType.indexOf(';'); if (semicolon>0) { contentType = contentType.substring(0, semicolon).trim(); } assertEquals("Server returned content type " + contentType, "text/xml", contentType);
	protected void doGet() {		try {			System.out.println("--- Retrieving document ---");			HttpURLConnection connect = getConnection(RESOURCE_URI);			connect.setRequestMethod("GET");			connect.connect();						int r = connect.getResponseCode();			assertEquals("Server returned response code " + r, 200, r);						System.out.println(readResponse(connect.getInputStream()));	    } catch (Exception e) {            	        fail(e.getMessage()); 	    }	}