### Question:
DefaultNamingStrategy extends AbstractNamingStrategy { @Override public String getPropertyNameForForeignKey(String fkName, EntityType entityType) { if (fkName.toLowerCase().startsWith("fk_")) { fkName = fkName.substring(3) + "_" + fkName.substring(0,2); } String propertyName = escape(entityType, getPropertyName(fkName, entityType)); return normalizeJavaName(propertyName); } DefaultNamingStrategy(); @Override String getClassName(String tableName); @Override String getDefaultAlias(EntityType entityType); @Override String getDefaultVariableName(EntityType entityType); @Override String getForeignKeysVariable(EntityType entityType); @Override String getPrimaryKeysVariable(EntityType entityType); @Override String getPropertyName(String columnName, EntityType entityType); @Override String getPropertyNameForForeignKey(String fkName, EntityType entityType); @Override String getPropertyNameForInverseForeignKey(String fkName, EntityType entityType); @Override String getPropertyNameForPrimaryKey(String pkName, EntityType entityType);  }### Answer:
@Test public void getPropertyNameForForeignKey() { assertEquals("superiorFk", namingStrategy.getPropertyNameForForeignKey("fk_superior", entityModel)); assertEquals("superiorFk", namingStrategy.getPropertyNameForForeignKey("FK_SUPERIOR", entityModel)); assertEquals("reffooBar", namingStrategy.getPropertyNameForForeignKey("REFFOO_BAR", entityModel)); assertEquals("refFooBar", namingStrategy.getPropertyNameForForeignKey("REF_FOO_BAR", entityModel)); assertEquals("refFooBar_", namingStrategy.getPropertyNameForForeignKey("REF_FOO_BAR_", entityModel)); }