@Test
public void testIsRoot() throws Exception {

	final StagemonitorPlugin.InitArguments initArguments = mock(StagemonitorPlugin.InitArguments.class);
	when(initArguments.getMeasurementSession()).thenReturn(
			new MeasurementSession("JaegerTracerFactoryTest", "test", "test"));
	final JaegerTracerFactory jaegerTracerFactory = new JaegerTracerFactory();
	final Tracer tracer = jaegerTracerFactory.getTracer(initArguments);
	Span rootSpan = tracer.buildSpan("foo").start();
	try (final Scope rootScope = tracer.scopeManager().activate(rootSpan)) {
		final Span childSpan = tracer.buildSpan("bar").start();
		try (final Scope childScope = tracer.scopeManager().activate(childSpan)) {
			assertThat(jaegerTracerFactory.isRoot(rootSpan)).isTrue();
			assertThat(jaegerTracerFactory.isRoot(childSpan)).isFalse();
		}
	}
}