class JenkinsConnection implements BuildCapability, ViewCapability, TestCapability {

    @Override
    public void connect(String url, String login, String password) {
        checkNotNull(url, "url is mandatory");
        if (isBlank(url)) {
            throw new IllegalStateException("url can't be null.");
        }
        if (StringUtils.isBlank(login)) {
            hudson = new Hudson(url);
        } else {
            hudson = new Hudson(url, login, password);
        }
        connected = true;
    }

}