gt: 		ArrayList<Identifiable> items = iCECore.getItemList();
context: /*******************************************************************************
   * Copyright (c) 2012, 2014 UT-Battelle, LLC.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
   * which accompanies this distribution, and is available at
   * http://www.eclipse.org/legal/epl-v10.html
   *
   * Contributors:
   *   Initial API and implementation and/or initial documentation - Jay Jay Billings,
   *   Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
   *   Claire Saunders, Matthew Wang, Anna Wojtowicz
   *******************************************************************************/
  package org.eclipse.ice.tests.core;
  
  import static org.junit.Assert.assertEquals;
  import static org.junit.Assert.assertNotNull;
  import static org.junit.Assert.assertNull;
  import static org.junit.Assert.assertTrue;
  import static org.junit.Assert.fail;
  
  import java.io.File;
  import java.io.IOException;
  import java.net.URI;
  import java.util.ArrayList;
  import java.util.List;
  
  import org.eclipse.core.resources.IFile;
  import org.eclipse.core.resources.IProject;
  import org.eclipse.core.resources.IProjectDescription;
  import org.eclipse.core.resources.IResource;
  import org.eclipse.core.resources.IWorkspaceRoot;
  import org.eclipse.core.resources.ResourcesPlugin;
  import org.eclipse.core.runtime.CoreException;
  import org.eclipse.ice.core.internal.Core;
  import org.eclipse.ice.core.internal.itemmanager.ItemManager;
  import org.eclipse.ice.datastructures.ICEObject.Identifiable;
  import org.eclipse.ice.datastructures.form.DataComponent;
  import org.eclipse.ice.datastructures.form.Form;
  import org.eclipse.ice.datastructures.form.FormStatus;
  import org.junit.Before;
  import org.junit.Test;
  
  /**
   * <p>
   * CoreTester tests the functionality of Core. It checks its ability to get a
   * representation of the file system, the ability to set Locations, and the
   * ability to make a client-core connection. It uses an instance FakeItemManager
   * and calls the alternative constructor of Core to inject the dependency.
   * </p>
   *
   * @author Jay Jay Billings
   */
  public class CoreTester {
  	/**
  	 * The core under test
  	 */
  	private Core iCECore;
  
  	/**
  	 * The ItemManager used by the core and queried by the test.
  	 */
  	private ItemManager fakeItemManager;
  
  	/**
  	 * The fake persistence provider used to make sure Items are persisted in
  	 * separate projects.
  	 */
  	private FakePersistenceProvider fakePersistenceProvider;
  
  	/**
  	 * This operation configures the core.
  	 *
  	 * @throws CoreException
  	 */
  	@Before
  	public void BeforeClass() throws CoreException {
  
  		// Local Declarations
  		File testDir = new File(".");
  		String location = testDir.toURI().toASCIIString();
  
  		// Enable debug mode
  		System.setProperty("DebugICE", "");
  
  		// Setup the ItemManager, fake Persistence Provider and Core
  		fakeItemManager = new ItemManager();
  		fakePersistenceProvider = new FakePersistenceProvider();
  		iCECore = new Core(fakeItemManager);
  		iCECore.setPersistenceProvider(fakePersistenceProvider);
  		iCECore.start(null);
  
  		return;
  	}
  
  	/**
  	 * This operation checks the Core by insuring that instances of ItemBuilder
  	 * can be registered with the class.
  	 */
  	@Test
  	public void checkItemRegistration() {
  
  		// Local Declarations
  		FakeGeometryBuilder fakeGeometryBuilder = new FakeGeometryBuilder();
  		FakeModuleBuilder fakeModuleBuilder = new FakeModuleBuilder();
  		FakeCompositeItemBuilder fakeCompositeBuilder = new FakeCompositeItemBuilder();
  		String testItemName = null;
  		boolean found;
  
  		// Register the ItemBuilders
  		iCECore.registerItem(fakeModuleBuilder);
  		iCECore.registerItem(fakeGeometryBuilder);
  
  		// Check the ItemManager and make sure the builders were forwarded
  
  		// Make sure the list of available builders contains the 2 fake items.
  		List<String> availableBuilders = fakeItemManager.getAvailableBuilders();
  		assertNotNull(availableBuilders);
  		assertTrue(availableBuilders.contains(fakeModuleBuilder.getItemName()));
  		assertTrue(availableBuilders.contains(fakeGeometryBuilder.getItemName()));
  
  		// NOTE: The below code has to loop over the list of available builders
  		// because the underlying list is NOT ordered.
  
  		// Make sure the available builders includes the fake module builder.
  		found = false;
  		testItemName = fakeModuleBuilder.getItemName();
  		for (int i = 0; !found && i < availableBuilders.size(); i++) {
  			found = testItemName.equals(availableBuilders.get(i));
  		}
  		assertTrue("ItemManagerTester: " + "FakeModuleBuilder with name " + testItemName
  				+ " not found in available builders!", found);
  
  		// Make sure the available builders includes the fake geometry builder.
  		found = false;
  		testItemName = fakeGeometryBuilder.getItemName();
  		for (int i = 0; !found && i < availableBuilders.size(); i++) {
  			found = testItemName.equals(availableBuilders.get(i));
  		}
  		assertTrue("ItemManagerTester: " + "FakeGeometryBuilder with name " + testItemName
  				+ " not found in available builders!", found);
  
  		// Register the CompositeItemBuilder
  		iCECore.registerCompositeItem(fakeCompositeBuilder);
  
  		// Check the ItemManager and make sure the composite item builder was
  		// forwarded
  		assertTrue(fakeCompositeBuilder.itemBuildersRegistered());
  
  		// FIXME! Need tests for unregistering!
  
  		return;
  	}
  
  	/**
  	 * This operation checks the Core by creating a new Item and making sure
  	 * that it is available from the ItemManager. It also checks this
  	 * functionality for ICompositeItemBuilders.
  	 * <p>
  	 * This operation also checks that the types of Items returned by
  	 * getAvailableItemTypes are consistent with those registered with the
  	 * ItemManager that is used in the test.
  	 * </p>
  	 *
  	 */
  	@Test
  	public void checkItemCreation() {
  
  		// Local Declarations
  		FakeGeometryBuilder fakeGeometryBuilder = new FakeGeometryBuilder();
  		FakeModuleBuilder fakeModuleBuilder = new FakeModuleBuilder();
  		String name = fakeModuleBuilder.getItemName();
  		ArrayList<String> types = new ArrayList<String>();
  
  		// Register the ItemBuilders
  		iCECore.registerItem(fakeModuleBuilder);
  		iCECore.registerItem(fakeGeometryBuilder);
  
  		// Clean up any old items hanging around
  		ArrayList<Identifiable> items = iCECore.getItemList();
  		for (Identifiable iceObj : items) {
  			iCECore.deleteItem(String.valueOf(iceObj.getId()));
  		}
  
  		// Check the available Item types after registration
  		types = iCECore.getAvailableItemTypes().getList();
  		assertTrue(types.contains(fakeGeometryBuilder.getItemName()));
  		assertTrue(types.contains(fakeModuleBuilder.getItemName()));
  
  		// Create a new Item
  		int itemId = Integer.parseInt(iCECore.createItem(name));
  
  		// Check the Item id
  		assertNotNull(itemId);
  		assertTrue(itemId > 0);
  
  		// Check the ItemManager to see if the Item exists
  		Form testForm = fakeItemManager.retrieveItem(itemId);
  		assertNotNull(testForm);
  
  		// Create a few more and store the ids
  		ArrayList<Integer> ids = new ArrayList<Integer>();
  		ids.add(itemId);
  		ids.add(Integer.parseInt(iCECore.createItem(name)));
  		ids.add(Integer.parseInt(iCECore.createItem(name)));
  		ids.add(Integer.parseInt(iCECore.createItem(name)));
  		ids.add(Integer.parseInt(iCECore.createItem(name)));
  
  		// Get the list of ICEObjects that represents the Items that have been
  		// created and check it
  		items = iCECore.getItemList();
  		for (Identifiable iceObj : items) {
  			assertTrue(ids.contains(iceObj.getId()));
  		}
  
  		// Delete all of the Items
  		for (Identifiable iceObj : items) {
  			iCECore.deleteItem(String.valueOf(iceObj.getId()));
  		}
  		// Make sure that there are no items
  		assertEquals(0, iCECore.getItemList().size());
  		System.out.println("Num ITEMS after delete = " + iCECore.getItemList().size());
  
  		return;
  	}
  
  	/**
  	 * Check that the Core can correctly rename an Item.
  	 */
  	@Test
  	public void checkItemRenaming() {
  		// Local Declarations
  		FakeGeometryBuilder fakeGeometryBuilder = new FakeGeometryBuilder();
  		FakeModuleBuilder fakeModuleBuilder = new FakeModuleBuilder();
  		String name = fakeModuleBuilder.getItemName();
  		ArrayList<String> types = new ArrayList<String>();
  
  		// Register the ItemBuilders
  		iCECore.registerItem(fakeModuleBuilder);
  		iCECore.registerItem(fakeGeometryBuilder);
  
  		// Clean up any old items hanging around
  