ConditionEvaluationResult (ExtensionContext context) { if (NOT_DISCOVERY_RUN) { return NOT_DISCOVERY_RUN_ALWAYS_ENABLED; } return AnnotationSupport.findAnnotation(context.getTestClass(), ExcludeFromTestDiscovery.class) .map(a -> EXCLUDED_FROM_TEST_DISCOVERY) .orElse(INCLUDED_IN_TEST_DISCOVERY); }