DefaultMutableTreeNode leafNode = new DefaultMutableTreeNode(child);
treeModel.insertNodeInto(leafNode, currNode, leafIndex++);
addSubResults(leafNode, child);
// Add any assertion that failed as children of the sample node
AssertionResult assertionResults[] = child.getAssertionResults();
int assertionIndex = leafNode.getChildCount();
for (int j = 0; j < assertionResults.length; j++) {
AssertionResult item = assertionResults[j];
if (item.isFailure() || item.isError()) {
DefaultMutableTreeNode assertionNode = new DefaultMutableTreeNode(item);
treeModel.insertNodeInto(assertionNode, leafNode, assertionIndex++);
}
}
}