AbstractTableEngine extends JdbcService implements TableEngine, OperationExecutor { @Override public Table create(JdbcIndex<?> index) { Table table = getTableFactory().create(index); if (exists(index)) { throw new TableExistsException("Table for index " + index.getName() + " exists"); } String sql = String.format("CREATE TABLE `%s` ( %s );", table.getName(), new TableElementCompiler(table).toSql()); LOG.info("Creating table for Index {}. SQL is: {}", index.getName(), sql); jdbc().execute(sql); registry.put(index, table); return table; } protected  AbstractTableEngine(DataSource dataSource, TypeMap typeMap, NameTranslator<Index<?>> tableNameTranslator,
            NameTranslator<IndexField<?>> columnNameTranslator); @Override boolean exists(JdbcIndex<?> index); @Override Table get(JdbcIndex<?> index); @Override Table create(JdbcIndex<?> index); @Override void drop(JdbcIndex<?> index); @Override void execute(Operation operation); @Override void execute(InsertOperation operation); @Override void execute(UpdateOperation operation); @Override void execute(DeleteOperation operation); TypeMap getTypeMap(); void setTypeMap(TypeMap typeMap); NameTranslator<Index<?>> getTableNameTranslator(); void setTableNameTranslator(NameTranslator<Index<?>> tableNameTranslator); NameTranslator<IndexField<?>> getColumnNameTranslator(); void setColumnNameTranslator(NameTranslator<IndexField<?>> columnNameTranslator);  }
@Test(expected = TableExistsException.class) public void create_afterCreate_throwsException() throws Exception { try { engine.create(testIndex); } catch (TableExistsException e) { fail("TableExistsException thrown on the wrong call"); } engine.create(testIndex); }