private String getCategory(String javaFile) {
    Matcher matcher = categoryPattern.matcher(javaFile);

    // Maybe we're running tests in Intellij
    if (!matcher.matches()) {
      matcher = intellijCategoryPattern.matcher(javaFile);
    }

    // Maybe we're running tests in Gradle
    if (!matcher.matches()) {
      matcher = gradleCategoryPattern.matcher(javaFile);
    }

    if (!matcher.matches()) {
      throw new IllegalArgumentException("Unable to determine category for " + javaFile);
    }

    return matcher.group(1);
  }
This class is intended as a helper to the CI StressNewTest job. Given a list of changed test java
files, it expands the list to include any subclasses and outputs a partial Gradle command line to
execute those tests depending on the 'category' of test (unit, distributed, etc.).
geode-junit/src/main/java/org/apache/geode/test/util/StressNewTestHelper.java