when(syncFolderItemsResponseMessage.getSyncState()).thenReturn(newSyncState);
when(syncFolderItemsResponseMessage.isSetChanges()).thenReturn(true);
when(syncFolderItemsResponseMessage.getChanges()).thenReturn(syncFolderItemsChanges);
SyncFolderItemsCreateOrUpdateType[] creates = createSyncFolderItemsCreateArray(ids);
when(syncFolderItemsChanges.getCreateArray()).thenReturn(creates);
SyncFolderItemsResult result =
SyncFolderItemsHelper.syncFolderItems(getService(), getDefaultConfig(), getDefaultFolder());
Vector<String> expected = new Vector<String>(1);
expected.add("onlyId");
assertEquals(expected, result.getIds());
assertFalse(result.includesLastItem());
assertEquals(oldSyncState, getDefaultFolder().getSyncStateToken());
assertEquals(newSyncState, result.getSyncState());
}