this.generator.generate(agraph);
assert(agraph.getVertexCount() > 0);
// Make sure it has a vertex for HISTORY
Table catalog_tbl = this.getTable("HISTORY");
DesignerVertex v = agraph.getVertex(catalog_tbl);
assertNotNull(v);
// And make sure that it has edges
agraph.setVerbose(true);
Collection<DesignerEdge> edges = agraph.getIncidentEdges(v);
assertFalse(edges.isEmpty());
Set<Table> expected = new HashSet<Table>();
CollectionUtil.addAll(expected, this.getTable("WAREHOUSE"),
this.getTable("DISTRICT"),
this.getTable("CUSTOMER"));
Set<Table> actual = new HashSet<Table>();
for (DesignerEdge e : edges) {
DesignerVertex other_v = agraph.getOpposite(v, e);
assertNotNull(other_v);
Table other_tbl = other_v.getCatalogItem();
assertNotNull(other_tbl);
if (other_tbl.equals(catalog_tbl)) {
assertEquals(v, other_v);
} else {
assert(expected.contains(other_tbl)) : other_tbl;