components/global/core/io.cellery.observability.tracing.receiver/src/test/java/io/cellery/observability/tracing/receiver/internal/CodecTestCase.java
private void assertEqual(List<ZipkinSpan> actualSpans, List<Span> expectedSpans) {
        Assert.assertEquals(actualSpans.size(), expectedSpans.size());
        for (int i = 0; i < expectedSpans.size(); i++) {
            Span expectedSpan = expectedSpans.get(i);
            ZipkinSpan actualSpan = actualSpans.get(i);

            Assert.assertEquals(actualSpan.getTraceId(), expectedSpan.traceId());
            Assert.assertEquals(actualSpan.getId(), expectedSpan.id());
            Assert.assertEquals(actualSpan.getParentId(), expectedSpan.parentId());
            if (expectedSpan.kind() == null) {
                Assert.assertEquals(actualSpan.getKind(), "");
            } else {
                Assert.assertEquals(actualSpan.getKind(), expectedSpan.kind().toString());
            }
            Assert.assertEquals(actualSpan.getName(), expectedSpan.name());
            if (expectedSpan.localServiceName() == null) {
                Assert.assertEquals(actualSpan.getServiceName(), "");
            } else {
                Assert.assertEquals(actualSpan.getServiceName(), expectedSpan.localServiceName());
            }
            Assert.assertEquals(new Long(actualSpan.getTimestamp()), expectedSpan.timestamp());
            Assert.assertEquals(new Long(actualSpan.getDuration()), expectedSpan.duration());

            Assert.assertEquals(expectedSpan.tags().size(), expectedSpan.tags().size());
            for (Map.Entry<String, String> tagEntry : expectedSpan.tags().entrySet()) {
                String expectedSpanValue = expectedSpan.tags().get(tagEntry.getKey());
                Assert.assertEquals(tagEntry.getValue(), expectedSpanValue);
            }
        }
    }
/**
     * Compare and assert whether the two spans lists are equal.
     */
Compare and assert whether the two spans lists are equal.
Compare and assert whether the two spans lists are equal .
private void assertEqual(List<ZipkinSpan> actualSpans, List<Span> expectedSpans) {
        Assert.assertEquals(actualSpans.size(), expectedSpans.size());
        for (int i = 0; i < expectedSpans.size(); i++) {
            Span expectedSpan = expectedSpans.get(i);
            ZipkinSpan actualSpan = actualSpans.get(i);
            Assert.assertEquals(actualSpan.getTraceId(), expectedSpan.traceId());
            Assert.assertEquals(actualSpan.getId(), expectedSpan.id());
            Assert.assertEquals(actualSpan.getParentId(), expectedSpan.parentId());
            if (expectedSpan.kind() == null) {
                Assert.assertEquals(actualSpan.getKind(), "");
            } else {
                Assert.assertEquals(actualSpan.getKind(), expectedSpan.kind().toString());
            }
            Assert.assertEquals(actualSpan.getName(), expectedSpan.name());
            if (expectedSpan.localServiceName() == null) {
                Assert.assertEquals(actualSpan.getServiceName(), "");
            } else {
                Assert.assertEquals(actualSpan.getServiceName(), expectedSpan.localServiceName());
            }
            Assert.assertEquals(new Long(actualSpan.getTimestamp()), expectedSpan.timestamp());
            Assert.assertEquals(new Long(actualSpan.getDuration()), expectedSpan.duration());
            Assert.assertEquals(expectedSpan.tags().size(), expectedSpan.tags().size());
            for (Map.Entry<String, String> tagEntry : expectedSpan.tags().entrySet()) {
                String expectedSpanValue = expectedSpan.tags().get(tagEntry.getKey());
                Assert.assertEquals(tagEntry.getValue(), expectedSpanValue);
            }
        }
    }
private void assertEqual ( List < ZipkinSpan > actualSpans , List < Span > expectedSpans ) { Assert . assertEquals ( actualSpans . size ( ) , expectedSpans . size ( ) ) ; for ( int i = 0 ; i < expectedSpans . size ( ) ; i ++ ) { Span expectedSpan = expectedSpans . get ( i ) ; ZipkinSpan actualSpan = actualSpans . get ( i ) ; Assert . assertEquals ( actualSpan . getTraceId ( ) , expectedSpan . traceId ( ) ) ; Assert . assertEquals ( actualSpan . getId ( ) , expectedSpan . id ( ) ) ; Assert . assertEquals ( actualSpan . getParentId ( ) , expectedSpan . parentId ( ) ) ; if ( expectedSpan . kind ( ) == null ) { Assert . assertEquals ( actualSpan . getKind ( ) , "" ) ; } else { Assert . assertEquals ( actualSpan . getKind ( ) , expectedSpan . kind ( ) . toString ( ) ) ; } Assert . assertEquals ( actualSpan . getName ( ) , expectedSpan . name ( ) ) ; if ( expectedSpan . localServiceName ( ) == null ) { Assert . assertEquals ( actualSpan . getServiceName ( ) , "" ) ; } else { Assert . assertEquals ( actualSpan . getServiceName ( ) , expectedSpan . localServiceName ( ) ) ; } Assert . assertEquals ( new Long ( actualSpan . getTimestamp ( ) ) , expectedSpan . timestamp ( ) ) ; Assert . assertEquals ( new Long ( actualSpan . getDuration ( ) ) , expectedSpan . duration ( ) ) ; Assert . assertEquals ( expectedSpan . tags ( ) . size ( ) , expectedSpan . tags ( ) . size ( ) ) ; for ( Map . Entry < String , String > tagEntry : expectedSpan . tags ( ) . entrySet ( ) ) { String expectedSpanValue = expectedSpan . tags ( ) . get ( tagEntry . getKey ( ) ) ; Assert . assertEquals ( tagEntry . getValue ( ) , expectedSpanValue ) ; } } }
Compare and assert whether the two spans lists are equal.
Compare and assert whether the two spans lists are equal .