URIPath { public String asString() { return path; } URIPath(String path); String asString(); Optional<String> getPart(int index); boolean endsWith(String suffix); URIPath omitFirst(); int length(); @Override String toString();  }
@Test void fullTargetForRoot() { URIPath target = new URIPath("/"); String expected = "/"; String result = target.asString(); assertEquals(expected, result); }
@Test void fullTarget() { URIPath target = new URIPath("/example/target"); String expected = "/example/target"; String result = target.asString(); assertEquals(expected, result); }