private Url newUrl() { return new Url() .withHostname("localhost") .withPathname("/foo") .withPort(8080) .withProtocol("http") .withSearch("foo=bar") .appendToFull("http://localhost:8080/foo?foo=bar"); } }
.withProtocol("https") .appendToFull("https://www.example.com/p/a/t/h?query=string#hash") .withHostname("www.example.com") .withPort(8080) .withPathname("/p/a/t/h")
.withProtocol("https") .appendToFull("https://www.example.com/p/a/t/h?query=string#hash") .withHostname("www.example.com") .withPort(8080) .withPathname("/p/a/t/h")