@Test(expected=IllegalRelationException.class)
public void testMissingTable() {
rels.add(orderToOrderDetails());
rels.add(orderDetailsToProducts());
RelationsValidator validator = validatorFor(ordersTab, orderLogTab, orderDetailsTab, productsTab);
validator.validate(rels);
}
private TableRelationship orderToOrderDetails() {
TableRelationship r = new TableRelationship(ordersTab, orderDetailsTab);
r.addFieldRelationship(ordersTab.getColumn("OrderId"), orderDetailsTab.getColumn("OrderId"));