HAURLSelectorImpl implements HAURLSelector { public void checkUrl() throws IOException { if (!checkUrl(builder.build(getSelectedUrl()))) { reSelectUrl(); } } HAURLSelectorImpl(String[] urls, Constants.CompressionType compressionType); void checkUrl(); boolean checkUrl(String urlString); @Override String getSelectedUrl();  }
@Test public void testCheckUrl() throws Exception { String[] rmBasePaths = new String[]{"http: HAURLSelectorImpl haurlSelector = new HAURLSelectorImpl(rmBasePaths, Constants.CompressionType.GZIP); mockStatic(InputStreamUtils.class); when(InputStreamUtils.getInputStream("http: Assert.assertFalse(haurlSelector.checkUrl("http: }
@Test public void testCheckUrl1() throws Exception { String[] rmBasePaths = new String[]{"http: HAURLSelectorImpl haurlSelector = new HAURLSelectorImpl(rmBasePaths, Constants.CompressionType.GZIP); mockStatic(InputStreamUtils.class); when(InputStreamUtils.getInputStream("http: Assert.assertFalse(haurlSelector.checkUrl("http: }
@Test(expected = IOException.class) public void testReSelectUrl1() throws Exception { String[] rmBasePaths = new String[]{"http: HAURLSelectorImpl haurlSelector = new HAURLSelectorImpl(rmBasePaths, Constants.CompressionType.GZIP); mockStatic(InputStreamUtils.class); when(InputStreamUtils.getInputStream("http: when(InputStreamUtils.getInputStream("http: haurlSelector.checkUrl(); }
@Test public void testReSelectUrl2() throws Exception { thrown.expect(IOException.class); String[] rmBasePaths = new String[]{"http: HAURLSelectorImpl haurlSelector = new HAURLSelectorImpl(rmBasePaths, Constants.CompressionType.GZIP); mockStatic(InputStreamUtils.class); when(InputStreamUtils.getInputStream("http: when(InputStreamUtils.getInputStream("http: haurlSelector.checkUrl(); }