@Test public void shouldAdjust() { Adjuster adjuster = new Adjuster() { @Override protected boolean shouldAdjust(Span span) { for (Annotation a : span.annotations) { if (a.value.equals(Constants.SERVER_RECV) && span.parentId == null) return true; } return false; } @Override protected Span adjust(Span span) { return ApplyTimestampAndDuration.apply(span); } }; assertThat(adjuster.adjust(TestObjects.TRACE)).containsExactly( ApplyTimestampAndDuration.apply(TestObjects.TRACE.get(0)), TestObjects.TRACE.get(1), TestObjects.TRACE.get(2) ); }
protected boolean shouldAdjust(Span span) { return false; }
Adjuster implements Serializable { protected boolean shouldAdjust(Span span) { return false; } }
Adjuster implements Serializable { protected boolean shouldAdjust(Span span) { return false; }  }
Adjuster implements Serializable { protected boolean shouldAdjust(Span span) { return false; }  Iterable<Span> adjust(final Iterable<Span> trace); }
Adjuster implements Serializable { protected boolean shouldAdjust(Span span) { return false; }  Iterable<Span> adjust(final Iterable<Span> trace);  }