@Test public void create_returnsComponentsConcatenated() { FakeUrlFactory urlFactory = new FakeUrlFactory(); assertEquals("/xxx/yyy/foo/bar", urlFactory.create("xxx", "yyy", "foo", "bar")); }
@Override public String create(String... segments) { UrlBuilder urlBuilder = newUrlBuilder(); for (String segment : segments) { urlBuilder.appendPathSegment(segment); } return urlBuilder.build(); }
FakeUrlFactory implements UrlFactory { @Override public String create(String... segments) { UrlBuilder urlBuilder = newUrlBuilder(); for (String segment : segments) { urlBuilder.appendPathSegment(segment); } return urlBuilder.build(); } }
FakeUrlFactory implements UrlFactory { @Override public String create(String... segments) { UrlBuilder urlBuilder = newUrlBuilder(); for (String segment : segments) { urlBuilder.appendPathSegment(segment); } return urlBuilder.build(); }  }
FakeUrlFactory implements UrlFactory { @Override public String create(String... segments) { UrlBuilder urlBuilder = newUrlBuilder(); for (String segment : segments) { urlBuilder.appendPathSegment(segment); } return urlBuilder.build(); }  @Override String create(String... segments); @Override UrlBuilder newUrlBuilder(); }
FakeUrlFactory implements UrlFactory { @Override public String create(String... segments) { UrlBuilder urlBuilder = newUrlBuilder(); for (String segment : segments) { urlBuilder.appendPathSegment(segment); } return urlBuilder.build(); }  @Override String create(String... segments); @Override UrlBuilder newUrlBuilder();  }