Location implements Serializable { public String getFirstSegment() { return segments.get(0); } Location(String location);  Location(String location, QueryParameters queryParameters);  Location(List<String> segments);  Location(List<String> segments, QueryParameters queryParameters); List<String> getSegments(); QueryParameters getQueryParameters(); String getFirstSegment(); Optional<Location> getSubLocation(); String getPath(); String getPathWithQueryParameters(); Location toggleTrailingSlash();  }
@Test public void spaceInLocation() { Location location = new Location("foo bar"); assertEquals("foo bar", location.getFirstSegment()); }
@Test public void locationNameShouldBeAbleToHaveDotDot() { Location location = new Location("..element"); assertEquals("..element", location.getFirstSegment()); location = new Location("el..ement"); assertEquals("el..ement", location.getFirstSegment()); }