@@ -0,0 +1,3078 @@
+/*%0A * $Id: TestHighWireUrlNormalizer.java,v 1.1 2015-01-15 03:04:48 etenbrink Exp $%0A */%0A%0A/*%0A%0ACopyright (c) 2000-2015 Board of Trustees of Leland Stanford Jr. University,%0Aall rights reserved.%0A%0APermission is hereby granted, free of charge, to any person obtaining a copy%0Aof this software and associated documentation files (the %22Software%22), to deal%0Ain the Software without restriction, including without limitation the rights%0Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0Acopies of the Software, and to permit persons to whom the Software is%0Afurnished to do so, subject to the following conditions:%0A%0AThe above copyright notice and this permission notice shall be included in%0Aall copies or substantial portions of the Software.%0A%0ATHE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL%0ASTANFORD UNIVERSITY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,%0AWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR%0AIN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A%0AExcept as contained in this notice, the name of Stanford University shall not%0Abe used in advertising or otherwise to promote the sale, use or other dealings%0Ain this Software without prior written authorization from Stanford University.%0A%0A*/%0A%0Apackage org.lockss.plugin.highwire;%0A%0Aimport java.util.Properties;%0A%0Aimport org.lockss.config.Configuration;%0Aimport org.lockss.daemon.ConfigParamDescr;%0Aimport org.lockss.plugin.UrlNormalizer;%0Aimport org.lockss.plugin.definable.DefinablePlugin;%0Aimport org.lockss.test.ConfigurationUtil;%0Aimport org.lockss.test.LockssTestCase;%0A/*%0A * UrlNormalizer%0A * map H20 links on manifest pages to H10 links%0A * %3Cbase_url%3Econtent/168/1.toc to %3Cbase_url%3Econtent/vol168/issue1/%0A */%0A%0Apublic class TestHighWireUrlNormalizer extends LockssTestCase %7B%0A  %0A  static final String BASE_URL_KEY = ConfigParamDescr.BASE_URL.getKey();%0A  static final String VOL_KEY = ConfigParamDescr.VOLUME_NAME.getKey();%0A  private DefinablePlugin plugin;%0A  %0A  @Override%0A  public void setUp() throws Exception %7B%0A    super.setUp();%0A    plugin = new DefinablePlugin();%0A    plugin.initPlugin(getMockLockssDaemon(),%0A        %22org.lockss.plugin.highwire.HighWirePressPlugin%22);%0A    Properties props = new Properties();%0A    props.setProperty(VOL_KEY, %22303%22);%0A    props.setProperty(BASE_URL_KEY, %22http://www.example.com/%22);%0A    %0A    Configuration config = ConfigurationUtil.fromProps(props);%0A    plugin.configureAu(config, null);%0A    %7D%0A  %0A  public void testUrlNormalizer() throws Exception %7B%0A    UrlNormalizer normalizer = new HighWireUrlNormalizer();%0A    %0A    assertEquals(%22http://ajpcell.physiology.org/content/vol303/issue1/%22,%0A        normalizer.normalizeUrl(%22http://ajpcell.physiology.org/content/303/1.toc%22, null));%0A    %0A    assertEquals(%22http://ajpcell.physiology.org/content/303/1/%22,%0A        normalizer.normalizeUrl(%22http://ajpcell.physiology.org/content/303/1/%22, null));%0A    %0A  %7D%0A%7D%0A

Add test cases for UrlNormalizer