class DefaultDataProviderMethodResolver implements DataProviderMethodResolver {

    protected boolean isMatchingNameConvention(String testMethodName, String dataProviderMethodName) {
        if (dataProviderMethodName.equals(testMethodName)) {
            return true;
        } else if (dataProviderMethodName.equals(testMethodName.replaceAll("^test", "dataProvider"))) {
            return true;
        } else if (dataProviderMethodName.equals(testMethodName.replaceAll("^test", "data"))) {
            return true;
        } else if (dataProviderMethodName
                .equals("dataProvider" + toUpperCase(testMethodName.charAt(0)) + testMethodName.substring(1))) {
            return true;
        } else if (dataProviderMethodName
                .equals("data" + toUpperCase(testMethodName.charAt(0)) + testMethodName.substring(1))) {
            return true;
        }
        return false;
    }

}