### Question:
URL { public String toURL() { return originalURL; } URL(String url);  URL(final List<String> segments, final Metadata metadata); static URL build(final String url); static URL build(final List<String> segments, final Metadata metadata); List<String> getDecodedSegments(); List<String> getEncodedSegments(); URL decode(); URL encode(); int numSegments(); @Override String toString(); String toURL(); List<String> getSegments(); boolean hasLeadingSlash(); boolean hasTrailingSlash(); String getEncoding(); void setEncoding(final String encoding); Metadata getMetadata(); void setMetadata(final Metadata metadata);  }### Answer:
@Test public void testURLPreservesOriginalURL() throws Exception { String value = "/com/ocpsoft/pretty/"; URL url = new URL(value); assertEquals(value, url.toURL()); }