private Description getRootDescription(Runner runner, DescriptionMatcher matcher) { Description current = runner.getDescription(); while (true) { List<Description> children = current.getChildren(); if (children.size() != 1 || matcher.matches(current)) return current; current = children.get(0); } }