@Test
public void getGravatarUrlFromPrincipalTest() {

    UserPrincipal user = mock(UserPrincipal.class);
    when(user.getEmail()).thenReturn("admin@example.com");
    Assert.assertEquals("https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61.jpg?d=mm", GravatarUtil.getGravatarUrl(user));
}