class WsdlValidator {

    public List<String> executeValidator(String wsdlUrl) throws WsdlValidatorNotExecutableException,
            WsdlValidationFailedException, InterruptedException {
        List<String> warnings = new ArrayList<>();
        // validator not set - this is ok since validator is optional
        if (StringUtils.isEmpty(getWsdlValidatorCommand())) {
            log.warn("Skipping WSDL validator, command not set");
            return warnings;
        }

        if (StringUtils.isEmpty(wsdlUrl)) {
            throw new IllegalArgumentException("wsdl url cannot be null or empty");
        }

        try {
            ExternalProcessRunner.ProcessResult processResult = externalProcessRunner
                    .executeAndThrowOnFailure(getWsdlValidatorCommand(), wsdlUrl);

            logValidatorOutput(processResult.getProcessOutput());
            return processResult.getProcessOutput();
        } catch (ProcessNotExecutableException e) {
            throw new WsdlValidatorNotExecutableException(e);
        } catch (ProcessFailedException e) {
            if (e.getErrorDeviation() != null) {
                logValidatorOutput(e.getErrorDeviation().getMetadata());
            }
            throw new WsdlValidationFailedException(e.getErrorDeviation().getMetadata());
        }
    }

    @Autowired public  WsdlValidator(ExternalProcessRunner externalProcessRunner);

}