@Test
public void testExecuteDDLUpdates() throws Exception {
final DBAccessor dbAccessor = createNiceMock(DBAccessor.class);
Configuration configuration = createNiceMock(Configuration.class);
expect(configuration.getDatabaseUrl()).andReturn(Configuration.JDBC_IN_MEMORY_URL).anyTimes();
dbAccessor.createTable(eq("viewmain"), EasyMock.<List<DBAccessor.DBColumnInfo>>anyObject(), eq("view_name"));
dbAccessor.createTable(eq("viewinstancedata"), EasyMock.<List<DBAccessor.DBColumnInfo>>anyObject(),
eq("view_name"), eq("view_instance_name"), eq("name"));
dbAccessor.createTable(eq("viewinstance"), EasyMock.<List<DBAccessor.DBColumnInfo>>anyObject(),
eq("view_name"), eq("name"));
dbAccessor.createTable(eq("viewinstanceproperty"), EasyMock.<List<DBAccessor.DBColumnInfo>>anyObject(),
eq("view_name"), eq("view_instance_name"), eq("name"));
dbAccessor.createTable(eq("viewparameter"), EasyMock.<List<DBAccessor.DBColumnInfo>>anyObject(),
eq("view_name"), eq("name"));
dbAccessor.createTable(eq("viewresource"), EasyMock.<List<DBAccessor.DBColumnInfo>>anyObject(),
eq("view_name"), eq("name"));
dbAccessor.addFKConstraint("viewparameter", "FK_viewparam_view_name", "view_name", "viewmain", "view_name", true);
dbAccessor.addFKConstraint("viewresource", "FK_viewres_view_name", "view_name", "viewmain", "view_name", true);
dbAccessor.addFKConstraint("viewinstance", "FK_viewinst_view_name", "view_name", "viewmain", "view_name", true);
replay(dbAccessor, configuration);
AbstractUpgradeCatalog upgradeCatalog = getUpgradeCatalog(dbAccessor);
Class<?> c = AbstractUpgradeCatalog.class;
Field f = c.getDeclaredField("configuration");