/** * Same as {@link #isRoot()}. Needed for querying. * * @return {@link #isRoot()} */ public boolean getRoot() { // NOPMD return isRoot(); }
@BeforeMethod public void initMocks() { doAnswer(new Answer<ScheduledFuture<Void>>() { @Override public ScheduledFuture<Void> answer(InvocationOnMock invocation) throws Throwable { ((Runnable) invocation.getArguments()[0]).run(); return null; } }).when(scheduledExecutor).schedule(any(Runnable.class), anyLong(), any()); when(backEndSpan.getPropagationType()).thenReturn(PropagationType.HTTP); when(backEndSpan.isRoot()).thenReturn(true); when(backEndSpan.getSpanIdent()).thenReturn(backEndIdent); when(frontEndSpan.getPropagationType()).thenReturn(PropagationType.HTTP); when(frontEndSpan.isRoot()).thenReturn(true); PageLoadRequest details = mock(PageLoadRequest.class); when(frontEndSpan.getDetails()).thenReturn(details); when(frontEndSpan.getDetails()).thenReturn(spanDetails); when(frontEndSpan.getSpanIdent()).thenReturn(frontEndIdent); }
/** * {@inheritDoc} */ @Override public String toString() { return "AbstractSpan [isCaller()=" + this.isCaller() + ", getSpanIdent()=" + this.getSpanIdent() + ", getDuration()=" + this.getDuration() + ", getPropagationType()=" + this.getPropagationType() + ", getReferenceType()=" + this.getReferenceType() + ", getParentSpanId()=" + this.getParentSpanId() + ", isRoot()=" + this.isRoot() + ", getTags()=" + this.getTags() + "]"; }