package com.atlassian.bitbucket.hamcrest;

import org.hamcrest.Factory;
import org.hamcrest.Matcher;

import static com.atlassian.bitbucket.hamcrest.RegexMatcher.matchesRegex;

public class AvatarMatchers {

    private AvatarMatchers() {
        throw new UnsupportedOperationException(AvatarMatchers.class.getName() + " should not be instantiated");
    }

    @Factory
    public static Matcher<String> gravatarURL() {
        return RegexMatcher.matchesRegex("http://www.gravatar.com/avatar/[a-f0-9]{32}.jpg(?:\\?.+)?", true);
    }

}
