### Question:
XmlHandler { public static String[] getLayoutEvaluations(String url) throws MalformedURLException, JDOMException, IOException { SAXBuilder builder = new SAXBuilder(); Document doc = builder.build(new URL(url)); String namespace = "http: String[] evals = new String[2]; try { String areaRate; areaRate = getAttributeByXpath(doc, namespace, " String countRate = getAttributeByXpath(doc, namespace, " evals[0] = areaRate; evals[1] = countRate; } catch (NoSuchFieldException e) { throw new JDOMException("The layout evaluation values could not be found in file: " + url); } return evals; }  static boolean isEvaluation(String xml); static boolean isWordEvaluation(String xml); static String getElementContent(String xml, String element); static String[] getLayoutEvaluations(String url); static String[] getWordEvaluations(String url);  }### Answer:
@Test public void testGetLayoutEvaluations() throws MalformedURLException, JDOMException, IOException { String url = "http: String[] evals = XmlHandler.getLayoutEvaluations(url); assertEquals(2, evals.length); assertEquals("1.00000", evals[0]); assertEquals("1.00000", evals[1]); }
@Test(expected=JDOMException.class) public void testGetLayoutEvaluationsWrongXML() throws MalformedURLException, JDOMException, IOException { String url = "http: XmlHandler.getLayoutEvaluations(url); }
@Test(expected=JDOMException.class) public void testGetLayoutEvaluationsText() throws MalformedURLException, JDOMException, IOException { String url = "http: XmlHandler.getLayoutEvaluations(url); }