class DataProviderMethodResolverHelper {

    public static List<Method> findDataProviderMethods(DataProviderResolverContext context) {
        checkNotNull(context, "'context' must not be null");

        List<Method> result = new ArrayList<Method>();
        for (Class<? extends DataProviderMethodResolver> resolverClass : context.getResolverClasses()) {
            DataProviderMethodResolver resolver = newInstance(resolverClass);

            List<Method> dataProviderMethods = resolver.resolve(context);
            if (context.getResolveStrategy() == ResolveStrategy.UNTIL_FIRST_MATCH && !dataProviderMethods.isEmpty()) {
                result.addAll(dataProviderMethods);
                break;

            } else if (context.getResolveStrategy() == ResolveStrategy.AGGREGATE_ALL_MATCHES) {
                result.addAll(dataProviderMethods);
            }
        }
        return result;
    }

}