@SuppressWarnings("unchecked")
  @Override
  protected Statement withAfters(FrameworkMethod method, Object target, Statement statement) {
    // We now to need to search in the class from the custom loader.
    // We also need to search with the annotation loaded by the custom
    // class loader or otherwise we don't find any method.
    List<FrameworkMethod> afters = testClassFromClassLoader
        .getAnnotatedMethods((Class<? extends Annotation>) afterFromClassLoader);
    return new RunAfters(statement, afters, target);
  }
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