Node () { Iterator<Node> testsIterator = myRunningTestNodes.iterator(); if (testsIterator.hasNext()) { return testsIterator.next(); } Iterator<Node> suitesIterator = myRunningSuiteNodes.iterator(); if (suitesIterator.hasNext()) { return suitesIterator.next(); } return myTestsRootNode; }