final Collection<FeatureOutput> featureOutputs = features.stream()
.filter(feature -> feature.isExecutable(filter))
.map(feature -> featureExecutor.apply(feature, hooks, filter))
.collect(Collectors.toList());
final SpecResult result = ListExtensions.fold(featureOutputs, SpecResult.Success, (previousResult, item) -> previousResult.addFeatureResult(item.getResult()));
final SpecOutput output = new SpecOutput(testClass.getName(), result, featureOutputs);
hooks.endSpecification(this, output);
return output;
} else {
return new SpecOutput(testClass.getName(), SpecResult.Success, Collections.emptyList());
}
}