@Test public void correctly_splits_long_url_with_params() throws MalformedURLException { String url = "https: List<String> splits = urlTokenizer.splitUrl(url); assertTrue(splits.contains("farm1.domain.com")); assertTrue(splits.contains("one")); assertTrue(splits.contains("two")); assertTrue(splits.contains("three")); assertTrue(splits.contains("four.jpg")); assertTrue(splits.contains("param1=value1&param2=value2")); assertTrue(splits.contains("param1=value1")); assertTrue(splits.contains("param2=value2")); assertTrue(splits.contains("https: assertTrue(splits.contains("https: assertTrue(splits.contains("https: assertTrue(splits.contains("https: assertTrue(splits.contains("farm1.domain.com/one")); assertTrue(splits.contains("farm1.domain.com/one/two")); assertTrue(splits.contains("farm1.domain.com/one/two/three")); assertTrue(splits.contains("farm1.domain.com/one/two/three/four.jpg")); assertTrue(splits.contains("one/two/three/four.jpg")); assertTrue(splits.contains("two/three/four.jpg")); assertTrue(splits.contains("three/four.jpg")); assertTrue(splits.contains("one/two/three")); assertTrue(splits.contains("one/two")); assertTrue(splits.contains("two/three")); assertEquals(22, splits.size()); }
protected List<String> splitUrl(String url) { return splitUrl(url, true); }
UrlTokenizer extends Tokenizer { protected List<String> splitUrl(String url) { return splitUrl(url, true); } }
UrlTokenizer extends Tokenizer { protected List<String> splitUrl(String url) { return splitUrl(url, true); } UrlTokenizer(); }
UrlTokenizer extends Tokenizer { protected List<String> splitUrl(String url) { return splitUrl(url, true); } UrlTokenizer(); @Override final boolean incrementToken(); @Override void end(); @Override void reset(); }
UrlTokenizer extends Tokenizer { protected List<String> splitUrl(String url) { return splitUrl(url, true); } UrlTokenizer(); @Override final boolean incrementToken(); @Override void end(); @Override void reset();  }