private Google google = Mockito.mock(Google.class);
@Test
public void fetchProfile() {
PlusOperations plusOperations = Mockito.mock(PlusOperations.class);
Mockito.when(google.plusOperations()).thenReturn(plusOperations);
Person person = Mockito.mock(Person.class);
Mockito.when(person.getDisplayName()).thenReturn("Gabriel Axel");
Mockito.when(person.getGivenName()).thenReturn("Gabriel");
Mockito.when(person.getFamilyName()).thenReturn("Axel");
Mockito.when(person.getAccountEmail()).thenReturn("guznik@gmail.com");
Mockito.when(person.getId()).thenReturn("114863353858610846998");
Mockito.when(plusOperations.getGoogleProfile()).thenReturn(person);
UserProfile profile = apiAdapter.fetchUserProfile(google);
assertEquals("Gabriel Axel", profile.getName());
assertEquals("Gabriel", profile.getFirstName());
assertEquals("Axel", profile.getLastName());
assertEquals("guznik@gmail.com", profile.getEmail());