### Question:
DefaultNamingStrategy extends AbstractNamingStrategy { @Override public String getPropertyNameForPrimaryKey(String pkName, EntityType entityType) { if (pkName.toLowerCase().startsWith("pk_")) { pkName = pkName.substring(3) + "_" + pkName.substring(0,2); } String propertyName = getPropertyName(pkName, entityType); for (String candidate : ImmutableList.of(propertyName, propertyName + "Pk")) { if (!entityType.getEscapedPropertyNames().contains(candidate)) { return normalizeJavaName(candidate); } } return normalizeJavaName(escape(entityType, 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 getPropertyNameForPrimaryKey() { assertEquals("superiorPk", namingStrategy.getPropertyNameForPrimaryKey("pk_superior", entityModel)); assertEquals("superiorPk", namingStrategy.getPropertyNameForPrimaryKey("PK_SUPERIOR", entityModel)); }
@Test public void getPropertyNameForPrimaryKey_clash() { entityModel.addProperty(new Property(entityModel, "id", Types.STRING)); assertEquals("idPk", namingStrategy.getPropertyNameForPrimaryKey("id", entityModel)); }