package org.synyx.urlaubsverwaltung.person;

import org.junit.jupiter.api.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.synyx.urlaubsverwaltung.person.GravatarUtil.createImgURL;

class GravatarUtilTest {

    @Test
    void testCreateImgURL() {
        assertThat(createImgURL("Jim.Medina@example.org"), is("https://gravatar.com/avatar/bfe7859d16a06b3a1b70848a40993f5d"));
    }
}

@@ -67,62 +67,141 @@
 ter.
-api.
+params.Parameterized
 Test;%0A
-%0A
 import 
-static org.hamcrest.CoreMatchers.is;
+org.junit.jupiter.params.provider.NullSource;%0Aimport org.junit.jupiter.params.provider.ValueSource;%0A
 %0Aimp
@@ -219,30 +219,35 @@
 org.
-hamcrest.Matcher
+assertj.core.api.
 Assert
+ions
 .ass
@@ -367,86 +367,379 @@
    @
-Test%0A    void testCreateImgURL() %7B%0A        assertThat(createImgURL(%22Jim.Medina
+ParameterizedTest%0A    @ValueSource(strings = %7B%22   %22%7D)%0A    @NullSource%0A    void ensureCreateGravatarUrlFallbackOnEmptyOrNullEMail(String email) %7B%0A        final String gravatarUrl = createImgURL(email);%0A        assertThat(gravatarUrl).isEqualTo(%22https://gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e%22);%0A    %7D%0A%0A    @ParameterizedTest%0A    @ValueSource(strings = %7B%22gary
 @exa
@@ -751,77 +751,240 @@
 org%22
-)
 , 
-is(%22https://gravatar.com/avatar/bfe7859d16a06b3a1b70848a40993f5d%22)
+%22GARY@EXAMPLE.ORG%22%7D)%0A    void ensureCreateGravatarUrl(String email) %7B%0A        final String gravatarUrl = createImgURL(email);%0A        assertThat(gravatarUrl).isEqualTo(%22https://gravatar.com/avatar/f8b44b88d2e22c6f2f4f4592a9196598%22
 );%0A 

Improve GravatarUrlTest