final ClientResponse<Void> response = (ClientResponse<Void>)client.a();
try {
assertEquals(200, response.getStatus());
final List<Span> collectedSpans = SpanCollectorForTesting.getInstance().getCollectedSpans();
assertEquals(2, collectedSpans.size());
final Span clientSpan = collectedSpans.get(0);
final Span serverSpan = collectedSpans.get(1);
assertEquals("Expected trace id's to be equal", clientSpan.getTrace_id(), serverSpan.getTrace_id());
assertEquals("Expected span id's to be equal", clientSpan.getId(), serverSpan.getId());
assertEquals("Expected parent span id's to be equal", clientSpan.getParent_id(), serverSpan.getParent_id());
assertEquals("Span names of client and server should be equal.", clientSpan.getName(), serverSpan.getName());
assertEquals("Expect 2 annotations.", 2, clientSpan.getAnnotations().size());
assertEquals("Expect 2 annotations.", 2, serverSpan.getAnnotations().size());
assertEquals("service name of end points for both client and server annotations should be equal.", clientSpan
.getAnnotations().get(0).getHost().getService_name(), serverSpan.getAnnotations().get(0).getHost()
.getService_name());
} finally {
response.releaseConnection();
}