package com.github.mkopylec.recaptcha.testing;

import com.github.mkopylec.recaptcha.RecaptchaProperties;
import com.github.mkopylec.recaptcha.RecaptchaProperties.Testing;
import com.github.mkopylec.recaptcha.validation.ErrorCode;
import com.github.mkopylec.recaptcha.validation.RecaptchaValidator;
import com.github.mkopylec.recaptcha.validation.ValidationResult;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;

public class TestRecaptchaValidator extends RecaptchaValidator {

    protected final Testing testing;

    public TestRecaptchaValidator(RecaptchaProperties recaptcha) {
        super(null, recaptcha);
        testing = recaptcha.getTesting();
    }

    @Override
    public ValidationResult validate(HttpServletRequest request) {
        return getValidationResult();
    }

    @Override
    public ValidationResult validate(HttpServletRequest request, String ipAddress) {
        return getValidationResult();
    }

    @Override
    public ValidationResult validate(String userResponse) {
        return getValidationResult();
    }

    @Override
    public ValidationResult validate(String userResponse, String ipAddress) {
        return getValidationResult();
    }

    private ValidationResult getValidationResult() {
        if (testing.isSuccessResult()) {
            return new ValidationResult(true, new ArrayList<ErrorCode>());
        }
        return new ValidationResult(false, testing.getResultErrorCodes());
    }
}

@@ -948,32 +948,194 @@
 esult();%0A    %7D%0A%0A
+    @Override%0A    public ValidationResult validate(HttpServletRequest request, String ipAddress, String secretKey) %7B%0A        return getValidationResult();%0A    %7D%0A%0A
     @Override%0A  
@@ -1370,24 +1370,179 @@
 t();%0A    %7D%0A%0A
+    @Override%0A    public ValidationResult validate(String userResponse, String ipAddress, String secretKey) %7B%0A        return getValidationResult();%0A    %7D%0A%0A
     private 

Test validator fixed