@@ -0,0 +1,1457 @@
+/*%0A *%0A */%0Apackage org.archive.wayback.replay.html.transformer;%0A%0Aimport java.net.URL;%0A%0Aimport junit.framework.TestCase;%0A%0Aimport org.archive.wayback.replay.html.transformer.JSStringTransformerTest.RecordingReplayParseContext;%0A%0A/**%0A * unit test for %7B@link RegexReplaceStringTransformer%7D.%0A *%0A */%0Apublic class RegexReplaceStringTransformerTest extends TestCase %7B%0A%0A    URL baseURL;%0A    RecordingReplayParseContext rc;%0A    RegexReplaceStringTransformer st;%0A%0A    /* (non-Javadoc)%0A    * @see junit.framework.TestCase#setUp()%0A    */%0A    protected void setUp() throws Exception %7B%0A        baseURL = new URL(%22http://foo.com%22);%0A        rc = new RecordingReplayParseContext(null, baseURL, null);%0A        %7D%0A%0A    public void testTransform() throws Exception %7B%0A        // values are input, regex to find, replacement for regex, expected result%0A        final String%5B%5D%5B%5D cases = new String%5B%5D%5B%5D %7B%0A            %7B%0A                %22sha256-1LpauPYMnfXHM+fTx8Rp/5Pca2TSsqj+uUr6j3fGYZM=%22,%0A                %22.*sha256.*%22,%0A                %22%22,%0A                %22%22,%0A            %7D,%0A            %7B%0A                %22examples/video/test.mp4%22,%0A                %22video/%5Ba-z%5D*.mp4%22,%0A                %22video/changed.mp4%22,%0A                %22examples/video/changed.mp4%22,%0A            %7D%0A        %7D;%0A%0A        for (String%5B%5D c : cases) %7B%0A            st = new RegexReplaceStringTransformer(c%5B1%5D, c%5B2%5D);%0A            String result = st.transform(rc, c%5B0%5D);%0A            assertEquals(c%5B3%5D, result);%0A        %7D%0A    %7D%0A%7D%0A

Add test for RegexReplaceStringTransformer