### Question:
ContactsBackend extends ObmSyncBackend<WindowingContact> { @Override public List<ItemChange> fetch(UserDataRequest udr, CollectionId collectionId, List<ServerId> fetchServerIds, SyncCollectionOptions syncCollectionOptions, ItemSyncState previousItemSyncState, SyncKey newSyncKey) throws DaoException, UnexpectedObmSyncServerException, ConversionException { return fetch(udr, collectionId, fetchServerIds, syncCollectionOptions); } @Inject @VisibleForTesting  ContactsBackend(MappingService mappingService, 
			BookClient.Factory bookClientFactory, 
			ContactConfiguration contactConfiguration,
			WindowingDao windowingDao,
			ClientIdService clientIdService,
			ContactConverter contactConverter,
			DateService dateService,
			OpushResourcesHolder opushResourcesHolder,
			ContactCreationIdempotenceService creationIdempotenceService,
			FolderSnapshotDao folderSnapshotDao); @Override PIMDataType getPIMDataType(); @Override BackendFolders getBackendFolders(UserDataRequest udr); @Override int getItemEstimateSize(UserDataRequest udr, ItemSyncState state, CollectionId collectionId, 
		SyncCollectionOptions syncCollectionOptions); @Override ServerId createOrUpdate(UserDataRequest udr, CollectionId collectionId,
			ServerId serverId, String clientId, IApplicationData data); @Override void delete(UserDataRequest udr, CollectionId collectionId, ServerId serverId, Boolean moveToTrash); @Override List<ItemChange> fetch(UserDataRequest udr, CollectionId collectionId, List<ServerId> fetchServerIds, SyncCollectionOptions syncCollectionOptions,
				ItemSyncState previousItemSyncState, SyncKey newSyncKey); @Override List<ItemChange> fetch(UserDataRequest udr, CollectionId collectionId, List<ServerId> fetchServerIds, SyncCollectionOptions syncCollectionOptions); @Override ServerId move(UserDataRequest udr, Folder srcFolder, Folder dstFolder,
			ServerId messageId); @Override void emptyFolderContent(UserDataRequest udr, Folder folder,
			boolean deleteSubFolder); @Override void initialize(DeviceId deviceId, CollectionId collectionId, FilterType filterType, SyncKey newSyncKey); @Override BackendId createFolder(UserDataRequest udr, FolderCreateRequest folderCreateRequest,
			Optional<BackendId> backendId);  }### Answer:
@Test public void testFetch() throws Exception { ItemSyncState state = null; SyncCollectionOptions options = null; SyncKey newSyncKey = new SyncKey("132"); CollectionId collectionId = CollectionId.of(1); int bookId = 5; ServerId serverId = collectionId.serverId(215); expect(folderSnapshotDao.get(user, device, collectionId)).andReturn( org.obm.push.bean.change.hierarchy.Folder.builder() .displayName("folder") .collectionId(collectionId) .backendId(AddressBookId.of(bookId)) .folderType(FolderType.DEFAULT_CONTACTS_FOLDER) .build()); Contact contact = newContactObject(serverId.getItemId()); expect(bookClient.getContactFromId(token, bookId, serverId.getItemId())).andReturn(contact); expect(mappingService.getServerIdFor(collectionId, String.valueOf(serverId.getItemId()))).andReturn(serverId); mocks.replay(); List<ItemChange> itemChanges = contactsBackend.fetch(userDataRequest, collectionId, ImmutableList.of(serverId), options, state, newSyncKey); mocks.verify(); ItemChange itemChange = ItemChange.builder() .serverId(serverId) .isNew(false) .data(contactConverter.convert(contact)) .build(); assertThat(itemChanges).hasSize(1); assertThat(itemChanges).containsOnly(itemChange); }