@Test
	public void testChangeInterfaceOfProperty() throws Exception
	{
		// connect to database
		PersistenceManager pm = new PersistenceManager(driver, database, login, password);
		// drop all tables
		pm.dropTable(Object.class);

		// create test objects
		OriginalObject one = new OriginalObject();
		one.setValue(1);
		OriginalObject two = new OriginalObject();
		two.setValue(2);
		ChangedInheritance three = new ChangedInheritance();
		three.setValue(3);

		// create external reference for object two
		pm.saveObject(two);

		ObjectContainerObject coOne = new ObjectContainerObject();
		coOne.setFoo(one);
		ObjectContainerObject coTwo = new ObjectContainerObject();
		coTwo.setFoo(two);
		ObjectContainerObject coThree = new ObjectContainerObject();
		coThree.setFoo(three);

		pm.saveObject(coOne);
		pm.saveObject(coTwo);
		pm.saveObject(coThree);
		// make sure the right number of OriginalObjects were stored
		List<OriginalObject> ooList = pm.getObjects(OriginalObject.class, new All());
		assertEquals(2, ooList.size());
		// make sure the right number of ChangedInheritance objects were stored
		List<ChangedInheritance> ciList = pm.getObjects(ChangedInheritance.class, new All());
		assertEquals(1, ciList.size());
		// make sure the Serializable object was stored
		List<Serializable> serList = pm.getObjects(Serializable.class, new All());
		assertEquals(1, serList.size());
		// make sure the containers are saved
		List<ObjectContainerObject> contList = pm.getObjects(ObjectContainerObject.class, new All());
		assertEquals(3, contList.size());
		assertNotNull(contList.get(0).getFoo());
		assertNotNull(contList.get(1).getFoo());
		assertNotNull(contList.get(2).getFoo());
		pm.close();

		// re-connect to database
		pm = new PersistenceManager(driver, database, login, password);
		// change ContainerObject to ChangedInheritanceContainer
		new TestTools(pm.getPersist()).changeName(ObjectContainerObject.class, ChangedInheritanceContainer.class);
		pm.close();

		// re-connect to database
		pm = new PersistenceManager(driver, database, login, password);
		// update schema
		pm.updateSchema(ChangedInheritanceContainer.class);
		pm.close();

		// re-connect to database
		pm = new PersistenceManager(driver, database, login, password);
		// make sure the externally referenced OriginalObject survived intact
		ooList = pm.getObjects(OriginalObject.class, new All());
		assertEquals(1, ooList.size());
		assertEquals(2, ooList.get(0).getValue());
		// make sure the ChangedInheritance object survived intact
		ciList = pm.getObjects(ChangedInheritance.class, new All());
		assertEquals(1, ciList.size());
		assertEquals(3, ciList.get(0).getValue());
		// make sure all containers survived
		List<ChangedInheritanceContainer> containerList = pm.getObjects(ChangedInheritanceContainer.class, new All());
		assertEquals(3, containerList.size());

		// check for the correct three values
		int nullFoundCount = 0;
		boolean chngFound = false;
		for (ChangedInheritanceContainer cont : containerList)
		{
			if (cont.getFoo() == null)
			{
				nullFoundCount++;
			} else if (cont.getFoo() instanceof ChangedInheritance)
			{
				chngFound = true;
				assertEquals(3, ((ChangedInheritance) cont.getFoo()).getValue());
			} else
			{
				fail("Unknown foo reference in container object.");
			}
		}
		assertEquals(2, nullFoundCount);
		assertTrue(chngFound);
		pm.close();

	}