@SuppressWarnings("unchecked")
  @Override
  protected List<MethodRule> rules(Object target) {
    List<MethodRule> result = testClassFromClassLoader.getAnnotatedMethodValues(target,
        (Class<? extends Annotation>) ruleFromClassLoader, (Class) methodRuleFromClassLoader);

    result.addAll(testClassFromClassLoader.getAnnotatedFieldValues(target,
        (Class<? extends Annotation>) ruleFromClassLoader, (Class) methodRuleFromClassLoader));

    return result;
  }
Load classes (TestCase, @Before and @After with custom class loader.

@throws ClassNotFoundException the class not found exception
extensions/geode-modules-session/src/integrationTest/java/org/apache/geode/modules/session/junit/PerTestClassLoaderRunner.java