use of com.google.api.services.people.v1.PeopleService in project data-transfer-project by google.
the class GoogleContactsServiceTest method setup.
@Before
public void setup() throws IOException {
connections = mock(Connections.class);
getBatchGet = mock(GetBatchGet.class);
people = mock(People.class);
peopleService = mock(PeopleService.class);
listConnectionsRequest = mock(Connections.List.class);
createContact = mock(CreateContact.class);
jobDataCache = new InMemoryJobDataCache();
contactsService = new GoogleContactsService(peopleService, jobDataCache);
when(getBatchGet.setPersonFields(PERSON_FIELDS)).thenReturn(getBatchGet);
when(people.connections()).thenReturn(connections);
when(people.getBatchGet()).thenReturn(getBatchGet);
when(people.createContact(any(Person.class))).thenReturn(createContact);
when(peopleService.people()).thenReturn(people);
}
Aggregations