class DefaultDataProviderMethodResolver implements DataProviderMethodResolver {

    protected List<Method> findAnnotatedMethods(List<Class<?>> locations, Class<? extends Annotation> annotationClass) {
        List<Method> result = new ArrayList<Method>();
        for (Class<?> location : locations) {
            List<Method> intermediateResult = new ArrayList<Method>();
            Class<?> currentClass = location;
            while (currentClass != null) {
                for (Method method : sorted(currentClass.getDeclaredMethods())) {
                    Annotation foundAnnotation = method.getAnnotation(annotationClass);
                    if (foundAnnotation != null && !isMethodShadowedBy(method, intermediateResult)) {
                        intermediateResult.add(method);
                    }
                }
                currentClass = currentClass.getSuperclass();
            }
            result.addAll(intermediateResult);
        }
        return result;
    }

}