### Question:
BuiltinIdentityIdGenerator extends AbstractIdGenerator implements IdentityIdGenerator { @Override public Long generatePostInsert(IdGenerationConfig config, Statement statement) { if (config.getIdProvider().isAvailable()) { return null; } if (config.getDialect().supportsAutoGeneratedKeys()) { return getGeneratedValue(config, statement); } return getGeneratedValue(config); }  @Override boolean supportsBatch(IdGenerationConfig config); @Override boolean includesIdentityColumn(IdGenerationConfig config); @Override boolean supportsAutoGeneratedKeys(IdGenerationConfig config); @Override Long generatePreInsert(IdGenerationConfig config); @Override Long generatePostInsert(IdGenerationConfig config, Statement statement); @Override GenerationType getGenerationType();  }### Answer:
@Test public void test_identitySelectSql() { MockConfig config = new MockConfig(); config.setDialect(new PostgresDialect()); MockResultSet resultSet = config.dataSource.connection.preparedStatement.resultSet; resultSet.rows.add(new RowData(11L)); BuiltinIdentityIdGenerator identityIdGenerator = new BuiltinIdentityIdGenerator(); IdGenerationConfig idGenerationConfig = new IdGenerationConfig(config, _IdGeneratedEmp.getSingletonInternal()); Long value = identityIdGenerator.generatePostInsert( idGenerationConfig, config.dataSource.connection.preparedStatement); assertEquals(new Long(11), value); assertEquals( "select currval(pg_catalog.pg_get_serial_sequence('\"CATA\".\"EMP\"', 'id'))", config.dataSource.connection.preparedStatement.sql); }