public void testWithSchema() {
RelationName table = new RelationName(null, "table");
RelationName schema_table = new RelationName("schema", "table");
RelationName schema_alias = new RelationName("schema", "alias");
AliasMap m = new AliasMap(Collections.singleton(new Alias(schema_table, schema_alias)));
assertEquals(schema_alias, m.applyTo(schema_table));
assertEquals(table, m.applyTo(table));
}