assertThat(savedProfile.getAvatarUrl(), equalTo("http://gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0"));
}
@Test
public void updateMemberProfileDoesNotUpdateAvatarUrlIfGravatarEmailIsEmpty() {
MemberProfile savedProfile = new MemberProfile();
savedProfile.setAvatarUrl("http://example.com/image.png");
given(teamRepository.findById(1234L)).willReturn(savedProfile);
SearchEntry searchEntry = new SearchEntry();
given(mapper.map(savedProfile)).willReturn(searchEntry);
MemberProfile updatedProfile = new MemberProfile();
updatedProfile.setGravatarEmail("");
service.updateMemberProfile(1234L, updatedProfile);
assertThat(savedProfile.getAvatarUrl(), equalTo("http://example.com/image.png"));
}