creates[0] = mockCreateItem(ids.get(0));
creates[1] = mock(SyncFolderItemsCreateOrUpdateType.class);
when(creates[1].isSetMessage()).thenReturn(false);
creates[2] = mockCreateItem(ids.get(2));
mockSyncFolderItems(creates, getDefaultFolder(), getDefaultConfig().getIdPageSize(), newSyncState, true);
SyncFolderItemsResult result =
SyncFolderItemsHelper.syncFolderItems(getService(), getDefaultConfig(), getDefaultFolder());
ids.remove(1);
assertEquals(ids, result.getIds());
assertTrue(result.includesLastItem());
assertEquals(oldSyncState, getDefaultFolder().getSyncStateToken());
assertEquals(newSyncState, result.getSyncState());
}