@Test public void constructorWithTrailingSlashTest() { String result = new URIStringBuilder("http: .build(); assertThat(result).isEqualTo("http: }
public String build() { return Stream.concat(Stream.of(baseUrl), pathSections.stream()) .filter(item -> item != null && !item.isEmpty()) .collect(Collectors.joining("/")); }
URIStringBuilder { public String build() { return Stream.concat(Stream.of(baseUrl), pathSections.stream()) .filter(item -> item != null && !item.isEmpty()) .collect(Collectors.joining("/")); } }
URIStringBuilder { public String build() { return Stream.concat(Stream.of(baseUrl), pathSections.stream()) .filter(item -> item != null && !item.isEmpty()) .collect(Collectors.joining("/")); } URIStringBuilder(String uriString); }
URIStringBuilder { public String build() { return Stream.concat(Stream.of(baseUrl), pathSections.stream()) .filter(item -> item != null && !item.isEmpty()) .collect(Collectors.joining("/")); } URIStringBuilder(String uriString); URIStringBuilder addPath(String... pathSectionArray); String build(); }
URIStringBuilder { public String build() { return Stream.concat(Stream.of(baseUrl), pathSections.stream()) .filter(item -> item != null && !item.isEmpty()) .collect(Collectors.joining("/")); } URIStringBuilder(String uriString); URIStringBuilder addPath(String... pathSectionArray); String build();  }