class DefaultDataProviderMethodResolver extends com.tngtech.junit.dataprovider.resolver.DefaultDataProviderMethodResolver implements DataProviderMethodResolver {

    protected FrameworkMethod findDataProviderMethod(TestClass location, String testMethodName, String useDataProviderValue) {
        List<FrameworkMethod> dataProviderMethods = location.getAnnotatedMethods(DataProvider.class);
        for (FrameworkMethod dataProviderMethod : dataProviderMethods) {
            if (UseDataProvider.DEFAULT_VALUE.equals(useDataProviderValue)) {
                if (isMatchingNameConvention(testMethodName, dataProviderMethod.getName())) {
                    return dataProviderMethod;
                }
            } else if (dataProviderMethod.getName().equals(useDataProviderValue)) {
                return dataProviderMethod;
            }
        }
        return null;
    }

}