ZipkinSpanConvertor { public static Endpoint endpoint(zipkin.Endpoint zipkinEndpoint) { if (zipkinEndpoint == null) { return null; } Endpoint endpoint = new Endpoint(); endpoint.setServiceName(zipkinEndpoint.serviceName); endpoint.setIpv4(parseIpv4(zipkinEndpoint.ipv4)); endpoint.setPort(zipkinEndpoint.port); return endpoint; } private  ZipkinSpanConvertor(); static Span span(zipkin.Span zipkinSpan); static Endpoint endpoint(zipkin.Endpoint zipkinEndpoint); static Annotation annotation(zipkin.Annotation zipkinAnnotation); static BinaryAnnotation binaryAnnotation(zipkin.BinaryAnnotation zipkinBinaryAnnotation); static AnnotationType annotationType(zipkin.BinaryAnnotation.Type zipkinType); static List<Annotation> annotations(List<zipkin.Annotation> zipkinAnnotations); static List<BinaryAnnotation> binaryAnnotations(List<zipkin.BinaryAnnotation> zipkinBinAnnotations); static List<Span> spans(List<zipkin.Span> zipkinSpans); static String parseSpanId(long id);  }
@Test public void testConvertFromZipkinEndpoint() { zipkin.Endpoint zipkinEndpoint = zipkin.Endpoint.builder() .serviceName("service") .ipv4(-1408106489) .port(80) .build(); Endpoint endpoint = ZipkinSpanConvertor.endpoint(zipkinEndpoint); Assert.assertEquals("172.18.0.7", endpoint.getIpv4()); Assert.assertEquals("service", endpoint.getServiceName()); Assert.assertEquals(80, endpoint.getPort().intValue()); }