@Test(expectedExceptions = IllegalArgumentException.class) public void useNullValue() { InvocationTreeUtil.isChildOfSpan(null); } }
@Test public void parentIsSpan() { InvocationTreeElement child = tree.getChildren().get(0); boolean result = InvocationTreeUtil.isChildOfSpan(child); assertThat(result, is(true)); }
@Test public void parentIsNotSpan() { InvocationTreeElement treeElement = InvocationTreeUtil.lookupTreeElement(InvocationTreeUtil.buildLookupMap(tree), _invoc02); boolean result = InvocationTreeUtil.isChildOfSpan(treeElement); assertThat(result, is(false)); }