/** * [IMethodInterceptor] * Invoked to enable alteration of the list of test methods that TestNG is about to run. * * @param methods list of test methods. * @param context test context. * @return the list of test methods to run. */ @Override public List<IMethodInstance> intercept(List<IMethodInstance> methods, ITestContext context) { synchronized (methodInterceptors) { for (IMethodInterceptor interceptor : methodInterceptors) { methods = interceptor.intercept(methods, context); } } return methods; }