project.setLocationOnDisk(new File("/tmp/"));
return project;
}
private void checkSchedules(IntegrationProject partial) {
RootFolder schedules = partial.getRootFolder(EntityType.Schedule);
Schedule schedule_2_copy = (Schedule) schedules.getDescendant(schedule_2.getID());
assertEquals(schedule_2, schedule_2_copy);
assertTrue(schedule_2_copy.getParent() == schedules);
Folder subFolder_2_copy = (Folder) schedules.getDescendant(scheduleSubFolder_2.getID());
assertEquals(scheduleSubFolder_2, subFolder_2_copy);
assertTrue(subFolder_2_copy.getParent() == schedules);
Schedule schedule_4_copy = (Schedule) schedules.getDescendant(schedule_4.getID());
assertEquals(schedule_4, schedule_4_copy);
assertTrue(schedule_4_copy.getParent() == subFolder_2_copy);
Schedule schedule_3_copy = (Schedule) schedules.getDescendant(schedule_3.getID());
assertEquals(schedule_3, schedule_3_copy);
// Since we didn't copy the parent of schedule_3, we expect the corresponding schedule
// in the partial project to be attached to the RootFolder.
assertTrue(schedule_3_copy.getParent() == schedules);
assertEquals(1, schedules.getNumberOfSubFoldersRecursively());
assertEquals(3, schedules.getNumberOfItemsRecursively());
}