@Test(expected=DuplicateIndexIdException.class)
public void dupDifferentTable() {

    AkibanInformationSchema ais = AISBBasedBuilder
        .create("test", typesTranslator)
        .table("p").colInt("id").pk("id").key("k1", "id")
        .table("c").colInt("id").colInt("pid").key("k2", "id").joinTo("p").on("pid", "id")
        .unvalidatedAIS();
    ais.getTable("test", "p").getIndex("k1").setIndexId(10);
    ais.getTable("test", "c").getIndex("k2").setIndexId(10);
    validate(ais);
}