@Test public void testUrlTypes(@SuppressWarnings("unused") @Mocked final WsInputDir wsInputDir) throws Exception { WebsphereClasspathScanHandler handler = new WebsphereClasspathScanHandler(); List<Vfs.UrlType> list = handler.urlTypes(); Assertions.assertThat(list.size()).isEqualTo(1); Vfs.UrlType urlType = list.get(0); URLStreamHandler goodStubUrlHandler = new URLStreamHandler() { @Override protected URLConnection openConnection(URL u) { return null; } }; final URL warURL = new URL("wsjar", "", -1, "file:C/test.war", goodStubUrlHandler); final URL warJarURL = new URL("wsjar", "", -1, "file:C/test.war!test.jar", goodStubUrlHandler); final URL badURL = new URL("jar", "", -1, "file:C/test.war"); Assertions.assertThat(urlType.matches(warURL)).isTrue(); Assertions.assertThat(urlType.matches(badURL)).isFalse(); Assertions.assertThat(urlType.matches(warJarURL)).isFalse(); urlType.createDir(warURL); new Verifications() { { new WsInputDir(warURL); times = 1; } }; }
@Override public List<Vfs.UrlType> urlTypes() { return Lists.newArrayList(new WebSphereJarUrlType()); }
WebsphereClasspathScanHandler implements ClasspathScanHandler { @Override public List<Vfs.UrlType> urlTypes() { return Lists.newArrayList(new WebSphereJarUrlType()); } }
WebsphereClasspathScanHandler implements ClasspathScanHandler { @Override public List<Vfs.UrlType> urlTypes() { return Lists.newArrayList(new WebSphereJarUrlType()); }  }
WebsphereClasspathScanHandler implements ClasspathScanHandler { @Override public List<Vfs.UrlType> urlTypes() { return Lists.newArrayList(new WebSphereJarUrlType()); }  @Override List<Vfs.UrlType> urlTypes(); }
WebsphereClasspathScanHandler implements ClasspathScanHandler { @Override public List<Vfs.UrlType> urlTypes() { return Lists.newArrayList(new WebSphereJarUrlType()); }  @Override List<Vfs.UrlType> urlTypes();  }