1import org.junit.experimental.categories.CategoryValidator;2CategoryValidator validator = new CategoryValidator();3boolean result = validator.shouldRun(CategoryA.class);4import org.junit.runner.manipulation.CategoryFilter;5CategoryFilter filter = new CategoryFilter(CategoryA.class, false, true);6boolean result = filter.shouldRun(description);7import org.junit.experimental.categories.CategoryMatcher;8CategoryMatcher matcher = new CategoryMatcher(CategoryA.class, true);9boolean result = matcher.matches(description);10import org.junit.experimental.categories.CategoryFilterFactory;11CategoryFilterFactory factory = new CategoryFilterFactory();12boolean result = factory.createFilter(CategoryA.class).shouldRun(description);13import org.junit.experimental.categories.CategoryFilterFactory;14CategoryFilterFactory factory = new CategoryFilterFactory();15boolean result = factory.createFilter(CategoryA.class, true, true).shouldRun(description);16import org.junit.runner.manipulation.CategoryFilter;17CategoryFilter filter = new CategoryFilter(CategoryA.class, true, true);18boolean result = filter.shouldRun(description);19import org.junit.experimental.categories.CategoryMatcher;20CategoryMatcher matcher = new CategoryMatcher(CategoryA.class, true);21boolean result = matcher.matches(description);22import org.junit.experimental.categories.CategoryValidator;23CategoryValidator validator = new CategoryValidator();24validator.setCategoryFiltering(true);25boolean result = validator.shouldRun(CategoryA.class);26import org.junit.runner.manipulation.CategoryFilter;27CategoryFilter filter = new CategoryFilter(CategoryA.class, false, true);28boolean result = filter.shouldRun(description);29import org.junit.experimental.categories.CategoryMatcher;30CategoryMatcher matcher = new CategoryMatcher(CategoryA.class, true);31boolean result = matcher.matches(description);32import org.junit.experimental.categories.CategoryFilterFactory;33CategoryFilterFactory factory = new CategoryFilterFactory();34import org.junit.experimental.categories.CategoryValidator;35import org.junit.experimental.categories.CategoryValidatorFactory;36import org.junit.experimental.categories.Categories;37import org.junit.runner.RunWith;38import org.junit.runners.model.InitializationError;39public class MyCategories extends Categories {40 public MyCategories(Class<?> klass) throws InitializationError {41 super(klass, CategoryValidatorFactory.createCustom