I've written a piece of code. Would like to know is the below piece of code unit testable or does it need any kind of refactoring.MatchCilentUrls is the primary method for matching two urls. Based on my business logic i am matching the Urls.Appreciate your comments on this.    public bool MatchClientUrls(string redirectUrl, string whiteListUrls)    {        if (String.IsNullOrEmpty(redirectUrl) || String.IsNullOrEmpty(whiteListUrls))            throw new ArgumentNullException();        var urlList = whiteListUrls.Split(';');        var redirectUrlScheme = string.Empty;        var redirectUrlDomain = string.Empty;        var urlScheme = string.Empty;        var urlDomain = string.Empty;        ParseUrl(redirectUrl, out redirectUrlScheme, out redirectUrlDomain);        foreach (var url in urlList)        {            urlScheme = string.Empty;            urlDomain = string.Empty;            ParseUrl(url, out urlScheme, out urlDomain);            if (String.IsNullOrEmpty(redirectUrlScheme) || String.IsNullOrEmpty(urlScheme))            {                if (redirectUrlDomain.StartsWith(urlDomain, StringComparison.OrdinalIgnoreCase) || urlDomain.StartsWith(redirectUrlDomain, StringComparison.OrdinalIgnoreCase))                    return true;            }            else            {                if (redirectUrlScheme == urlScheme)                {                    if (redirectUrlDomain.StartsWith(urlDomain, StringComparison.OrdinalIgnoreCase) || urlDomain.StartsWith(redirectUrlDomain, StringComparison.OrdinalIgnoreCase))                        return true;                }            }        }        return false;    }    private void ParseUrl(string url, out string scheme, out string domain)    {        scheme = string.Empty;        domain = string.Empty;        var index = url.IndexOf(//);        if (index > 0)        {            scheme = url.Substring(0, index - 1);            domain = url.Substring(index + 2);        }        else        {            domain = url;        }    }    public bool ValidateUrl(string url)    {                    var regEx = @^(http(s)?://)?[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?$;                    if(Regex.IsMatch(url, regEx))            return true;        else            return false;                }
Is my code unit testable
java;unit testing
It looks unit testable to me. Every method has a single purpose.Check that link also: https://stackoverflow.com/questions/2515048/is-my-code-really-not-unit-testable