@SuppressWarnings("unchecked")
  @Override
  protected Statement withBefores(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> befores = testClassFromClassLoader
        .getAnnotatedMethods((Class<? extends Annotation>) beforeFromClassLoader);
    return new RunBefores(statement, befores, 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