}
@Test
public void testGetSyncFolderItemsRequestWithState() throws ServiceCallException
{
SyncFolderItemsType syncFolderItems = SyncFolderItemsType.Factory.newInstance();
syncFolderItems.setMaxChangesReturned(512);
syncFolderItems.addNewItemShape().setBaseShape(DefaultShapeNamesType.ID_ONLY);
syncFolderItems.addNewSyncFolderId().addNewFolderId().setId("MySweetExchangeId");
syncFolderItems.setSyncState("MySweetSyncToken");
Configuration config = new Configuration(4000, 200);
FolderContext folder = new FolderContext("MySweetExchangeId", getDefaultUser(),
new InMemoryUserFolderSyncStateStorage());
folder.setSyncStateToken("MySweetSyncToken");
assertEquals(syncFolderItems.xmlText(),
SyncFolderItemsHelper.getSyncFolderItemsRequest(config, folder).xmlText());
}