// Path: src/main/java/moulder/Moulder.java
// public interface Moulder {
//     /**
//      * This is where a moulder can process the input element to generate its
//      * result.
//      *
//      * @param element the element and its associated data to process
//      * @return the list of nodes and their associated data that were generated
//      *         after processing the input element.
//      */
//     List<Node> process(Element element);
// }


import moulder.Moulder;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.junit.Test;
import java.io.StringReader;
import java.util.Arrays;
import java.util.List;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
package moulder.moulds;




public class RepeaterTest extends BaseMoulderTest {

    @Test
    public void test() throws Exception {
        Repeater a = new Repeater(2);
        Document document = Jsoup
                .parseBodyFragment("<html><body><outer a='v'>test</outer></body></html>");
        Element element = document.getElementsByTag("outer").first();

        List<Node> processed = a.process(element);
        // check for correct repetition of html
        assertXMLEqual(new StringReader("<body>" + "<outer a='v'>test</outer><outer a='v'>test</outer>"+ "</body>"), new StringReader(
                html(processed)));
    }

// Path: src/main/java/moulder/Moulder.java
// public interface Moulder {
//     /**
//      * This is where a moulder can process the input element to generate its
//      * result.
//      *
//      * @param element the element and its associated data to process
//      * @return the list of nodes and their associated data that were generated
//      *         after processing the input element.
//      */
//     List<Node> process(Element element);
// }


// Path: src/test/java/moulder/moulds/RepeaterTest.java
import moulder.Moulder;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.junit.Test;
import java.io.StringReader;
import java.util.Arrays;
import java.util.List;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;

package moulder.moulds;




public class RepeaterTest extends BaseMoulderTest {

    @Test
    public void test() throws Exception {
        Repeater a = new Repeater(2);
        Document document = Jsoup
                .parseBodyFragment("<html><body><outer a='v'>test</outer></body></html>");
        Element element = document.getElementsByTag("outer").first();

        List<Node> processed = a.process(element);
        // check for correct repetition of html
        assertXMLEqual(new StringReader("<body>" + "<outer a='v'>test</outer><outer a='v'>test</outer>"+ "</body>"), new StringReader(
                html(processed)));
    }

    private Moulder produce(final String html1, final String html2) {