@@ -0,0 +1,2274 @@
+package org.ovirt.engine.core.utils;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.runners.Parameterized.Parameters;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.IOException;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport javax.xml.parsers.DocumentBuilderFactory;%0Aimport javax.xml.parsers.ParserConfigurationException;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.Parameterized;%0Aimport org.w3c.dom.Element;%0Aimport org.xml.sax.SAXException;%0A%0A@RunWith(Parameterized.class)%0Apublic class XmlUtilsTest %7B%0A    @Rule%0A    public RandomUtilsSeedingRule rusr = new RandomUtilsSeedingRule();%0A%0A    private int level;%0A    private String value;%0A%0A    public XmlUtilsTest(int level, String value) %7B%0A        this.level = level;%0A        this.value = value;%0A    %7D%0A%0A    @Parameters%0A    public static List%3CObject%5B%5D%3E data() %7B%0A        List%3CObject%5B%5D%3E params = new ArrayList%3C%3E();%0A        // XmlUtils.getXYZValue support recursive searching from a depth of 2 and above, e.g.:%0A        // %3Ctag%3E%3CinnerTag%3Evalue%3C/innerTag%3E%3Ctag%3E%0A        for (int i = 2; i %3C 10; ++i) %7B%0A            params.add(new Object%5B%5D%7Bi, String.valueOf(RandomUtils.instance().nextInt())%7D);%0A        %7D%0A        return params;%0A    %7D%0A%0A    @Test%0A    public void testGetIntValueNesting() throws Exception %7B%0A        int actual = XmlUtils.getIntValue(stringToElement(buildNestedXml(level, value)), %22Level1%22);%0A        assertEquals(Integer.valueOf(value).intValue(), actual);%0A    %7D%0A%0A    @Test%0A    public void testGetTextValue() throws Exception %7B%0A        String actual = XmlUtils.getTextValue(stringToElement(buildNestedXml(level, value)), %22Level1%22);%0A        assertEquals(value, actual);%0A    %7D%0A%0A    private static Element stringToElement(String s) throws ParserConfigurationException, IOException, SAXException %7B%0A        return DocumentBuilderFactory.newInstance()%0A                .newDocumentBuilder()%0A                .parse(new ByteArrayInputStream(s.getBytes(%22UTF-8%22)))%0A                .getDocumentElement();%0A    %7D%0A%0A    private static String buildNestedXml (int count, String s) %7B%0A        if (count == 0) %7B%0A            return s;%0A        %7D%0A        return %22%3CLevel%22 + count + '%3E' + buildNestedXml(count - 1, s) + %22%3C/Level%22 + count + '%3E';%0A    %7D%0A%7D%0A

Add minimal tests to XmlUtils