HibernateNamingStrategy { public String foreignKeyConstraintName(String tableName, String columnName) { String result = join(options.getForeignKeyConstraintPrefix(), concat(tableName, columnName)); if (needRestrict(options.isRestrictConstraintNames())) { return assertName( new NameShorter(options.getMaxLength(), options.hasForeignKeyConstraintPrefix()) .constraintName(result), "a foreign key constraint for " + joinWithSpace(tableName, columnName), "@ForeignKey(name=\"fk_name\")"); } return result; } HibernateNamingStrategy(StrategyOptions options); StrategyOptions getOptions(); void setOptions(StrategyOptions options); String classToTableName(String className); String propertyToColumnName(String propertyName); String embeddedPropertyToColumnName(String prefix, String embeddedPropertyName,
            boolean dontTouchPrefix); String joinTableName(String ownerEntityTable, String associatedEntityTable); String joinTableName(String ownerEntityTable, String associatedEntityTable,
            String ownerProperty); String joinKeyColumnName(String joinedColumn, String joinedTable); String foreignKeyColumnName(String propertyName, String propertyTableName); String foreignKeyConstraintName(String tableName, String columnName); String uniqueKeyConstraintName(String tableName, String columnName);  }
@Test public void foreignKeyConstraintName() { assertThat(strategy.foreignKeyConstraintName("some_table", "some_field")) .isEqualTo("F_some_table_some_field"); strategy.getOptions().setForeignKeyConstraintPrefix(null); assertThat(strategy.foreignKeyConstraintName("some_table", "some_field")) .isEqualTo("some_table_some_field"); }