Span implements Serializable { public URL url() { return url; } Span(); @JsonCreator  Span(@JsonProperty("binaryAnnotations") List<BinaryAnnotation> binaryAnnotations,
                @JsonProperty("annotations") List<Annotation> annotations);  Span(Span span, List<BinaryAnnotation> binaryAnnotations, List<Annotation> annotations); String getTraceId(); void setTraceId(String traceId); String getName(); void setName(String name); String getId(); void setId(String id); String getParentId(); void setParentId(String parentId); List<Annotation> getAnnotations(); List<BinaryAnnotation> getBinaryAnnotations(); Boolean getDebug(); void setDebug(Boolean debug); Long getTimestamp(); void setTimestamp(Long timestamp); Long getDuration(); void setDuration(Long duration); boolean topLevelSpan(); boolean clientSpan(); boolean serverSpan(); BinaryAnnotation getBinaryAnnotation(String key); MappingResult binaryAnnotationMapping(); String ipv4(); String service(); URL url(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testPartialUrl() throws MalformedURLException { URL url = new URL("http: BinaryAnnotation ba = new BinaryAnnotation(); ba.setKey(Constants.ZIPKIN_BIN_ANNOTATION_HTTP_URL); ba.setValue(url.getPath()); Span span = new Span(Arrays.asList(ba), null); URL result = span.url(); assertNotNull(result); assertEquals(url.getPath(), result.getPath()); }
@Test public void testUrlFromPath() throws MalformedURLException { URL url = new URL("http: BinaryAnnotation ba = new BinaryAnnotation(); ba.setKey(Constants.ZIPKIN_BIN_ANNOTATION_HTTP_PATH); ba.setValue(url.getPath()); Span span = new Span(Arrays.asList(ba), null); URL spanURL = span.url(); assertEquals(url.getPath(), spanURL.getPath()); }