### Question:
XMLSource { public URI getBaseURI() { Map<String, String> map = new LinkedHashMap<>(); map.put("xml", XML_NAMESPACE); return getLink("/*/@xml:base", map); } XMLSource(InputStream is); void setBuffering(); T getNode(String expression, Class<T> cls); @SuppressWarnings("unchecked") T getNode(String expression, Map<String, String> namespaces, Class<T> cls); T[] getNodes(String expression, Class<T> cls); @SuppressWarnings("unchecked") T[] getNodes(String expression, Map<String, String> namespaces, Class<T> cls); URI getLink(String expression); URI getLink(String expression, Map<String, String> namespaces); URI[] getLinks(String expression, Map<String, String> namespaces); URI getBaseURI(); String getValue(String expression); String getValue(String expression, Map<String, String> namespaces); String[] getValues(String expression); String[] getValues(String expression, Map<String, String> namespaces); @SuppressWarnings("unchecked") T getValue(String expression, Map<String, String> namespaces, Class<T> cls);  }### Answer:
@Test public void testBaseURI() { InputStream is = new ByteArrayInputStream( "<foo xml:base=\"http: XMLSource xp = new XMLSource(is); URI value = xp.getBaseURI(); assertEquals("http: }