WellKnownPathUriGenerator implements UriGenerator { @Override public CrawleableUri getUriVariant(CrawleableUri uri) { URI uriObject = uri.getUri(); String path = "/.well-known/void"; URIBuilder builder = new URIBuilder(uriObject); builder.setPath(path); builder.setPort(-1); builder.setFragment(null); builder.setCustomQuery(null); CrawleableUri uriVariant = null; try { uriVariant = new CrawleableUri(builder.build()); } catch (URISyntaxException e) { LOGGER.error("Exception while generating variant URIs", e); } return uriVariant; }  @Override CrawleableUri getUriVariant(CrawleableUri uri);  }
@Test public void getVariant(){ CrawleableUri originalUri = null; try { originalUri = new CrawleableUri( new URI("http: } catch (URISyntaxException e) { e.printStackTrace(); } boolean voidFlag = false; CrawleableUri actualUriVariant = variantUriObject.getUriVariant(originalUri); try { CrawleableUri voidUri = new CrawleableUri( new URI("http: if(actualUriVariant.equals(voidUri)) voidFlag = true; } catch (URISyntaxException e) { e.printStackTrace(); } Assert.assertTrue(voidFlag); }