Table implements TableReference, Segment { @Override public String build(BuilderContext helper) { String realName = helper.locateTableName(this); return alias == null ? realName : realName + " " + alias; } Table(String name);  Table(String name, String alias); Table inShard(String shardId); Table shardBy(String shardValue); Table as(String alias); @Override String getName(); String getAlias(); @Override String getShardId(); @Override String getShardValue(); String getReferName(BuilderContext helper); @Override String build(BuilderContext helper); Column[] allColumns(); Column column(String name, JDBCType type); @Override String toString(); Column bitColumn(String name); Column tinyintColumn(String name); Column smallintColumn(String name); Column integerColumn(String name); Column bigintColumn(String name); Column floatColumn(String name); Column realColumn(String name); Column doubleColumn(String name); Column numericColumn(String name); Column decimalColumn(String name); Column charColumn(String name); Column varcharColumn(String name); Column longvarcharColumn(String name); Column dateColumn(String name); Column timeColumn(String name); Column timestampColumn(String name); Column binaryColumn(String name); Column varbinaryColumn(String name); Column longvarbinaryColumn(String name); Column nullColumn(String name); Column blobColumn(String name); Column clobColumn(String name); Column booleanColumn(String name); Column ncharColumn(String name); Column nvarcharColumn(String name); Column longnvarcharColumn(String name); Column nclobColumn(String name); Column sqlxmlColumn(String name); Column timeWithTimezoneColumn(String name); Column timestampWithTimezoneColumn(String name);  }
@Test public void testBuild() { Table table = new Table("t").as("ali"); assertEquals("t ali", table.build(new DefaultBuilderContext())); }