boolean (@NotNull Class<?> testCaseClass) { if (!SKIP_SLOW && !SKIP_HEADLESS) { return true; } for (Class<?> clazz = testCaseClass; clazz != null; clazz = clazz.getSuperclass()) { if (SKIP_HEADLESS && clazz.getAnnotation(SkipInHeadlessEnvironment.class) != null) { System.out.println("Class '" + testCaseClass.getName() + "' is skipped because it requires working UI environment"); return false; } if (SKIP_SLOW && clazz.getAnnotation(SkipSlowTestLocally.class) != null) { System.out.println("Class '" + testCaseClass.getName() + "' is skipped because it is dog slow"); return false; } } return true; }