Long () { // Returns duration value for tests // or cached duration for suites if (myDurationIsCached || durationShouldBeSetExplicitly()) { return myDuration; } //For suites counts and caches durations of its children. Also it evaluates partial duration, //i.e. if duration is unknown it will be ignored in summary value. //If duration for all children is unknown summary duration will be also unknown //if one of children is ignored - it's duration will be 0 and if child wasn't run, //then it's duration will be unknown myDuration = calcSuiteDuration(); myDurationIsCached = true; return myDuration; }